sync master with lastest vba changes
[ooovba.git] / hwpfilter / source / hinfo.h
blob2088b14114b842c1c28750c52aa8efb6f79d5aaf
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: hinfo.h,v $
10 * $Revision: 1.5 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 /* $Id: hinfo.h,v 1.5 2008-06-04 09:59:14 vg Exp $ */
33 #ifndef _HWPINFO_H_
34 #define _HWPINFO_H_
36 #include "hwplib.h"
38 #define CHAIN_MAX_PATH 40
39 #define ANNOTATION_LEN 24
41 class HWPFile;
42 class CTextOut;
43 class CHTMLOut;
45 /**
46 * Information of page (phisical)
48 typedef struct
50 unsigned char paper_kind;
51 unsigned char paper_direction;
52 hunit paper_height;
53 hunit paper_width;
54 hunit top_margin;
55 hunit bottom_margin;
56 hunit left_margin;
57 hunit right_margin;
58 hunit header_length;
59 hunit footer_length;
60 hunit gutter_length;
61 } PaperInfo;
63 /* ?????? ??????, ???????? ???? */
64 typedef struct
66 char type; // 0- background color, 1 - external image, 2- embeded image
67 char reserved1[8];
68 int luminance; /* ???? ( -100 ~ 100 ) */
69 int contrast; /* ???? ( -100 ~ 100 ) */
70 char effect; /* 0-????????, 1-????????????, 2-???? */
71 char reserved2[8];
72 char filename[260 + 1]; // filename
73 unsigned char color[3]; //0 - red, 1 - green, 2 - blue
74 unsigned short flag; /* 0 - ????????, 1 - ????????, 2 - ??????, 3 - ???????? */
75 int range; /* 0-????, 1-????????, 3-??????, 4-?????? */
76 char reserved3[27];
77 int size;
78 char *data; // image data
79 bool isset;
80 } PaperBackInfo;
82 /* ???????? ???? */
83 /**
84 * Information of printing for chained page
86 typedef struct
88 unsigned char chain_page_no;
89 unsigned char chain_footnote_no;
90 unsigned char chain_filename[CHAIN_MAX_PATH];
91 } DocChainInfo;
93 /* ???? ???? */
94 /**
95 * Summary of document
97 struct HWPSummary
99 unsigned short title[56];
100 unsigned short subject[56];
101 unsigned short author[56];
102 unsigned short date[56];
103 unsigned short keyword[2][56];
104 unsigned short etc[3][56];
106 bool Read(HWPFile &);
110 HWPInfo class?? HWPFile?? ???? ?????? ???? ???? ??????????.
111 ?????? ???? ???? ????????(layout) ?????? ????????????
112 ????????, ???? ???? ?????? ???????? ????. \\
114 HWPInfo ???????? HWPFile?? #GetHWPInfo()# ?????? ???? ???? ?? ????.
116 @memo Hwp ???? ????
119 * Contains the basic information of the hwp document:
120 * margin, layout, paper and internal data.
122 class DLLEXPORT HWPInfo
124 public:
126 * The column index of a document that is saved at last
128 short cur_col;
130 * The row index of a document that is saved at last
132 short cur_row;
134 * Paper Information
136 PaperInfo paper;
138 PaperBackInfo back_info;
140 * Sets the attribute of read-only or read/write.
142 short readonly;
143 unsigned char reserved1[4];
145 * Information about document chain
147 DocChainInfo chain_info;
148 unsigned char annotation[ANNOTATION_LEN];
149 short encrypted;
150 // unsigned char reserved2[6];
151 short beginpagenum; /* ?????????? ???? */
153 * Information about footnote
155 short beginfnnum; /* ???????????? */
156 short countfn; /* ???? ???? */
157 hunit splinetext, splinefn;
158 hunit spfnfn;
159 unsigned char fnchar;
160 unsigned char fnlinetype;
161 // layout info
163 * Information about page layout
165 hunit bordermargin[4];
166 short borderline;
168 unsigned char empty_line_hide;
169 unsigned char table_move;
170 unsigned char compressed;
171 unsigned char reserved3;
172 short info_block_len;
173 /* ?????????? 128 ?????????? */
175 * Summary of document
177 HWPSummary summary;
178 unsigned char *info_block;
180 HWPInfo(void);
181 ~HWPInfo(void);
183 bool Read(HWPFile &hwpf);
184 bool Write(CTextOut &txtf);
185 bool Write(CHTMLOut &html);
189 /* ???? ???? ?????? */
191 * @short Style of character
193 struct CharShape
196 * Index of character style
198 int index; /* ???????? ???????? ????. */
200 * Font size
202 hunit size;
203 unsigned char font[NLanguage];
204 unsigned char ratio[NLanguage];
205 signed char space[NLanguage]; /* ???? */
206 unsigned char color[2];
207 unsigned char shade;
208 unsigned char attr;
209 unsigned char reserved[4];
211 bool Read(HWPFile &);
214 /* ?? ?????? ???? ?????? */
216 #define MAXTABS 40
218 * @short Tab properties
220 typedef struct
222 unsigned char type;
223 unsigned char dot_continue;
224 hunit position;
225 } TabSet;
228 * @short Column properties
230 typedef struct
232 unsigned char ncols;
233 unsigned char separator;
234 hunit spacing;
235 hunit columnlen, columnlen0;
236 } ColumnDef;
239 * @short Style of paragraph
241 struct ParaShape
244 * Index of paragraph style
246 int index; /* ???????? ???????? ???? */
247 hunit left_margin;
248 hunit right_margin;
249 hunit indent;
250 hunit lspacing;
251 hunit pspacing_prev;
252 hunit pspacing_next;
253 unsigned char condense;
254 unsigned char arrange_type;
255 TabSet tabs[MAXTABS];
256 ColumnDef coldef;
257 unsigned char shade;
258 unsigned char outline;
259 unsigned char outline_continue;
260 unsigned char reserved[2];
261 CharShape *cshape;
262 unsigned char pagebreak;
264 bool Read(HWPFile &);
265 // virtual ~ParaShape();
267 #endif /* _HWPINFO_H_ */