LibreOffice Module hwpfilter (master) 1
Classes | Macros | Typedefs | Enumerations | Functions
hwplib.h File Reference
#include "precompile.h"
#include <limits>
#include <new>
#include <string>
#include <o3tl/safeint.hxx>
#include <rtl/ustring.hxx>
#include <sal/types.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <fcntl.h>
#include <unistd.h>
Include dependency graph for hwplib.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ZZPoint
 Point. More...
 
struct  ZZSize
 Size. More...
 
struct  ZZRect
 Rectangle. More...
 
struct  ZZParall
 Parall. More...
 
struct  ZZScaleXY
 Scale. More...
 

Macros

#define MAX_PATH   260
 
#define TRUE   1
 
#define FALSE   0
 
#define ONE_POINT   25
 HWP unit information. More...
 
#define ONE_ENG_CH_WIDTH   (ONE_POINT*(10/2))
 
#define ONE_MILI   (71)
 
#define ONE_DOT   (19)
 
#define NLanguage   7
 
#define CH_ALIGNSPACE   0
 Control character. More...
 
#define CH_FIELD   5
 
#define CH_BOOKMARK   6
 
#define CH_DATE_FORM   7
 
#define CH_DATE_CODE   8
 
#define CH_TAB   9
 
#define CH_TEXT_BOX   10
 
#define CH_PICTURE   11
 
#define CH_END_PARA   13
 
#define CH_LINE   14
 
#define CH_HIDDEN   15
 
#define CH_HEADER_FOOTER   16
 
#define CH_FOOTNOTE   17
 
#define CH_AUTO_NUM   18 /* pgnum, footnote/endnote, picture num */
 
#define CH_NEW_NUM   19 /* pgnum, footnote/endnote, picture num */
 
#define CH_SHOW_PAGE_NUM   20
 
#define CH_PAGE_NUM_CTRL   21 /* new chapter, hide pagenum */
 
#define CH_MAIL_MERGE   22
 
#define CH_COMPOSE   23
 
#define CH_HYPHEN   24
 
#define CH_TOC_MARK   25 /* CONT_MARK, TBL_MARK, PIC_MARK */
 
#define CH_INDEX_MARK   26
 
#define CH_COL_DEF   27
 
#define CH_OUTLINE   28
 
#define CH_CROSSREF   29
 
#define CH_KEEP_SPACE   30
 
#define CH_FIXED_SPACE   31
 
#define CH_SPACE   32
 
#define HAVE_SUBPARA_MASK   ((1<<CH_TEXT_BOX) | (1<<CH_PICTURE) | (1<<CH_HIDDEN) | (1<<CH_HEADER_FOOTER) | (1<<CH_FOOTNOTE))
 
#define IS_SP_SKIP_BLOCK(hch)   ((hch<5) || (hch==12) || (hch==27) || (hch == 29))
 
#define FILETAG_END_OF_COMPRESSED   0x00000000
 
#define FILETAG_EMBEDDED_PICTURE   0x00000001
 
#define FILETAG_OLE_OBJECT   0x00000002
 
#define FILETAG_HYPERTEXT   0x00000003
 
#define FILETAG_PRESENTATION   0x00000004
 
#define FILETAG_END_OF_UNCOMPRESSED   0x80000000
 
#define FILETAG_PREVIEW_IMAGE   0x80000001
 
#define FILETAG_PREVIEW_TEXT   0x80000002
 
#define DLLEXPORT
 
#define DIRSEP   '/'
 

Typedefs

typedef char16_t hchar
 size of hunit is 4 since hwp96 version More...
 
typedef int hunit
 
typedef unsigned char kchar
 
typedef unsigned char uchar
 
typedef unsigned short ushort
 
typedef unsigned int uint
 
typedef ::std::basic_string< hcharhchar_string
 

Enumerations

enum  ErrorCode {
  HWP_NoError ,
  HWP_InvalidFileName ,
  HWP_InvalidFileFormat ,
  HWP_BrokenFile ,
  HWP_UNSUPPORTED_VERSION ,
  HWP_EMPTY_FILE
}
 
enum  DebugMask {
  DBG_READ = 0x01 ,
  DBG_DISPLAY = 0x02
}
 

Functions

OUString fromHcharStringToOUString (hchar_string const &s)
 

Macro Definition Documentation

◆ CH_ALIGNSPACE

#define CH_ALIGNSPACE   0

Control character.

Definition at line 121 of file hwplib.h.

◆ CH_AUTO_NUM

#define CH_AUTO_NUM   18 /* pgnum, footnote/endnote, picture num */

Definition at line 136 of file hwplib.h.

◆ CH_BOOKMARK

#define CH_BOOKMARK   6

Definition at line 123 of file hwplib.h.

◆ CH_COL_DEF

#define CH_COL_DEF   27

Definition at line 148 of file hwplib.h.

◆ CH_COMPOSE

#define CH_COMPOSE   23

Definition at line 142 of file hwplib.h.

◆ CH_CROSSREF

#define CH_CROSSREF   29

Definition at line 150 of file hwplib.h.

◆ CH_DATE_CODE

#define CH_DATE_CODE   8

Definition at line 126 of file hwplib.h.

◆ CH_DATE_FORM

#define CH_DATE_FORM   7

Definition at line 125 of file hwplib.h.

◆ CH_END_PARA

#define CH_END_PARA   13

Definition at line 131 of file hwplib.h.

◆ CH_FIELD

#define CH_FIELD   5

Definition at line 122 of file hwplib.h.

◆ CH_FIXED_SPACE

#define CH_FIXED_SPACE   31

Definition at line 153 of file hwplib.h.

◆ CH_FOOTNOTE

#define CH_FOOTNOTE   17

Definition at line 135 of file hwplib.h.

◆ CH_HEADER_FOOTER

#define CH_HEADER_FOOTER   16

Definition at line 134 of file hwplib.h.

◆ CH_HIDDEN

#define CH_HIDDEN   15

Definition at line 133 of file hwplib.h.

◆ CH_HYPHEN

#define CH_HYPHEN   24

Definition at line 143 of file hwplib.h.

◆ CH_INDEX_MARK

#define CH_INDEX_MARK   26

Definition at line 146 of file hwplib.h.

◆ CH_KEEP_SPACE

#define CH_KEEP_SPACE   30

Definition at line 152 of file hwplib.h.

◆ CH_LINE

#define CH_LINE   14

Definition at line 132 of file hwplib.h.

◆ CH_MAIL_MERGE

#define CH_MAIL_MERGE   22

Definition at line 141 of file hwplib.h.

◆ CH_NEW_NUM

#define CH_NEW_NUM   19 /* pgnum, footnote/endnote, picture num */

Definition at line 137 of file hwplib.h.

◆ CH_OUTLINE

#define CH_OUTLINE   28

Definition at line 149 of file hwplib.h.

◆ CH_PAGE_NUM_CTRL

#define CH_PAGE_NUM_CTRL   21 /* new chapter, hide pagenum */

Definition at line 140 of file hwplib.h.

◆ CH_PICTURE

#define CH_PICTURE   11

Definition at line 129 of file hwplib.h.

◆ CH_SHOW_PAGE_NUM

#define CH_SHOW_PAGE_NUM   20

Definition at line 139 of file hwplib.h.

◆ CH_SPACE

#define CH_SPACE   32

Definition at line 154 of file hwplib.h.

◆ CH_TAB

#define CH_TAB   9

Definition at line 127 of file hwplib.h.

◆ CH_TEXT_BOX

#define CH_TEXT_BOX   10

Definition at line 128 of file hwplib.h.

◆ CH_TOC_MARK

#define CH_TOC_MARK   25 /* CONT_MARK, TBL_MARK, PIC_MARK */

Definition at line 145 of file hwplib.h.

◆ DIRSEP

#define DIRSEP   '/'

Definition at line 222 of file hwplib.h.

◆ DLLEXPORT

#define DLLEXPORT

Definition at line 201 of file hwplib.h.

◆ FALSE

#define FALSE   0

Definition at line 101 of file hwplib.h.

