27 #ifndef LIBWPD_INTERNAL_H
28 #define LIBWPD_INTERNAL_H
33 #include <librevenge/librevenge.h>
34 #include <librevenge-stream/librevenge-stream.h>
42 #define LIBWPD_MIN min
43 #define LIBWPD_MAX max
45 #define LIBWPD_MIN std::min
46 #define LIBWPD_MAX std::max
49 #define WPD_CHECK_FILE_ERROR(v) if (v==EOF) { WPD_DEBUG_MSG(("X_CheckFileError: %d\n", __LINE__)); throw FileException(); }
50 #define WPD_CHECK_FILE_SEEK_ERROR(v) if (v) { WPD_DEBUG_MSG(("X_CheckFileSeekError: %d\n", __LINE__)); throw FileException(); }
51 #define WPD_CHECK_FILE_READ_ERROR(v,num_elements) if (v != num_elements) { WPD_DEBUG_MSG(("X_CheckFileReadElementError: %d\n", __LINE__)); throw FileException(); }
53 #define DELETEP(m) if (m) { delete m; m = 0; }
56 #define WPD_DEBUG_MSG(M) printf M
58 #define WPD_DEBUG_MSG(M)
61 #define WPD_NUM_ELEMENTS(array) sizeof(array)/sizeof(array[0])
66 unsigned short readU16(librevenge::RVNGInputStream *input,
WPXEncryption *encryption,
bool bigendian=
false);
67 signed short readS16(librevenge::RVNGInputStream *input,
WPXEncryption *encryption,
bool bigendian=
false);
68 unsigned readU32(librevenge::RVNGInputStream *input,
WPXEncryption *encryption,
bool bigendian=
false);
73 void appendUCS4(librevenge::RVNGString &str,
unsigned ucs4);
78 const unsigned **chars);
81 const unsigned **chars);
114 #define WPX_EXTRA_LARGE_BIT 1
115 #define WPX_VERY_LARGE_BIT 2
116 #define WPX_LARGE_BIT 4
117 #define WPX_SMALL_PRINT_BIT 8
118 #define WPX_FINE_PRINT_BIT 16
119 #define WPX_SUPERSCRIPT_BIT 32
120 #define WPX_SUBSCRIPT_BIT 64
121 #define WPX_OUTLINE_BIT 128
122 #define WPX_ITALICS_BIT 256
123 #define WPX_SHADOW_BIT 512
124 #define WPX_REDLINE_BIT 1024
125 #define WPX_DOUBLE_UNDERLINE_BIT 2048
126 #define WPX_BOLD_BIT 4096
127 #define WPX_STRIKEOUT_BIT 8192
128 #define WPX_UNDERLINE_BIT 16384
129 #define WPX_SMALL_CAPS_BIT 32768
130 #define WPX_BLINK_BIT 65536
131 #define WPX_REVERSEVIDEO_BIT 131072
134 #define WPX_PARAGRAPH_JUSTIFICATION_LEFT 0x00
135 #define WPX_PARAGRAPH_JUSTIFICATION_FULL 0x01
136 #define WPX_PARAGRAPH_JUSTIFICATION_CENTER 0x02
137 #define WPX_PARAGRAPH_JUSTIFICATION_RIGHT 0x03
138 #define WPX_PARAGRAPH_JUSTIFICATION_FULL_ALL_LINES 0x04
139 #define WPX_PARAGRAPH_JUSTIFICATION_DECIMAL_ALIGNED 0x05
142 #define WPX_TABLE_POSITION_ALIGN_WITH_LEFT_MARGIN 0x00
143 #define WPX_TABLE_POSITION_ALIGN_WITH_RIGHT_MARGIN 0x01
144 #define WPX_TABLE_POSITION_CENTER_BETWEEN_MARGINS 0x02
145 #define WPX_TABLE_POSITION_FULL 0x03
146 #define WPX_TABLE_POSITION_ABSOLUTE_FROM_LEFT_MARGIN 0x04
155 #define WPX_PAGE_BREAK 0x00
156 #define WPX_SOFT_PAGE_BREAK 0x01
157 #define WPX_COLUMN_BREAK 0x02
160 #define WPX_LEFT 0x00
161 #define WPX_RIGHT 0x01
162 #define WPX_CENTER 0x02
164 #define WPX_BOTTOM 0x04
169 _RGBSColor(
unsigned char r,
unsigned char g,
unsigned char b,
unsigned char s);
170 _RGBSColor(
unsigned short red,
unsigned short green,
unsigned short blue);