27 #ifndef LIBWPD_INTERNAL_H
28 #define LIBWPD_INTERNAL_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) {\
52 WPD_DEBUG_MSG(("X_CheckFileReadElementError: %d\n", __LINE__)); throw FileException(); }
54 #define DELETEP(m) if (m) { delete m; m = 0; }
57 #define WPD_DEBUG_MSG(M) printf M
59 #define WPD_DEBUG_MSG(M)
62 #define WPD_NUM_ELEMENTS(array) sizeof(array)/sizeof(array[0])
79 const uint32_t **chars);
82 const uint32_t **chars);
115 #define WPX_EXTRA_LARGE_BIT 1
116 #define WPX_VERY_LARGE_BIT 2
117 #define WPX_LARGE_BIT 4
118 #define WPX_SMALL_PRINT_BIT 8
119 #define WPX_FINE_PRINT_BIT 16
120 #define WPX_SUPERSCRIPT_BIT 32
121 #define WPX_SUBSCRIPT_BIT 64
122 #define WPX_OUTLINE_BIT 128
123 #define WPX_ITALICS_BIT 256
124 #define WPX_SHADOW_BIT 512
125 #define WPX_REDLINE_BIT 1024
126 #define WPX_DOUBLE_UNDERLINE_BIT 2048
127 #define WPX_BOLD_BIT 4096
128 #define WPX_STRIKEOUT_BIT 8192
129 #define WPX_UNDERLINE_BIT 16384
130 #define WPX_SMALL_CAPS_BIT 32768
131 #define WPX_BLINK_BIT 65536
132 #define WPX_REVERSEVIDEO_BIT 131072
135 #define WPX_PARAGRAPH_JUSTIFICATION_LEFT 0x00
136 #define WPX_PARAGRAPH_JUSTIFICATION_FULL 0x01
137 #define WPX_PARAGRAPH_JUSTIFICATION_CENTER 0x02
138 #define WPX_PARAGRAPH_JUSTIFICATION_RIGHT 0x03
139 #define WPX_PARAGRAPH_JUSTIFICATION_FULL_ALL_LINES 0x04
140 #define WPX_PARAGRAPH_JUSTIFICATION_DECIMAL_ALIGNED 0x05
143 #define WPX_TABLE_POSITION_ALIGN_WITH_LEFT_MARGIN 0x00
144 #define WPX_TABLE_POSITION_ALIGN_WITH_RIGHT_MARGIN 0x01
145 #define WPX_TABLE_POSITION_CENTER_BETWEEN_MARGINS 0x02
146 #define WPX_TABLE_POSITION_FULL 0x03
147 #define WPX_TABLE_POSITION_ABSOLUTE_FROM_LEFT_MARGIN 0x04
156 #define WPX_PAGE_BREAK 0x00
157 #define WPX_SOFT_PAGE_BREAK 0x01
158 #define WPX_COLUMN_BREAK 0x02
161 #define WPX_LEFT 0x00
162 #define WPX_RIGHT 0x01
163 #define WPX_CENTER 0x02
165 #define WPX_BOTTOM 0x04
170 _RGBSColor(uint8_t r, uint8_t g, uint8_t b, uint8_t s);
171 _RGBSColor(uint16_t red, uint16_t green, uint16_t blue);