◆ FILETAG_EMBEDDED_PICTURE

#define FILETAG_EMBEDDED_PICTURE   0x00000001

Definition at line 163 of file hwplib.h.

◆ FILETAG_END_OF_COMPRESSED

#define FILETAG_END_OF_COMPRESSED   0x00000000

Definition at line 161 of file hwplib.h.

◆ FILETAG_END_OF_UNCOMPRESSED

#define FILETAG_END_OF_UNCOMPRESSED   0x80000000

Definition at line 168 of file hwplib.h.

◆ FILETAG_HYPERTEXT

#define FILETAG_HYPERTEXT   0x00000003

Definition at line 165 of file hwplib.h.

◆ FILETAG_OLE_OBJECT

#define FILETAG_OLE_OBJECT   0x00000002

Definition at line 164 of file hwplib.h.

◆ FILETAG_PRESENTATION

#define FILETAG_PRESENTATION   0x00000004

Definition at line 166 of file hwplib.h.

◆ FILETAG_PREVIEW_IMAGE

#define FILETAG_PREVIEW_IMAGE   0x80000001

Definition at line 169 of file hwplib.h.

◆ FILETAG_PREVIEW_TEXT

#define FILETAG_PREVIEW_TEXT   0x80000002

Definition at line 170 of file hwplib.h.

◆ HAVE_SUBPARA_MASK

#define HAVE_SUBPARA_MASK   ((1<<CH_TEXT_BOX) | (1<<CH_PICTURE) | (1<<CH_HIDDEN) | (1<<CH_HEADER_FOOTER) | (1<<CH_FOOTNOTE))

Definition at line 156 of file hwplib.h.

◆ IS_SP_SKIP_BLOCK

#define IS_SP_SKIP_BLOCK (   hch)    ((hch<5) || (hch==12) || (hch==27) || (hch == 29))

Definition at line 158 of file hwplib.h.

◆ MAX_PATH

#define MAX_PATH   260

Definition at line 96 of file hwplib.h.

◆ NLanguage

#define NLanguage   7

Definition at line 115 of file hwplib.h.

◆ ONE_DOT

#define ONE_DOT   (19)

Definition at line 111 of file hwplib.h.

◆ ONE_ENG_CH_WIDTH

#define ONE_ENG_CH_WIDTH   (ONE_POINT*(10/2))

Definition at line 109 of file hwplib.h.

◆ ONE_MILI

#define ONE_MILI   (71)

Definition at line 110 of file hwplib.h.

◆ ONE_POINT

#define ONE_POINT   25

HWP unit information.

Definition at line 108 of file hwplib.h.

◆ TRUE

#define TRUE   1

Definition at line 100 of file hwplib.h.

Typedef Documentation

◆ hchar

typedef char16_t hchar

size of hunit is 4 since hwp96 version

Definition at line 36 of file hwplib.h.

◆ hchar_string

typedef ::std::basic_string<hchar> hchar_string

Definition at line 44 of file hwplib.h.

◆ hunit

typedef int hunit

Definition at line 37 of file hwplib.h.

◆ kchar

typedef unsigned char kchar

Definition at line 38 of file hwplib.h.

◆ uchar

typedef unsigned char uchar

Definition at line 40 of file hwplib.h.

◆ uint

typedef unsigned int uint

Definition at line 42 of file hwplib.h.

◆ ushort

typedef unsigned short ushort

Definition at line 41 of file hwplib.h.

Enumeration Type Documentation

◆ DebugMask

enum DebugMask
Enumerator
DBG_READ 
DBG_DISPLAY 

Definition at line 186 of file hwplib.h.

◆ ErrorCode

enum ErrorCode
Enumerator
HWP_NoError 
HWP_InvalidFileName 
HWP_InvalidFileFormat 
HWP_BrokenFile 
HWP_UNSUPPORTED_VERSION 
HWP_EMPTY_FILE 

Definition at line 173 of file hwplib.h.

Function Documentation

◆ fromHcharStringToOUString()

OUString fromHcharStringToOUString ( hchar_string const &  s)
inline