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 ************************************************************************/
31 #include "precompile.h"
35 /* hwp96ºÎÅÍ hunit°¡ 4byte°¡ µÇ¾ú´Ù. */
37 * size of hunit is 4 since hwp96 version
41 typedef unsigned short hchar
;
43 typedef unsigned char kchar
;
44 typedef unsigned char echar
;
48 #if !defined(_BOOL_T_) && !defined(OS2)
49 typedef unsigned short BOOL
;
51 typedef unsigned short WORD
;
53 typedef unsigned long DWORD
;
59 typedef unsigned char uchar
;
60 typedef unsigned short ushort
;
61 typedef unsigned int uint
;
62 typedef unsigned long ulong
;
65 typedef ::std::basic_string
<hchar
> hchar_string
;
77 inline void allocPoint(ZZPoint
&target
, ZZPoint
&src
)
116 #endif /* _ZZRECT_ */
118 #if !defined(_WIN32) && !defined(MAX_PATH)
119 # define MAX_PATH 260
120 #endif /* MAX_PATH */
127 // HWP unit information
129 * HWP unit information
132 #define ONE_ENG_CH_WIDTH (ONE_POINT*(10/2))
133 #define ONE_MILI (71)
136 /* HWP 3.0 ¹®¼ Á¤º¸ */
144 #define CH_ALIGNSPACE 0
146 #define CH_BOOKMARK 6
148 #define CH_DATE_FORM 7
149 #define CH_DATE_CODE 8
151 #define CH_TEXT_BOX 10
152 #define CH_PICTURE 11
154 #define CH_END_PARA 13
157 #define CH_HEADER_FOOTER 16
158 #define CH_FOOTNOTE 17
159 #define CH_AUTO_NUM 18 /* pgnum, footnote/endnote, picture num */
160 #define CH_NEW_NUM 19 /* pgnum, footnote/endnote, picture num */
162 #define CH_SHOW_PAGE_NUM 20
163 #define CH_PAGE_NUM_CTRL 21 /* new chapter, hide pagenum */
164 #define CH_MAIL_MERGE 22
165 #define CH_COMPOSE 23
168 #define CH_TOC_MARK 25 /* CONT_MARK, TBL_MARK, PIC_MARK */
169 #define CH_INDEX_MARK 26
171 #define CH_COL_DEF 27
172 #define CH_OUTLINE 28
173 #define CH_CROSSREF 29
175 #define CH_KEEP_SPACE 30
176 #define CH_FIXED_SPACE 31
179 #define HAVE_SUBPARA_MASK ((1<<CH_TEXT_BOX) | (1<<CH_PICTURE) | (1<<CH_HIDDEN) | (1<<CH_HEADER_FOOTER) | (1<<CH_FOOTNOTE))
181 #define IS_SP_SKIP_BLOCK(hch) ((hch<5) || (hch==12) || (hch==27) || (hch == 29))
184 #define FILETAG_UNCOMPRESSED_BIT 0x80000000
185 #define FILETAG_END_OF_COMPRESSED 0x00000000
187 #define FILETAG_EMBEDDED_PICTURE 0x00000001
188 #define FILETAG_OLE_OBJECT 0x00000002
189 #define FILETAG_HYPERTEXT 0x00000003
190 #define FILETAG_PRESENTATION 0x00000004
192 #define FILETAG_END_OF_UNCOMPRESSED 0x80000000
193 #define FILETAG_PREVIEW_IMAGE 0x80000001
194 #define FILETAG_PREVIEW_TEXT 0x80000002
200 // system error = errno
201 // USER_ERROR_BIT = (1 << 16),
203 HWP_InvalidFileFormat
,
205 HWP_UNSUPPORTED_VERSION
,
218 //# define DLLEXPORT __declspec(dllexport)
221 //# define DLLEXPORT __declspec(dllimport)
228 #include <sys/stat.h>
229 #include <sys/types.h>
235 # define access _access
237 # define mkdir(x,y) _mkdir(x)
238 # define rmdir _rmdir
240 # define write _write
241 # define close _close
242 # define unlink _unlink
248 #endif /* _HWPLIB_H_*/
250 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */