00001
00002
00003
00004
00005
00006
00007
00008
00009 #if !defined(__wordtypes_h)
00010 #define __wordtypes_h 1
00011
00012 #include <time.h>
00013 #if defined(__riscos)
00014 #include "DeskLib:Font.h"
00015 #include "DeskLib:Wimp.h"
00016 #endif
00017
00018 typedef unsigned char UCHAR;
00019 typedef unsigned short USHORT;
00020 typedef unsigned int UINT;
00021 typedef unsigned long ULONG;
00022
00023 #if defined(__riscos)
00024 typedef struct diagram_tag {
00025 drawfile_info tInfo;
00026 window_handle tMainWindow;
00027 window_handle tScaleWindow;
00028 menu_ptr pSaveMenu;
00029 long lXleft;
00030 long lYtop;
00031 size_t tMemorySize;
00032 int iScaleFactorCurr;
00033 int iScaleFactorTemp;
00034 char szFilename[19+1];
00035 } diagram_type;
00036 #else
00037 typedef struct diagram_tag {
00038 FILE *pOutFile;
00039 long lXleft;
00040 long lYtop;
00041 } diagram_type;
00042 typedef UCHAR drawfile_fontref;
00043 #endif
00044
00045 typedef struct output_tag {
00046 char *szStorage;
00047 long lStringWidth;
00048 size_t tStorageSize;
00049 size_t tNextFree;
00050 USHORT usFontStyle;
00051 USHORT usFontSize;
00052 UCHAR ucFontColor;
00053 drawfile_fontref tFontRef;
00054 struct output_tag *pPrev;
00055 struct output_tag *pNext;
00056 } output_type;
00057
00058
00059 typedef enum conversion_tag {
00060 conversion_unknown = 0,
00061 conversion_text,
00062 conversion_draw,
00063 conversion_ps,
00064 conversion_xml,
00065 conversion_pdf,
00066 conversion_fmt_text
00067 } conversion_type;
00068
00069
00070 typedef enum encoding_tag {
00071 encoding_neutral = 100,
00072 encoding_latin_1 = 801,
00073 encoding_latin_2 = 802,
00074 encoding_cyrillic = 805,
00075 encoding_utf_8 = 1601
00076 } encoding_type;
00077
00078
00079 typedef struct font_table_tag {
00080 USHORT usFontStyle;
00081 UCHAR ucWordFontNumber;
00082 UCHAR ucFFN;
00083 UCHAR ucEmphasis;
00084 UCHAR ucInUse;
00085 char szWordFontname[65];
00086 char szOurFontname[33];
00087 } font_table_type;
00088
00089
00090 typedef enum image_level_tag {
00091 level_gs_special = 0,
00092 level_no_images,
00093 level_ps_2,
00094 level_ps_3,
00095 level_default = level_ps_2
00096 } image_level_enum;
00097
00098 typedef struct options_tag {
00099 int iParagraphBreak;
00100 conversion_type eConversionType;
00101 BOOL bHideHiddenText;
00102 BOOL bRemoveRemovedText;
00103 BOOL bUseLandscape;
00104 encoding_type eEncoding;
00105 int iPageHeight;
00106 int iPageWidth;
00107 image_level_enum eImageLevel;
00108 #if defined(__riscos)
00109 BOOL bAutofiletypeAllowed;
00110 int iScaleFactor;
00111 #endif
00112 } options_type;
00113
00114
00115 typedef struct pps_tag {
00116 ULONG ulSB;
00117 ULONG ulSize;
00118 } pps_type;
00119 typedef struct pps_info_tag {
00120 pps_type tWordDocument;
00121 pps_type tData;
00122 pps_type tTable;
00123 pps_type tSummaryInfo;
00124 pps_type tDocSummaryInfo;
00125 pps_type t0Table;
00126 pps_type t1Table;
00127 } pps_info_type;
00128
00129
00130 typedef struct data_block_tag {
00131 ULONG ulFileOffset;
00132 ULONG ulDataPos;
00133 ULONG ulLength;
00134 } data_block_type;
00135
00136
00137 typedef struct text_block_tag {
00138 ULONG ulFileOffset;
00139 ULONG ulCharPos;
00140 ULONG ulLength;
00141 BOOL bUsesUnicode;
00142 USHORT usPropMod;
00143 } text_block_type;
00144
00145
00146 typedef struct document_block_tag {
00147 time_t tCreateDate;
00148 time_t tRevisedDate;
00149 USHORT usDefaultTabWidth;
00150 UCHAR ucHdrFtrSpecification;
00151 } document_block_type;
00152
00153
00154 typedef struct row_block_tag {
00155 ULONG ulFileOffsetStart;
00156 ULONG ulFileOffsetEnd;
00157 ULONG ulCharPosStart;
00158 ULONG ulCharPosEnd;
00159 short asColumnWidth[TABLE_COLUMN_MAX+1];
00160 UCHAR ucNumberOfColumns;
00161 UCHAR ucBorderInfo;
00162 } row_block_type;
00163
00164
00165 typedef enum level_type_tag {
00166 level_type_none = 0,
00167 level_type_outline,
00168 level_type_numbering,
00169 level_type_sequence,
00170 level_type_pause
00171 } level_type_enum;
00172
00173 typedef enum list_id_tag {
00174 no_list = 0,
00175 text_list,
00176 footnote_list,
00177 hdrftr_list,
00178 macro_list,
00179 annotation_list,
00180 endnote_list,
00181 textbox_list,
00182 hdrtextbox_list,
00183 end_of_lists
00184 } list_id_enum;
00185
00186
00187 typedef struct style_block_tag {
00188 ULONG ulFileOffset;
00189 list_id_enum eListID;
00190 BOOL bNumPause;
00191 BOOL bNoRestart;
00192 USHORT usIstd;
00193 USHORT usIstdNext;
00194 USHORT usStartAt;
00195 USHORT usBeforeIndent;
00196 USHORT usAfterIndent;
00197 USHORT usListIndex;
00198 USHORT usListChar;
00199 short sLeftIndent;
00200 short sLeftIndent1;
00201 short sRightIndent;
00202 UCHAR ucAlignment;
00203 UCHAR ucNFC;
00204 UCHAR ucNumLevel;
00205 UCHAR ucListLevel;
00206 char szListChar[4];
00207 } style_block_type;
00208
00209
00210 typedef struct font_block_tag {
00211 ULONG ulFileOffset;
00212 USHORT usFontStyle;
00213 USHORT usFontSize;
00214 UCHAR ucFontNumber;
00215 UCHAR ucFontColor;
00216 } font_block_type;
00217
00218
00219 typedef struct picture_block_tag {
00220 ULONG ulFileOffset;
00221 ULONG ulFileOffsetPicture;
00222 ULONG ulPictureOffset;
00223 } picture_block_type;
00224
00225
00226 typedef struct section_block_tag {
00227 BOOL bNewPage;
00228 USHORT usNeedPrevLvl;
00229 USHORT usHangingIndent;
00230 UCHAR aucNFC[9];
00231 UCHAR ucHdrFtrSpecification;
00232 } section_block_type;
00233
00234
00235 typedef struct hdrftr_block_tag {
00236 output_type *pText;
00237 long lHeight;
00238 } hdrftr_block_type;
00239
00240
00241 typedef struct footnote_block_tag {
00242 char *szText;
00243 } footnote_block_type;
00244
00245
00246 typedef struct list_block_tag {
00247 ULONG ulStartAt;
00248 BOOL bNoRestart;
00249 USHORT usListChar;
00250 short sLeftIndent;
00251 UCHAR ucNFC;
00252 } list_block_type;
00253
00254
00255 typedef enum imagetype_tag {
00256 imagetype_is_unknown = 0,
00257 imagetype_is_external,
00258 imagetype_is_emf,
00259 imagetype_is_wmf,
00260 imagetype_is_pict,
00261 imagetype_is_jpeg,
00262 imagetype_is_png,
00263 imagetype_is_dib
00264 } imagetype_enum;
00265
00266
00267 typedef enum compression_tag {
00268 compression_unknown = 0,
00269 compression_none,
00270 compression_rle4,
00271 compression_rle8,
00272 compression_jpeg,
00273 compression_zlib
00274 } compression_enum;
00275
00276
00277 typedef struct imagedata_tag {
00278
00279 imagetype_enum eImageType;
00280
00281 size_t tPosition;
00282 size_t tLength;
00283 int iHorSizeScaled;
00284 int iVerSizeScaled;
00285
00286 int iWidth;
00287 int iHeight;
00288 int iComponents;
00289 UINT uiBitsPerComponent;
00290 BOOL bAdobe;
00291 compression_enum eCompression;
00292 BOOL bColorImage;
00293 int iColorsUsed;
00294 UCHAR aucPalette[256][3];
00295 } imagedata_type;
00296
00297 typedef enum row_info_tag {
00298 found_nothing,
00299 found_a_cell,
00300 found_not_a_cell,
00301 found_end_of_row,
00302 found_not_end_of_row
00303 } row_info_enum;
00304
00305 typedef enum notetype_tag {
00306 notetype_is_footnote,
00307 notetype_is_endnote,
00308 notetype_is_unknown
00309 } notetype_enum;
00310
00311 typedef enum image_info_tag {
00312 image_no_information,
00313 image_minimal_information,
00314 image_full_information
00315 } image_info_enum;
00316
00317 #endif