1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: hwplib.h,v $
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: hwplib.h,v 1.5 2008-04-10 12:09:50 rt Exp $ */
35 #include "precompile.h"
36 /* hwp96ºÎÅÍ hunit°¡ 4byte°¡ µÇ¾ú´Ù. */
38 * size of hunit is 4 since hwp96 version
42 typedef unsigned short hchar
;
44 typedef unsigned char kchar
;
45 typedef unsigned char echar
;
49 #if !defined(_BOOL_T_) && !defined(OS2)
50 typedef unsigned short BOOL
;
52 typedef unsigned short WORD
;
54 typedef unsigned long DWORD
;
60 typedef unsigned char uchar
;
61 typedef unsigned short ushort
;
62 typedef unsigned int uint
;
63 typedef unsigned long ulong
;
76 inline void allocPoint(ZZPoint
&target
, ZZPoint
&src
)
115 #endif /* _ZZRECT_ */
117 #if !defined(_WIN32) && !defined(MAX_PATH)
118 # define MAX_PATH 260
119 #endif /* MAX_PATH */
126 // HWP unit information
128 * HWP unit information
131 #define ONE_ENG_CH_WIDTH (ONE_POINT*(10/2))
132 #define ONE_MILI (71)
135 /* HWP 3.0 ¹®¼ Á¤º¸ */
143 #define CH_ALIGNSPACE 0
145 #define CH_BOOKMARK 6
147 #define CH_DATE_FORM 7
148 #define CH_DATE_CODE 8
150 #define CH_TEXT_BOX 10
151 #define CH_PICTURE 11
153 #define CH_END_PARA 13
156 #define CH_HEADER_FOOTER 16
157 #define CH_FOOTNOTE 17
158 #define CH_AUTO_NUM 18 /* pgnum, footnote/endnote, picture num */
159 #define CH_NEW_NUM 19 /* pgnum, footnote/endnote, picture num */
161 #define CH_SHOW_PAGE_NUM 20
162 #define CH_PAGE_NUM_CTRL 21 /* new chapter, hide pagenum */
163 #define CH_MAIL_MERGE 22
164 #define CH_COMPOSE 23
167 #define CH_TOC_MARK 25 /* CONT_MARK, TBL_MARK, PIC_MARK */
168 #define CH_INDEX_MARK 26
170 #define CH_COL_DEF 27
171 #define CH_OUTLINE 28
172 #define CH_CROSSREF 29
174 #define CH_KEEP_SPACE 30
175 #define CH_FIXED_SPACE 31
178 #define HAVE_SUBPARA_MASK ((1<<CH_TEXT_BOX) | (1<<CH_PICTURE) | (1<<CH_HIDDEN) | (1<<CH_HEADER_FOOTER) | (1<<CH_FOOTNOTE))
180 #define IS_SP_SKIP_BLOCK(hch) ((hch<5) || (hch==12) || (hch==27) || (hch == 29))
183 #define FILETAG_UNCOMPRESSED_BIT 0x80000000
184 #define FILETAG_END_OF_COMPRESSED 0x00000000
186 #define FILETAG_EMBEDDED_PICTURE 0x00000001
187 #define FILETAG_OLE_OBJECT 0x00000002
188 #define FILETAG_HYPERTEXT 0x00000003
189 #define FILETAG_PRESENTATION 0x00000004
191 #define FILETAG_END_OF_UNCOMPRESSED 0x80000000
192 #define FILETAG_PREVIEW_IMAGE 0x80000001
193 #define FILETAG_PREVIEW_TEXT 0x80000002
199 // system error = errno
200 // USER_ERROR_BIT = (1 << 16),
202 HWP_InvalidFileFormat
,
204 HWP_UNSUPPORTED_VERSION
,
217 //# define DLLEXPORT __declspec(dllexport)
220 //# define DLLEXPORT __declspec(dllimport)
227 #include <sys/stat.h>
228 #include <sys/types.h>
234 # define access _access
236 # define mkdir(x,y) _mkdir(x)
237 # define rmdir _rmdir
239 # define write _write
240 # define close _close
241 # define unlink _unlink
247 #endif /* _HWPLIB_H_*/