1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_HWPFILTER_SOURCE_HINFO_H
21 #define INCLUDED_HWPFILTER_SOURCE_HINFO_H
29 #define CHAIN_MAX_PATH 40
30 #define ANNOTATION_LEN 24
37 * Information of page (physical)
41 unsigned char paper_kind
;
42 unsigned char paper_direction
;
68 /* 페이지 배경색, 배경그림 정보 */
71 char type
; // 0- background color, 1 - external image, 2- embedded image
72 char reserved1
[8] = {};
73 int luminance
; /* 밝기 ( -100 ~ 100 ) */
74 int contrast
; /* 명암 ( -100 ~ 100 ) */
75 char effect
; /* 0-원래그림, 1-그레이스케일, 2-흑백 */
76 char reserved2
[8] = {};
77 char filename
[260 + 1] = {}; // filename
78 unsigned char color
[3] = {}; //0 - red, 1 - green, 2 - blue
79 unsigned short flag
; /* 0 - 바둑판식, 1 - 가운데로, 2 - 쪽크기, 3 - 용지크기 */
80 int range
; /* 0-전체, 1-첫페이지, 3-짝수쪽, 4-홀수쪽 */
81 char reserved3
[27] = {};
83 std::vector
<char> data
; // image data
100 * Information of printing for chained page
104 unsigned char chain_page_no
;
105 unsigned char chain_footnote_no
;
106 unsigned char chain_filename
[CHAIN_MAX_PATH
] = {};
109 , chain_footnote_no(0)
116 * Summary of document
120 unsigned short title
[56];
121 unsigned short subject
[56];
122 unsigned short author
[56];
123 unsigned short date
[56];
124 unsigned short keyword
[2][56];
125 unsigned short etc
[3][56];
127 bool Read(HWPFile
&);
131 HWPInfo class는 HWPFile에 대한 정보를 담고 있는 클래스이다.
132 종이나 여백 등의 레이아웃(layout) 정보는 쪽매기기에서
133 사용하며, 기타 내부 정보를 포함하고 있다. \\
135 HWPInfo 클래스는 HWPFile의 #GetHWPInfo()# 함수를 통해 얻을 수 있다.
140 * Contains the basic information of the hwp document:
141 * margin, layout, paper and internal data.
143 class DLLEXPORT HWPInfo
147 * The column index of a document that is saved at last
151 * The row index of a document that is saved at last
159 PaperBackInfo back_info
;
161 * Sets the attribute of read-only or read/write.
164 unsigned char reserved1
[4] = {};
166 * Information about document chain
168 DocChainInfo chain_info
;
169 unsigned char annotation
[ANNOTATION_LEN
] = {};
171 // unsigned char reserved2[6];
172 short beginpagenum
; /* 시작페이지 번호 */
174 * Information about footnote
176 short beginfnnum
; /* 각주시작번호 */
177 short countfn
; /* 각주 갯수 */
178 hunit splinetext
, splinefn
;
180 unsigned char fnchar
;
181 unsigned char fnlinetype
;
184 * Information about page layout
186 hunit bordermargin
[4] = {};
189 unsigned char empty_line_hide
;
190 unsigned char table_move
;
191 unsigned char compressed
;
192 unsigned char reserved3
;
193 short info_block_len
;
194 /* 여기까지가 128 바이트이다 */
196 * Summary of document
199 std::unique_ptr
<unsigned char[]> info_block
;
204 void Read(HWPFile
&hwpf
);
210 * @short Style of character
215 * Index of character style
217 int index
; /* 스타일의 인덱스를 저장. */
222 unsigned char color
[2];
229 void Read(HWPFile
&);
238 * @short Tab properties
243 unsigned char dot_continue
;
254 * @short Column properties
259 unsigned char separator
;
261 hunit columnlen
, columnlen0
;
273 * @short Style of paragraph
278 * Index of paragraph style
280 int index
; /* 스타일의 인덱스를 저장 */
287 unsigned char condense
;
288 unsigned char arrange_type
;
289 TabSet tabs
[MAXTABS
];
290 std::shared_ptr
<ColumnDef
> xColdef
;
292 unsigned char outline
;
293 unsigned char outline_continue
;
294 unsigned char reserved
[2];
295 std::shared_ptr
<CharShape
> cshape
;
296 unsigned char pagebreak
;
298 void Read(HWPFile
&);
302 #endif // INCLUDED_HWPFILTER_SOURCE_HINFO_H
304 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */