Bump for 3.6-28
[LibreOffice.git] / hwpfilter / source / hinfo.h
blob61cf56f848935a7e84e0c7a14ce5d4509a2897b9
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
29 #ifndef _HWPINFO_H_
30 #define _HWPINFO_H_
32 #include "hwplib.h"
34 #define CHAIN_MAX_PATH 40
35 #define ANNOTATION_LEN 24
37 class HWPFile;
38 class CTextOut;
39 class CHTMLOut;
41 /**
42 * Information of page (phisical)
44 typedef struct
46 unsigned char paper_kind;
47 unsigned char paper_direction;
48 hunit paper_height;
49 hunit paper_width;
50 hunit top_margin;
51 hunit bottom_margin;
52 hunit left_margin;
53 hunit right_margin;
54 hunit header_length;
55 hunit footer_length;
56 hunit gutter_length;
57 } PaperInfo;
59 /* ?????? ??????, ???????? ???? */
60 typedef struct
62 char type; // 0- background color, 1 - external image, 2- embeded image
63 char reserved1[8];
64 int luminance; /* ???? ( -100 ~ 100 ) */
65 int contrast; /* ???? ( -100 ~ 100 ) */
66 char effect; /* 0-????????, 1-????????????, 2-???? */
67 char reserved2[8];
68 char filename[260 + 1]; // filename
69 unsigned char color[3]; //0 - red, 1 - green, 2 - blue
70 unsigned short flag; /* 0 - ????????, 1 - ????????, 2 - ??????, 3 - ???????? */
71 int range; /* 0-????, 1-????????, 3-??????, 4-?????? */
72 char reserved3[27];
73 int size;
74 char *data; // image data
75 bool isset;
76 } PaperBackInfo;
78 /* ???????? ???? */
79 /**
80 * Information of printing for chained page
82 typedef struct
84 unsigned char chain_page_no;
85 unsigned char chain_footnote_no;
86 unsigned char chain_filename[CHAIN_MAX_PATH];
87 } DocChainInfo;
89 /* ???? ???? */
90 /**
91 * Summary of document
93 struct HWPSummary
95 unsigned short title[56];
96 unsigned short subject[56];
97 unsigned short author[56];
98 unsigned short date[56];
99 unsigned short keyword[2][56];
100 unsigned short etc[3][56];
102 bool Read(HWPFile &);
106 HWPInfo class?? HWPFile?? ???? ?????? ???? ???? ??????????.
107 ?????? ???? ???? ????????(layout) ?????? ????????????
108 ????????, ???? ???? ?????? ???????? ????. \\
110 HWPInfo ???????? HWPFile?? #GetHWPInfo()# ?????? ???? ???? ?? ????.
112 @memo Hwp ???? ????
115 * Contains the basic information of the hwp document:
116 * margin, layout, paper and internal data.
118 class DLLEXPORT HWPInfo
120 public:
122 * The column index of a document that is saved at last
124 short cur_col;
126 * The row index of a document that is saved at last
128 short cur_row;
130 * Paper Information
132 PaperInfo paper;
134 PaperBackInfo back_info;
136 * Sets the attribute of read-only or read/write.
138 short readonly;
139 unsigned char reserved1[4];
141 * Information about document chain
143 DocChainInfo chain_info;
144 unsigned char annotation[ANNOTATION_LEN];
145 short encrypted;
146 // unsigned char reserved2[6];
147 short beginpagenum; /* ?????????? ???? */
149 * Information about footnote
151 short beginfnnum; /* ???????????? */
152 short countfn; /* ???? ???? */
153 hunit splinetext, splinefn;
154 hunit spfnfn;
155 unsigned char fnchar;
156 unsigned char fnlinetype;
157 // layout info
159 * Information about page layout
161 hunit bordermargin[4];
162 short borderline;
164 unsigned char empty_line_hide;
165 unsigned char table_move;
166 unsigned char compressed;
167 unsigned char reserved3;
168 short info_block_len;
169 /* ?????????? 128 ?????????? */
171 * Summary of document
173 HWPSummary summary;
174 unsigned char *info_block;
176 HWPInfo(void);
177 ~HWPInfo(void);
179 bool Read(HWPFile &hwpf);
180 bool Write(CTextOut &txtf);
181 bool Write(CHTMLOut &html);
185 /* ???? ???? ?????? */
187 * @short Style of character
189 struct CharShape
192 * Index of character style
194 int index; /* ???????? ???????? ????. */
196 * Font size
198 hunit size;
199 unsigned char font[NLanguage];
200 unsigned char ratio[NLanguage];
201 signed char space[NLanguage]; /* ???? */
202 unsigned char color[2];
203 unsigned char shade;
204 unsigned char attr;
205 unsigned char reserved[4];
207 bool Read(HWPFile &);
210 /* ?? ?????? ???? ?????? */
212 #define MAXTABS 40
214 * @short Tab properties
216 typedef struct
218 unsigned char type;
219 unsigned char dot_continue;
220 hunit position;
221 } TabSet;
224 * @short Column properties
226 typedef struct
228 unsigned char ncols;
229 unsigned char separator;
230 hunit spacing;
231 hunit columnlen, columnlen0;
232 } ColumnDef;
235 * @short Style of paragraph
237 struct ParaShape
240 * Index of paragraph style
242 int index; /* ???????? ???????? ???? */
243 hunit left_margin;
244 hunit right_margin;
245 hunit indent;
246 hunit lspacing;
247 hunit pspacing_prev;
248 hunit pspacing_next;
249 unsigned char condense;
250 unsigned char arrange_type;
251 TabSet tabs[MAXTABS];
252 ColumnDef coldef;
253 unsigned char shade;
254 unsigned char outline;
255 unsigned char outline_continue;
256 unsigned char reserved[2];
257 CharShape *cshape;
258 unsigned char pagebreak;
260 bool Read(HWPFile &);
261 // virtual ~ParaShape();
263 #endif /* _HWPINFO_H_ */
265 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */