Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef LIBWPS_INTERNAL_H
00023 #define LIBWPS_INTERNAL_H
00024 #ifdef DEBUG
00025 #include <bitset>
00026 #include <stdio.h>
00027 #endif
00028 #include <libwpd-stream/libwpd-stream.h>
00029 #include <libwpd/libwpd.h>
00030 #include <string>
00031
00032 #if defined(_MSC_VER) || defined(__DJGPP__)
00033 typedef signed char int8_t;
00034 typedef unsigned char uint8_t;
00035 typedef signed short int16_t;
00036 typedef unsigned short uint16_t;
00037 typedef signed int int32_t;
00038 typedef unsigned int uint32_t;
00039 #else
00040 #include <inttypes.h>
00041 #endif
00042
00043
00044
00045 #define DELETEP(m) if (m) { delete m; m = NULL; }
00046
00047 #ifdef DEBUG
00048 #define WPS_DEBUG_MSG(M) printf M
00049 #else
00050 #define WPS_DEBUG_MSG(M)
00051 #endif
00052
00053 #define WPS_LE_GET_GUINT16(p) \
00054 (uint16_t)((((uint8_t const *)(p))[0] << 0) | \
00055 (((uint8_t const *)(p))[1] << 8))
00056 #define WPS_LE_GET_GUINT32(p) \
00057 (uint32_t)((((uint8_t const *)(p))[0] << 0) | \
00058 (((uint8_t const *)(p))[1] << 8) | \
00059 (((uint8_t const *)(p))[2] << 16) | \
00060 (((uint8_t const *)(p))[3] << 24))
00061
00062 uint8_t readU8(WPXInputStream *input);
00063 uint16_t readU16(WPXInputStream *input);
00064 uint32_t readU32(WPXInputStream *input);
00065
00066
00067
00068 enum WPSHeaderFooterType { HEADER, FOOTER };
00069 enum WPSHeaderFooterInternalType { HEADER_A, HEADER_B, FOOTER_A, FOOTER_B, DUMMY };
00070 enum WPSHeaderFooterOccurence { ODD, EVEN, ALL, NEVER };
00071 enum WPSFormOrientation { PORTRAIT, LANDSCAPE };
00072
00073
00074 #define WPS_EXTRA_LARGE_BIT 1
00075 #define WPS_VERY_LARGE_BIT 2
00076 #define WPS_LARGE_BIT 4
00077 #define WPS_SMALL_PRINT_BIT 8
00078 #define WPS_FINE_PRINT_BIT 16
00079 #define WPS_SUPERSCRIPT_BIT 32
00080 #define WPS_SUBSCRIPT_BIT 64
00081 #define WPS_OUTLINE_BIT 128
00082 #define WPS_ITALICS_BIT 256
00083 #define WPS_SHADOW_BIT 512
00084 #define WPS_REDLINE_BIT 1024
00085 #define WPS_DOUBLE_UNDERLINE_BIT 2048
00086 #define WPS_BOLD_BIT 4096
00087 #define WPS_STRIKEOUT_BIT 8192
00088 #define WPS_UNDERLINE_BIT 16384
00089 #define WPS_SMALL_CAPS_BIT 32768
00090 #define WPS_BLINK_BIT 65536
00091 #define WPS_REVERSEVIDEO_BIT 131072
00092 #define WPS_ALL_CAPS_BIT 262144
00093 #define WPS_EMBOSS_BIT 524288
00094 #define WPS_ENGRAVE_BIT 1048576
00095 #define WPS_SPECIAL_BIT 2097152
00096
00097
00098 #define WPS_PARAGRAPH_JUSTIFICATION_LEFT 0x00
00099 #define WPS_PARAGRAPH_JUSTIFICATION_FULL 0x01
00100 #define WPS_PARAGRAPH_JUSTIFICATION_CENTER 0x02
00101 #define WPS_PARAGRAPH_JUSTIFICATION_RIGHT 0x03
00102 #define WPS_PARAGRAPH_JUSTIFICATION_FULL_ALL_LINES 0x04
00103 #define WPS_PARAGRAPH_JUSTIFICATION_DECIMAL_ALIGNED 0x05
00104
00105 #define WPS_PARAGRAPH_LAYOUT_NO_BREAK 0x01
00106 #define WPS_PARAGRAPH_LAYOUT_WITH_NEXT 0x02
00107
00108 #define WPS_TAB_LEFT 0x00
00109 #define WPS_TAB_CENTER 0x01
00110 #define WPS_TAB_RIGHT 0x02
00111 #define WPS_TAB_DECIMAL 0x03
00112 #define WPS_TAB_BAR 0x04
00113
00114
00115 #define WPS_PAGE_BREAK 0x00
00116 #define WPS_SOFT_PAGE_BREAK 0x01
00117 #define WPS_COLUMN_BREAK 0x02
00118
00119
00120 #define WPS_LEFT 0x00
00121 #define WPS_RIGHT 0x01
00122 #define WPS_CENTER 0x02
00123 #define WPS_TOP 0x03
00124 #define WPS_BOTTOM 0x04
00125
00126
00127 #define WPS_FIELD_PAGE 1
00128 #define WPS_FIELD_DATE 2
00129 #define WPS_FIELD_TIME 3
00130 #define WPS_FIELD_FILE 4
00131
00132
00133
00134 #define WPS_NUMBERING_NONE 0
00135 #define WPS_NUMBERING_BULLET 1
00136 #define WPS_NUMBERING_NUMBER 2
00137
00138 #define WPS_NUM_STYLE_NONE 0
00139 #define WPS_NUM_STYLE_ARABIC 2
00140 #define WPS_NUM_STYLE_LLATIN 3
00141 #define WPS_NUM_STYLE_ULATIN 4
00142 #define WPS_NUM_STYLE_LROMAN 5
00143 #define WPS_NUM_STYLE_UROMAN 6
00144
00145 std::string getLangFromLCID(uint32_t lcid);
00146
00147
00148
00149 class VersionException
00150 {
00151
00152 };
00153
00154 class FileException
00155 {
00156
00157 };
00158
00159 class ParseException
00160 {
00161
00162 };
00163
00164 class GenericException
00165 {
00166
00167 };
00168
00169
00170
00171 #ifdef DEBUG
00172 std::string to_bits(std::string s);
00173 #endif
00174
00175 #endif