1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 #ifndef W1STRUCT_HXX 25 #define W1STRUCT_HXX 26 27 // star view 28 #include <string.h> 29 #include <tools/solar.h> 30 31 class Ww1Shell; 32 class Ww1Manager; 33 34 struct W1_FIB ///////////////////////////////////////////////////////// 35 { 36 SVBT16 wIdent;// 0x0 int magic number wIdentGetW1_FIB37 sal_uInt16 wIdentGet() { 38 return SVBT16ToShort(wIdent); } 39 SVBT16 nFib;// 0x2 FIB version written nFibGetW1_FIB40 sal_uInt16 nFibGet() { 41 return SVBT16ToShort(nFib); } 42 SVBT16 nProduct;// 0x4 product version written by nProductGetW1_FIB43 sal_uInt16 nProductGet() { 44 return SVBT16ToShort(nProduct); } 45 SVBT16 nlocale;// 0x6 language stamp---localized version; nlocaleGetW1_FIB46 sal_uInt16 nlocaleGet() { 47 return SVBT16ToShort(nlocale); } 48 SVBT16 pnNext;// 0x8 pnNextGetW1_FIB49 sal_uInt16 pnNextGet() { 50 return SVBT16ToShort(pnNext); } 51 SVBT16 fFlags; fFlagsGetW1_FIB52 sal_uInt16 fFlagsGet() { 53 return SVBT16ToShort(fFlags); } 54 // SVBT16 fDot :1;// 0xa 0001 fDotGetW1_FIB55 sal_Bool fDotGet() { 56 return 0 != ((fFlagsGet() >> 0) & 1); } 57 // SVBT16 fGlsy :1;// 0002 fGlsyGetW1_FIB58 sal_Bool fGlsyGet() { 59 return 0 != ((fFlagsGet() >> 1) & 1); } 60 // SVBT16 fComplex :1;// 0004 when 1, file is in complex, fast-saved format. fComplexGetW1_FIB61 sal_Bool fComplexGet() { 62 return 0 != ((fFlagsGet() >> 2) & 1); } 63 // SVBT16 fHasPic :1;// 0008 file contains 1 or more pictures fHasPicGetW1_FIB64 sal_Bool fHasPicGet() { 65 return 0 != ((fFlagsGet() >> 3) & 1); } 66 // SVBT16 cQuickSaves :4;// 00F0 count of times file was quicksaved cQuickSavesGetW1_FIB67 sal_uInt16 cQuickSavesGet() { 68 return (sal_uInt16)((fFlagsGet() >> 4) & 0xf); } 69 // SVBT16 u1 :8;// FF00 unused u1GetW1_FIB70 sal_uInt16 u1Get() { 71 return (sal_uInt16)((fFlagsGet() >> 8) & 0xff); } 72 SVBT16 nFibBack;// 0xc nFibBackGetW1_FIB73 sal_uInt16 nFibBackGet() { 74 return SVBT16ToShort(nFibBack); } 75 SVBT16 u2[5];// 0xe reserved 76 SVBT32 fcMin;// 0x18 file offset of first character of text fcMinGetW1_FIB77 sal_uLong fcMinGet() { 78 return SVBT32ToUInt32(fcMin); } 79 SVBT32 fcMac;// 0x1c file offset of last character of text + 1 fcMacGetW1_FIB80 sal_uLong fcMacGet() { 81 return SVBT32ToUInt32(fcMac); } 82 SVBT32 cbMac;// 0x20 file offset of last byte written to file + 1. cbMacGetW1_FIB83 sal_uLong cbMacGet() { 84 return SVBT32ToUInt32(cbMac); } 85 SVBT32 u4[4];// 0x24 reserved 86 SVBT32 ccpText;// 0x34 length of main document text stream ccpTextGetW1_FIB87 sal_uLong ccpTextGet() { 88 return SVBT32ToUInt32(ccpText); } 89 SVBT32 ccpFtn;// 0x38 length of footnote subdocument text stream ccpFtnGetW1_FIB90 sal_uLong ccpFtnGet() { 91 return SVBT32ToUInt32(ccpFtn); } 92 SVBT32 ccpHdd;// 0x3c length of header subdocument text stream ccpHddGetW1_FIB93 sal_uLong ccpHddGet() { 94 return SVBT32ToUInt32(ccpHdd); } 95 SVBT32 ccpMcr;// 0x40 length of macro subdocument text stream ccpMcrGetW1_FIB96 sal_uLong ccpMcrGet() { 97 return SVBT32ToUInt32(ccpMcr); } 98 SVBT32 ccpAtn;// 0x44 length of annotation subdocument text stream ccpAtnGetW1_FIB99 sal_uLong ccpAtnGet() { 100 return SVBT32ToUInt32(ccpAtn); } 101 SVBT32 cp5[4];// 0x48 102 SVBT32 fcStshfOrig;// 0x58 file offset of original allocation for STSH in file fcStshfOrigGetW1_FIB103 sal_uLong fcStshfOrigGet() { 104 return SVBT32ToUInt32(fcStshfOrig); } 105 SVBT16 cbStshfOrig;// 0x5c count of bytes of original STSH allocation cbStshfOrigGetW1_FIB106 sal_uInt16 cbStshfOrigGet() { 107 return SVBT16ToShort(cbStshfOrig); } 108 SVBT32 fcStshf;// 0x5e file offset of STSH in file. fcStshfGetW1_FIB109 sal_uLong fcStshfGet() { 110 return SVBT32ToUInt32(fcStshf); } 111 SVBT16 cbStshf;// 0x62 count of bytes of current STSH allocation cbStshfGetW1_FIB112 sal_uInt16 cbStshfGet() { 113 return SVBT16ToShort(cbStshf); } 114 SVBT32 fcPlcffndRef;// 0x64 file offset of footnote reference PLC. fcPlcffndRefGetW1_FIB115 sal_uLong fcPlcffndRefGet() { 116 return SVBT32ToUInt32(fcPlcffndRef); } 117 SVBT16 cbPlcffndRef;// 0x68 count of bytes of footnote reference PLC cbPlcffndRefGetW1_FIB118 sal_uInt16 cbPlcffndRefGet() { 119 return SVBT16ToShort(cbPlcffndRef); } 120 // == 0 if no footnotes defined in document. 121 122 SVBT32 fcPlcffndTxt;// 0x6a file offset of footnote text PLC. fcPlcffndTxtGetW1_FIB123 sal_uLong fcPlcffndTxtGet() { 124 return SVBT32ToUInt32(fcPlcffndTxt); } 125 SVBT16 cbPlcffndTxt;// 0x6e count of bytes of footnote text PLC. cbPlcffndTxtGetW1_FIB126 sal_uInt16 cbPlcffndTxtGet() { 127 return SVBT16ToShort(cbPlcffndTxt); } 128 // == 0 if no footnotes defined in document 129 130 SVBT32 fcPlcfandRef;// 0x70 file offset of annotation reference PLC. fcPlcfandRefGetW1_FIB131 sal_uLong fcPlcfandRefGet() { 132 return SVBT32ToUInt32(fcPlcfandRef); } 133 SVBT16 cbPlcfandRef;// 0x74 count of bytes of annotation reference PLC. cbPlcfandRefGetW1_FIB134 sal_uInt16 cbPlcfandRefGet() { 135 return SVBT16ToShort(cbPlcfandRef); } 136 137 SVBT32 fcPlcfandTxt;// 0x76 file offset of annotation text PLC. fcPlcfandTxtGetW1_FIB138 sal_uLong fcPlcfandTxtGet() { 139 return SVBT32ToUInt32(fcPlcfandTxt); } 140 SVBT16 cbPlcfandTxt;// 0x7a count of bytes of the annotation text PLC cbPlcfandTxtGetW1_FIB141 sal_uInt16 cbPlcfandTxtGet() { 142 return SVBT16ToShort(cbPlcfandTxt); } 143 144 SVBT32 fcPlcfsed;// 8x7c file offset of section descriptor PLC. fcPlcfsedGetW1_FIB145 sal_uLong fcPlcfsedGet() { 146 return SVBT32ToUInt32(fcPlcfsed); } 147 SVBT16 cbPlcfsed;// 0x80 count of bytes of section descriptor PLC. cbPlcfsedGetW1_FIB148 sal_uInt16 cbPlcfsedGet() { 149 return SVBT16ToShort(cbPlcfsed); } 150 151 SVBT32 fcPlcfpgd;// 0x82 file offset of paragraph descriptor PLC fcPlcfpgdGetW1_FIB152 sal_uLong fcPlcfpgdGet() { 153 return SVBT32ToUInt32(fcPlcfpgd); } 154 SVBT16 cbPlcfpgd;// 0x86 count of bytes of paragraph descriptor PLC. cbPlcfpgdGetW1_FIB155 sal_uInt16 cbPlcfpgdGet() { 156 return SVBT16ToShort(cbPlcfpgd); } 157 // ==0 if file was never repaginated 158 // Should not be written by third party creators 159 160 SVBT32 fcPlcfphe;// 0x88 file offset of PLC of paragraph heights. fcPlcfpheGetW1_FIB161 sal_uLong fcPlcfpheGet() { 162 return SVBT32ToUInt32(fcPlcfphe); } 163 SVBT16 cbPlcfphe;// 0x8c count of bytes of paragraph height PLC. cbPlcfpheGetW1_FIB164 sal_uInt16 cbPlcfpheGet() { 165 return SVBT16ToShort(cbPlcfphe); } 166 // ==0 when file is non-complex. 167 168 SVBT32 fcSttbfglsy;// 0x8e file offset of glossary string table. fcSttbfglsyGetW1_FIB169 sal_uLong fcSttbfglsyGet() { 170 return SVBT32ToUInt32(fcSttbfglsy); } 171 SVBT16 cbSttbfglsy;// 0x92 count of bytes of glossary string table. cbSttbfglsyGetW1_FIB172 sal_uInt16 cbSttbfglsyGet() { 173 return SVBT16ToShort(cbSttbfglsy); } 174 // == 0 for non-glossary documents. 175 // !=0 for glossary documents. 176 177 SVBT32 fcPlcfglsy;// 0x94 file offset of glossary PLC. fcPlcfglsyGetW1_FIB178 sal_uLong fcPlcfglsyGet() { 179 return SVBT32ToUInt32(fcPlcfglsy); } 180 SVBT16 cbPlcfglsy;// 0x98 count of bytes of glossary PLC. cbPlcfglsyGetW1_FIB181 sal_uInt16 cbPlcfglsyGet() { 182 return SVBT16ToShort(cbPlcfglsy); } 183 // == 0 for non-glossary documents. 184 // !=0 for glossary documents. 185 186 SVBT32 fcPlcfhdd;// 0x9a byte offset of header PLC. fcPlcfhddGetW1_FIB187 sal_uLong fcPlcfhddGet() { 188 return SVBT32ToUInt32(fcPlcfhdd); } 189 SVBT16 cbPlcfhdd;// 0x9e count of bytes of header PLC. cbPlcfhddGetW1_FIB190 sal_uInt16 cbPlcfhddGet() { 191 return SVBT16ToShort(cbPlcfhdd); } 192 // == 0 if document contains no headers 193 194 SVBT32 fcPlcfbteChpx;// 0xa0 file offset of character property bin table.PLC. fcPlcfbteChpxGetW1_FIB195 sal_uLong fcPlcfbteChpxGet() { 196 return SVBT32ToUInt32(fcPlcfbteChpx); } 197 SVBT16 cbPlcfbteChpx;// 0xa4 count of bytes of character property bin table PLC. cbPlcfbteChpxGetW1_FIB198 sal_uInt16 cbPlcfbteChpxGet() { 199 return SVBT16ToShort(cbPlcfbteChpx); } 200 201 SVBT32 fcPlcfbtePapx;// 0xa6 file offset of paragraph property bin table.PLC. fcPlcfbtePapxGetW1_FIB202 sal_uLong fcPlcfbtePapxGet() { 203 return SVBT32ToUInt32(fcPlcfbtePapx); } 204 SVBT16 cbPlcfbtePapx;// 0xaa count of bytes of paragraph property bin table PLC. cbPlcfbtePapxGetW1_FIB205 sal_uInt16 cbPlcfbtePapxGet() { 206 return SVBT16ToShort(cbPlcfbtePapx); } 207 208 SVBT32 fcPlcfsea;// 0xac file offset of PLC reserved for private use. The SEA is 6 bytes long. fcPlcfseaGetW1_FIB209 sal_uLong fcPlcfseaGet() { 210 return SVBT32ToUInt32(fcPlcfsea); } 211 SVBT16 cbPlcfsea;// 0xb0 count of bytes of private use PLC. cbPlcfseaGetW1_FIB212 sal_uInt16 cbPlcfseaGet() { 213 return SVBT16ToShort(cbPlcfsea); } 214 215 SVBT32 fcSttbfffn;// 0xb2 file offset of font information STTBF. See the FFN file structure definition. fcSttbfffnGetW1_FIB216 sal_uLong fcSttbfffnGet() { 217 return SVBT32ToUInt32(fcSttbfffn); } 218 SVBT16 cbSttbfffn;// 0xb6 count of bytes in sttbfffn. cbSttbfffnGetW1_FIB219 sal_uInt16 cbSttbfffnGet() { 220 return SVBT16ToShort(cbSttbfffn); } 221 222 SVBT32 fcPlcffldMom;// 0xb8 offset in doc stream to the PLC of field positions in the main document. fcPlcffldMomGetW1_FIB223 sal_uLong fcPlcffldMomGet() { 224 return SVBT32ToUInt32(fcPlcffldMom); } 225 SVBT16 cbPlcffldMom;// 0xbc cbPlcffldMomGetW1_FIB226 sal_uInt16 cbPlcffldMomGet() { 227 return SVBT16ToShort(cbPlcffldMom); } 228 229 SVBT32 fcPlcffldHdr;// 0xbe offset in doc stream to the PLC of field positions in the header subdocument. fcPlcffldHdrGetW1_FIB230 sal_uLong fcPlcffldHdrGet() { 231 return SVBT32ToUInt32(fcPlcffldHdr); } 232 SVBT16 cbPlcffldHdr;// 0xc2 cbPlcffldHdrGetW1_FIB233 sal_uInt16 cbPlcffldHdrGet() { 234 return SVBT16ToShort(cbPlcffldHdr); } 235 236 SVBT32 fcPlcffldFtn;// 0xc4 offset in doc stream to the PLC of field positions in the footnote subdocument. fcPlcffldFtnGetW1_FIB237 sal_uLong fcPlcffldFtnGet() { 238 return SVBT32ToUInt32(fcPlcffldFtn); } 239 SVBT16 cbPlcffldFtn;// 0xc8 cbPlcffldFtnGetW1_FIB240 sal_uInt16 cbPlcffldFtnGet() { 241 return SVBT16ToShort(cbPlcffldFtn); } 242 243 SVBT32 fcPlcffldAtn;// 0xca offset in doc stream to the PLC of field positions in the annotation subdocument. fcPlcffldAtnGetW1_FIB244 sal_uLong fcPlcffldAtnGet() { 245 return SVBT32ToUInt32(fcPlcffldAtn); } 246 SVBT16 cbPlcffldAtn;// 0xce cbPlcffldAtnGetW1_FIB247 sal_uInt16 cbPlcffldAtnGet() { 248 return SVBT16ToShort(cbPlcffldAtn); } 249 250 SVBT32 fcPlcffldMcr;// 0xd0 offset in doc stream to the PLC of field positions in the macro subdocument. fcPlcffldMcrGetW1_FIB251 sal_uLong fcPlcffldMcrGet() { 252 return SVBT32ToUInt32(fcPlcffldMcr); } 253 SVBT16 cbPlcffldMcr;// 0xd4 cbPlcffldMcrGetW1_FIB254 sal_uInt16 cbPlcffldMcrGet() { 255 return SVBT16ToShort(cbPlcffldMcr); } 256 257 SVBT32 fcSttbfbkmk;// 0xd6 offset in document stream of the STTBF that records bookmark names in the main document fcSttbfbkmkGetW1_FIB258 sal_uLong fcSttbfbkmkGet() { 259 return SVBT32ToUInt32(fcSttbfbkmk); } 260 SVBT16 cbSttbfbkmk;// 0xda cbSttbfbkmkGetW1_FIB261 sal_uInt16 cbSttbfbkmkGet() { 262 return SVBT16ToShort(cbSttbfbkmk); } 263 264 SVBT32 fcPlcfbkf;// 0xdc offset in document stream of the PLCF that records the beginning CP offsets of bookmarks in the main document. See BKF fcPlcfbkfGetW1_FIB265 sal_uLong fcPlcfbkfGet() { 266 return SVBT32ToUInt32(fcPlcfbkf); } 267 SVBT16 cbPlcfbkf;// 0xe0 cbPlcfbkfGetW1_FIB268 sal_uInt16 cbPlcfbkfGet() { 269 return SVBT16ToShort(cbPlcfbkf); } 270 271 SVBT32 fcPlcfbkl;// 0xe2 offset in document stream of the PLCF that records the ending CP offsets of bookmarks recorded in the main document. See the BKL structure definition. fcPlcfbklGetW1_FIB272 sal_uLong fcPlcfbklGet() { 273 return SVBT32ToUInt32(fcPlcfbkl); } 274 SVBT16 cbPlcfbkl;// 0xe6 SVBT16 cbPlcfbklGetW1_FIB275 sal_uInt16 cbPlcfbklGet() { 276 return SVBT16ToShort(cbPlcfbkl); } 277 278 SVBT32 fcCmds;// 0xe8 FC fcCmdsGetW1_FIB279 sal_uLong fcCmdsGet() { 280 return SVBT32ToUInt32(fcCmds); } 281 SVBT16 cbCmds;// 0xec cbCmdsGetW1_FIB282 sal_uInt16 cbCmdsGet() { 283 return SVBT16ToShort(cbCmds); } 284 285 SVBT32 fcPlcmcr;// 0xee FC fcPlcmcrGetW1_FIB286 sal_uLong fcPlcmcrGet() { 287 return SVBT32ToUInt32(fcPlcmcr); } 288 SVBT16 cbPlcmcr;// 0xf2 cbPlcmcrGetW1_FIB289 sal_uInt16 cbPlcmcrGet() { 290 return SVBT16ToShort(cbPlcmcr); } 291 292 SVBT32 fcSttbfmcr;// 0xf4 FC fcSttbfmcrGetW1_FIB293 sal_uLong fcSttbfmcrGet() { 294 return SVBT32ToUInt32(fcSttbfmcr); } 295 SVBT16 cbSttbfmcr;// 0xf8 cbSttbfmcrGetW1_FIB296 sal_uInt16 cbSttbfmcrGet() { 297 return SVBT16ToShort(cbSttbfmcr); } 298 299 SVBT32 fcPrEnv;// 0xfa fcPrEnvGetW1_FIB300 sal_uLong fcPrEnvGet() { 301 return SVBT32ToUInt32(fcPrEnv); } 302 SVBT16 cbPrEnv;// 0xfe cbPrEnvGetW1_FIB303 sal_uInt16 cbPrEnvGet() { 304 return SVBT16ToShort(cbPrEnv); } 305 306 SVBT32 fcWss;// 0x100 file offset of Window Save State data structure. See WSS. fcWssGetW1_FIB307 sal_uLong fcWssGet() { 308 return SVBT32ToUInt32(fcWss); } 309 SVBT16 cbWss;// 0x100 count of bytes of WSS. ==0 if unable to store the window state. cbWssGetW1_FIB310 sal_uInt16 cbWssGet() { 311 return SVBT16ToShort(cbWss); } 312 313 SVBT32 fcDop;// 0x106 file offset of document property data structure. fcDopGetW1_FIB314 sal_uLong fcDopGet() { 315 return SVBT32ToUInt32(fcDop); } 316 SVBT16 cbDop;// 0x10a count of bytes of document properties. cbDopGetW1_FIB317 sal_uInt16 cbDopGet() { 318 return SVBT16ToShort(cbDop); } 319 320 321 SVBT32 fcSttbfAssoc;// 0x10c offset to STTBF of associated strings. See STTBFASSOC. fcSttbfAssocGetW1_FIB322 sal_uLong fcSttbfAssocGet() { 323 return SVBT32ToUInt32(fcSttbfAssoc); } 324 SVBT16 cbSttbfAssoc;// 0x110 cbSttbfAssocGetW1_FIB325 sal_uInt16 cbSttbfAssocGet() { 326 return SVBT16ToShort(cbSttbfAssoc); } 327 328 SVBT32 fcClx;// 0x112 file offset of beginning of information for complex files. fcClxGetW1_FIB329 sal_uLong fcClxGet() { 330 return SVBT32ToUInt32(fcClx); } 331 SVBT16 cbClx;// 0x116 count of bytes of complex file information. 0 if file is non-complex. cbClxGetW1_FIB332 sal_uInt16 cbClxGet() { 333 return SVBT16ToShort(cbClx); } 334 335 SVBT32 fcPlcfpgdFtn;// 0x118 file offset of page descriptor PLC for footnote subdocument. fcPlcfpgdFtnGetW1_FIB336 sal_uLong fcPlcfpgdFtnGet() { 337 return SVBT32ToUInt32(fcPlcfpgdFtn); } 338 SVBT16 cbPlcfpgdFtn;// 0x11C count of bytes of page descriptor PLC for footnote subdocument. cbPlcfpgdFtnGetW1_FIB339 sal_uInt16 cbPlcfpgdFtnGet() { 340 return SVBT16ToShort(cbPlcfpgdFtn); } 341 // ==0 if document has not been paginated. The length of the PGD is 8 bytes. 342 343 SVBT32 fcSpare1;// 0x11e file offset of the name of the original file. fcSpare1GetW1_FIB344 sal_uLong fcSpare1Get() { 345 return SVBT32ToUInt32(fcSpare1); } 346 SVBT16 cbSpare1;// 0x122 count of bytes of the name of the original file. cbSpare1GetW1_FIB347 sal_uInt16 cbSpare1Get() { 348 return SVBT16ToShort(cbSpare1); } 349 SVBT32 fcSpare2;// 0x124 file offset of the name of the original file. fcSpare2GetW1_FIB350 sal_uLong fcSpare2Get() { 351 return SVBT32ToUInt32(fcSpare2); } 352 SVBT16 cbSpare2;// 0x128 count of bytes of the name of the original file. cbSpare2GetW1_FIB353 sal_uInt16 cbSpare2Get() { 354 return SVBT16ToShort(cbSpare2); } 355 SVBT32 fcSpare3;// 0x12a file offset of the name of the original file. fcSpare3GetW1_FIB356 sal_uLong fcSpare3Get() { 357 return SVBT32ToUInt32(fcSpare3); } 358 SVBT16 cbSpare3;// 0x12e count of bytes of the name of the original file. cbSpare3GetW1_FIB359 sal_uInt16 cbSpare3Get() { 360 return SVBT16ToShort(cbSpare3); } 361 SVBT32 fcSpare4;// 0x130 file offset of the name of the original file. fcSpare4GetW1_FIB362 sal_uLong fcSpare4Get() { 363 return SVBT32ToUInt32(fcSpare4); } 364 SVBT16 cbSpare4;// 0x134 count of bytes of the name of the original file. cbSpare4GetW1_FIB365 sal_uInt16 cbSpare4Get() { 366 return SVBT16ToShort(cbSpare4); } 367 368 SVBT16 cpnBteChp;// 0x18E count of CHPX FKPs recorded in file. In non-complex files if the number of cpnBteChpGetW1_FIB369 sal_uInt16 cpnBteChpGet() { 370 return SVBT16ToShort(cpnBteChp); } 371 // entries in the plcfbteChpx is less than this, the plcfbteChpx is incomplete. 372 SVBT16 cpnBtePap;// 0x190 count of PAPX FKPs recorded in file. In non-complex files if the number of cpnBtePapGetW1_FIB373 sal_uInt16 cpnBtePapGet() { 374 return SVBT16ToShort(cpnBtePap); } 375 // entries in the plcfbtePapx is less than this, the plcfbtePapx is incomplete. 376 }; 377 378 struct W1_DOP ///////////////////////////////////// Document Properties 379 { 380 SVBT16 fFlags; fFlagsGetW1_DOP381 sal_uInt16 fFlagsGet() { 382 return SVBT16ToShort(fFlags); } 383 // SVBT16 fFacingPages : 1;// 1 when facing pages should be printed fFacingPagesGetW1_DOP384 sal_Bool fFacingPagesGet() { 385 return 0 != ((fFlagsGet() >> 0) & 1); } 386 // SVBT16 fWidowControl : 1;// 1 when widow control is in effect. 0 when widow control disabled. fWidowControlGetW1_DOP387 sal_Bool fWidowControlGet() { 388 return 0 != ((fFlagsGet() >> 1) & 1); } 389 // SVBT16 : 3;// unused 390 // SVBT16 fpc : 2;// 1 footnote position code: 0 as endnotes, 1 at bottom of page, 2 immediately beneath text fpcGetW1_DOP391 sal_uInt16 fpcGet() { 392 return (sal_uInt16)((fFlagsGet() >> 5) & 3); } 393 // SVBT16 fWide : 1;// Landscape fWideGetW1_DOP394 sal_Bool fWideGet() { 395 return 0 != ((fFlagsGet() >> 7) & 1); } 396 // SVBT16 grpfIhdt : 8;// 0 specification of document headers and footers. See explanation under Headers and Footers topic. grpfIhdtGetW1_DOP397 sal_uInt16 grpfIhdtGet() { 398 return (sal_uInt16)((fFlagsGet() >> 8) & 0xff); } 399 SVBT16 fFtnFlags; fFtnFlagsGetW1_DOP400 sal_uInt16 fFtnFlagsGet() { 401 return SVBT16ToShort(fFtnFlags); } 402 // SVBT16 fFtnRestart : 1; fFtnRestartGetW1_DOP403 sal_Bool fFtnRestartGet() { 404 return 0 != ((fFtnFlagsGet() >> 0) & 1); } 405 // SVBT16 nFtn : 15;// 1 initial footnote number for document nFtnGetW1_DOP406 sal_uInt16 nFtnGet() { 407 return (sal_uInt16)((fFtnFlagsGet() >> 1) & 0x7fff); } 408 SVBT16 fRvsFlags; fRvsFlagsGetW1_DOP409 sal_uInt16 fRvsFlagsGet() { 410 return SVBT16ToShort(fRvsFlags); } 411 // SVBT16 irmBar : 8; irmBarGetW1_DOP412 sal_uInt16 irmBarGet() { 413 return (sal_uInt16)((fRvsFlagsGet() >> 0) & 0xff); } 414 // SVBT16 irmProps : 7; irmPropsGetW1_DOP415 sal_uInt16 irmPropsGet() { 416 return (sal_uInt16)((fRvsFlagsGet() >> 8) & 0x7f); } 417 // SVBT16 fRevMarking : 1;// when 1, Word will mark revisions as the document is edited fRevMarkingGetW1_DOP418 sal_Bool fRevMarkingGet() { 419 return 0 != ((fRvsFlagsGet() >> 15) & 1); } 420 SVBT16 fSveFlags; fSveFlagsGetW1_DOP421 sal_uInt16 fSveFlagsGet() { 422 return SVBT16ToShort(fSveFlags); } 423 // SVBT16 fBackup : 1;// always make backup when document saved when 1. fBackupGetW1_DOP424 sal_Bool fBackupGet() { 425 return 0 != ((fSveFlagsGet() >> 0) & 1); } 426 // SVBT16 fExactCWords : 1; fExactCWordsGetW1_DOP427 sal_Bool fExactCWordsGet() { 428 return 0 != ((fSveFlagsGet() >> 1) & 1); } 429 // SVBT16 fPagHidden : 1;// fPagHiddenGetW1_DOP430 sal_Bool fPagHiddenGet() { 431 return 0 != ((fSveFlagsGet() >> 2) & 1); } 432 // SVBT16 fPagResults : 1; fPagResultsGetW1_DOP433 sal_Bool fPagResultsGet() { 434 return 0 != ((fSveFlagsGet() >> 3) & 1); } 435 // SVBT16 fLockAtn : 1;// when 1, annotations are locked for editing fLockAtnGetW1_DOP436 sal_Bool fLockAtnGet() { 437 return 0 != ((fSveFlagsGet() >> 4) & 1); } 438 // SVBT16 fMirrorMargins : 1;// swap margins on left/right pages when 1. fMirrorMarginsGetW1_DOP439 sal_Bool fMirrorMarginsGet() { 440 return 0 != ((fSveFlagsGet() >> 5) & 1); } 441 // SVBT16 : 10;// unused 442 SVBT16 fSpares; fSparesGetW1_DOP443 sal_uInt16 fSparesGet() { 444 return SVBT16ToShort(fSpares); } 445 SVBT16 yaPage; yaPageGetW1_DOP446 sal_uInt16 yaPageGet() { 447 return SVBT16ToShort(yaPage); } 448 SVBT16 xaPage; xaPageGetW1_DOP449 sal_uInt16 xaPageGet() { 450 return SVBT16ToShort(xaPage); } 451 SVBT16 dyaTop; dyaTopGetW1_DOP452 sal_uInt16 dyaTopGet() { 453 return SVBT16ToShort(dyaTop); } 454 SVBT16 dxaLeft; dxaLeftGetW1_DOP455 sal_uInt16 dxaLeftGet() { 456 return SVBT16ToShort(dxaLeft); } 457 SVBT16 dyaBottom; dyaBottomGetW1_DOP458 sal_uInt16 dyaBottomGet() { 459 return SVBT16ToShort(dyaBottom); } 460 SVBT16 dxaRight; dxaRightGetW1_DOP461 sal_uInt16 dxaRightGet() { 462 return SVBT16ToShort(dxaRight); } 463 SVBT16 dxaGutter; dxaGutterGetW1_DOP464 sal_uInt16 dxaGutterGet() { 465 return SVBT16ToShort(dxaGutter); } 466 SVBT16 dxaTab;// 720 twips default tab width dxaTabGetW1_DOP467 sal_uInt16 dxaTabGet() { 468 return SVBT16ToShort(dxaTab); } 469 SVBT16 wSpare;// wSpareGetW1_DOP470 sal_uInt16 wSpareGet() { 471 return SVBT16ToShort(wSpare); } 472 SVBT16 dxaHotZ;// width of hyphenation hot zone measured in twips dxaHotZGetW1_DOP473 sal_uInt16 dxaHotZGet() { 474 return SVBT16ToShort(dxaHotZ); } 475 SVBT16 rgwSpare[2];// reserved 476 SVBT32 dttmCreated;// DTTM date and time document was created dttmCreatedGetW1_DOP477 sal_uLong dttmCreatedGet() { 478 return SVBT32ToUInt32(dttmCreated); } 479 SVBT32 dttmRevised;// DTTM date and time document was last revised dttmRevisedGetW1_DOP480 sal_uLong dttmRevisedGet() { 481 return SVBT32ToUInt32(dttmRevised); } 482 SVBT32 dttmLastPrint;// DTTM date and time document was last printed dttmLastPrintGetW1_DOP483 sal_uLong dttmLastPrintGet() { 484 return SVBT32ToUInt32(dttmLastPrint); } 485 SVBT16 nRevision;// number of times document has been revised since its creation nRevisionGetW1_DOP486 sal_uInt16 nRevisionGet() { 487 return SVBT16ToShort(nRevision); } 488 SVBT32 tmEdited;// time document was last edited tmEditedGetW1_DOP489 sal_uLong tmEditedGet() { 490 return SVBT32ToUInt32(tmEdited); } 491 SVBT32 cWords;// count of words tallied by last Word Count execution cWordsGetW1_DOP492 sal_uLong cWordsGet() { 493 return SVBT32ToUInt32(cWords); } 494 SVBT32 cCh;// count of characters tallied by last Word Count execution cChGetW1_DOP495 sal_uLong cChGet() { 496 return SVBT32ToUInt32(cCh); } 497 SVBT16 cPg;// count of pages tallied by last Word Count execution cPgGetW1_DOP498 sal_uInt16 cPgGet() { 499 return SVBT16ToShort(cPg); } 500 SVBT16 rgwSpareDocSum[2]; 501 }; 502 // cbDOP is 66. 503 504 struct W1_CHP ///////////////////////////////////////////////////////// 505 { 506 SVBT16 fChar; 507 SVBT16 ftc;// Font Code 508 SVBT8 hps;// Font size in half points 509 SVBT8 hpsPos;// Sub/Superscript ( signed number, 0 = normal ) 510 SVBT16 fText; 511 SVBT32 fcPic;// not stored in File 512 SVBT8 fnPic;// internal 513 SVBT16 hpsLargeChp;// ??? 514 W1_CHPW1_CHP515 W1_CHP() { memset( this, 0, sizeof( *this)); } 516 fCharGetW1_CHP517 sal_uInt16 fCharGet() { return SVBT16ToShort(fChar); } fCharSetW1_CHP518 void fCharSet(sal_uInt16 n) { ShortToSVBT16(n, fChar); } fBoldGetW1_CHP519 sal_Bool fBoldGet() { return 0 != ((fCharGet() >> 0) & 1); } fBoldSetW1_CHP520 void fBoldSet(sal_Bool b) { fCharSet( ( fCharGet() & 0xfffe ) | ( b << 0 ) ); } fItalicGetW1_CHP521 sal_Bool fItalicGet() { return 0 != ((fCharGet() >> 1) & 1); } fItalicSetW1_CHP522 void fItalicSet(sal_Bool b) { fCharSet( ( fCharGet() & 0xfffd ) | ( b << 1 ) ); } fStrikeGetW1_CHP523 sal_Bool fStrikeGet() { return 0 != ((fCharGet() >> 2) & 1); } fOutlineGetW1_CHP524 sal_Bool fOutlineGet() { return 0 != ((fCharGet() >> 3) & 1); } fFldVanishGetW1_CHP525 sal_Bool fFldVanishGet() { return 0 != ((fCharGet() >> 4) & 1); } fSmallCapsGetW1_CHP526 sal_Bool fSmallCapsGet() { return 0 != ((fCharGet() >> 5) & 1); } fCapsGetW1_CHP527 sal_Bool fCapsGet() { return 0 != ((fCharGet() >> 6) & 1); } fVanishGetW1_CHP528 sal_Bool fVanishGet() { return 0 != ((fCharGet() >> 7) & 1); } fRMarkGetW1_CHP529 sal_Bool fRMarkGet() { return 0 != ((fCharGet() >> 8) & 1); } fSpecGetW1_CHP530 sal_Bool fSpecGet() { return 0 != ((fCharGet() >> 9) & 1); } fsIcoGetW1_CHP531 sal_Bool fsIcoGet() { return 0 != ((fCharGet() >> 10) & 1); } fsFtcGetW1_CHP532 sal_Bool fsFtcGet() { return 0 != ((fCharGet() >> 11) & 1); } fsFtcSetW1_CHP533 void fsFtcSet(sal_Bool b) { fCharSet( ( fCharGet() & 0xf7ff ) | ( b << 11 ) ); } fsHpsGetW1_CHP534 sal_Bool fsHpsGet() { return 0 != ((fCharGet() >> 12) & 1); } fsHpsSetW1_CHP535 void fsHpsSet(sal_Bool b) { fCharSet( ( fCharGet() & 0xefff ) | ( b << 12 ) ); } fsKulGetW1_CHP536 sal_Bool fsKulGet() { return 0 != ((fCharGet() >> 13) & 1); } fsKulSetW1_CHP537 void fsKulSet(sal_Bool b) { fCharSet( ( fCharGet() & 0xdfff ) | ( b << 13 ) ); } fsPosGetW1_CHP538 sal_Bool fsPosGet() { return 0 != ((fCharGet() >> 14) & 1); } fsSpaceGetW1_CHP539 sal_Bool fsSpaceGet() { return 0 != ((fCharGet() >> 15) & 1); } 540 // SVBT16 fBold :1;// 1 == opposite boldness of style 541 // SVBT16 fItalic :1;// 1 == opposite of style 542 // SVBT16 fStrike :1;// 1 == opposite of style 543 // SVBT16 fOutline :1;// 1 == opposite of style 544 // SVBT16 fFldVanish :1;// 1 == opposite of style 545 // SVBT16 fSmallCaps :1;// 1 == opposite of style 546 // SVBT16 fCaps :1;// 1 == opposite of style 547 // SVBT16 fVanish :1;// 1 == opposite of style 548 // SVBT16 fRMark :1;// ??? 549 // SVBT16 fSpec :1;// 1 == opposite of style 550 // SVBT16 fsIco :1;// 1 == Color (ico) different to style 551 // SVBT16 fsFtc :1;// 1 == FontCode (ftc) different to style 552 // SVBT16 fsHps :1;// 1 == FontSize (hps) different to style 553 // SVBT16 fsKul :1;// 1 == Underline Code (kul) different to style 554 // SVBT16 fsPos :1;// 1 == Char position (hpsPos) different to style 555 // SVBT16 fsSpace :1;// 1 == Char Spacing (qpsSpace) different to style 556 ftcGetW1_CHP557 sal_uInt16 ftcGet() { return SVBT16ToShort(ftc); } ftcSetW1_CHP558 void ftcSet(sal_uInt16 n) { ShortToSVBT16(n, ftc); } hpsSetW1_CHP559 void hpsSet(sal_uInt8 n) { ByteToSVBT8(n, hps); } hpsGetW1_CHP560 sal_uInt8 hpsGet() { return SVBT8ToByte(hps); } 561 hpsPosGetW1_CHP562 sal_uInt8 hpsPosGet() { return SVBT8ToByte(hpsPos); } fTextGetW1_CHP563 sal_uInt16 fTextGet() { return SVBT16ToShort(fText); } fTextSetW1_CHP564 void fTextSet(sal_uInt16 n) { ShortToSVBT16(n, fText); } qpsSpaceGetW1_CHP565 sal_uInt16 qpsSpaceGet() { return (sal_uInt16)((fTextGet() >> 0) & 0x3f); } wSpare2GetW1_CHP566 sal_uInt16 wSpare2Get() { return (sal_uInt16)((fTextGet() >> 6) & 3); } icoGetW1_CHP567 sal_uInt16 icoGet() { return (sal_uInt16)((fTextGet() >> 8) & 0xf); } kulGetW1_CHP568 sal_uInt16 kulGet() { return (sal_uInt16)((fTextGet() >> 12) & 7); } kulSetW1_CHP569 void kulSet(sal_uInt16 n) { fTextSet( ( fTextGet() & 0x8fff ) | ( ( n & 7 ) << 12 ) ); } fSysVanishGetW1_CHP570 sal_Bool fSysVanishGet() { return 0 != ((fTextGet() >> 15) & 1); } 571 // SVBT16 qpsSpace :6;// Char Spacing, -7 .. 56; 57 = -7, 63 = -1 572 // SVBT16 wSpare2 : 2;// reserved 573 // SVBT16 ico :4;// color of Text: 0=black, 1=blue, 2=cyan, 3=green, 4=magenta, 5=red, 6=yellow, 7=white 574 // SVBT16 kul: 3;// Underline code: 0=none, 1=single, 2=by word, 3=double, 4=dotted 575 // SVBT16 fSysVanish: 1;// used internally 576 fcPicGetW1_CHP577 sal_uLong fcPicGet() { return SVBT32ToUInt32(fcPic); } fnPicGetW1_CHP578 sal_uInt16 fnPicGet() { return SVBT8ToByte(fnPic); } hpsLargeChpGetW1_CHP579 sal_uInt16 hpsLargeChpGet() { return SVBT16ToShort(hpsLargeChp); } 580 581 void Out(Ww1Shell&, Ww1Manager&); 582 }; 583 584 struct W1_FFN ///////////////////////////////////////// Font Descriptor 585 { 586 SVBT8 cbFfnM1;// 0x0 total length of FFN - 1. cbFfnM1GetW1_FFN587 sal_uInt16 cbFfnM1Get() { 588 return SVBT8ToByte(cbFfnM1); } 589 SVBT8 fFlags; fFlagsGetW1_FFN590 sal_uInt16 fFlagsGet() { 591 return SVBT8ToByte(fFlags); } 592 // SVBT8 prg : 2;// 0x1:03 pitch request prgGetW1_FFN593 sal_uInt16 prgGet() { 594 return (sal_uInt16)((fFlagsGet() >> 0) & 3); } 595 // SVBT8 fTrueType : 1;// 0x1:04 when 1, font is a TrueType font fTrueTypeGetW1_FFN596 sal_Bool fTrueTypeGet() { 597 return 0 != ((fFlagsGet() >> 2) & 1); } 598 // SVBT8 : 1;// 0x1:08 reserved 599 // SVBT8 ff : 3;// 0x1:70 font family id ffGetW1_FFN600 sal_uInt16 ffGet() { 601 return (sal_uInt16)((fFlagsGet() >> 4) & 7); } 602 // SVBT8 : 1;// 0x1:80 reserved 603 sal_uInt8 szFfn[65];// 0x6 zero terminated string that records name of font. 604 // Vorsicht: Dieses Array kann auch kleiner sein!!! 605 // Possibly followed by a second sz which records the name of an 606 // alternate font to use if the first named font does not exist 607 // on this system. Maximal size of szFfn is 65 characters. szFfnGetW1_FFN608 sal_uInt8* szFfnGet() { return szFfn; } 609 }; 610 611 struct W1_PHE /////////////////////////////////////// Paragraph Height 612 { 613 SVBT16 fFlags; fFlagsGetW1_PHE614 sal_uInt16 fFlagsGet() { 615 return SVBT16ToShort(fFlags); } fSpareGetW1_PHE616 sal_Bool fSpareGet() { 617 return 0 != (fFlagsGet() & 1); } fUnkGetW1_PHE618 sal_Bool fUnkGet() { 619 return 0 != ((fFlagsGet() >> 1) & 1); } fDiffLinesGetW1_PHE620 sal_Bool fDiffLinesGet() { 621 return 0 != ((fFlagsGet() >> 2) & 1); } clMacGetW1_PHE622 sal_uInt8 clMacGet() { 623 return sal::static_int_cast< sal_uInt8, sal_uInt16 >((fFlagsGet() >> 8) & 0xff); } 624 SVBT16 dxaCol; dxaColGetW1_PHE625 sal_uInt16 dxaColGet() { 626 return SVBT16ToShort(dxaCol); } 627 SVBT16 xxx; // beachte die dreifachnutzung.... siehe doc. dylHeightGetW1_PHE628 sal_uInt16 dylHeightGet() { 629 return SVBT16ToShort(xxx); } dylLineGetW1_PHE630 sal_uInt16 dylLineGet() { 631 return SVBT16ToShort(xxx); } fStyleDirtyGetW1_PHE632 sal_uInt16 fStyleDirtyGet() { 633 return SVBT16ToShort(xxx); } 634 }; 635 636 struct W1_PAPX ///////////////////////// Paragraph Property Difference 637 { 638 SVBT8 stc; stcGetW1_PAPX639 sal_uInt8 stcGet() { 640 return SVBT8ToByte(stc); } 641 W1_PHE phe; 642 sal_uInt8 grpprl[1]; grpprlGetW1_PAPX643 sal_uInt8* grpprlGet() { 644 return grpprl; } 645 }; 646 647 struct W1_BRC //////////////////////////////////////////// Border Code 648 { 649 SVBT16 aBits; aBitsGetW1_BRC650 sal_uInt16 aBitsGet() { 651 return SVBT16ToShort(aBits); } 652 // SVBT16 dxpLineWidth : 3;// 0007 When dxpLineWidth is 0, 1, 2, 3, 4, or 5, 653 // this field is the width of a single line of border 654 // in units of 0.75 points Must be nonzero when brcType 655 // is nonzero. 6 == dotted, 7 == dashed. dxpLineWidthGetW1_BRC656 sal_uInt8 dxpLineWidthGet() { 657 return sal::static_int_cast< sal_uInt8, sal_uInt16 >((aBitsGet() >> 0) & 0x0007); } 658 // SVBT16 brcType : 2;// 0018 border type code: 0 == none, 1 == single, 2 == thick, 659 // 3 == double brcTypeGetW1_BRC660 sal_uInt8 brcTypeGet() { 661 return sal::static_int_cast< sal_uInt8, sal_uInt16 >((aBitsGet() >> 3) & 0x0003); } 662 // SVBT16 fShadow : 1;// 0020 when 1, border is drawn with shadow. Must be 0 663 // when BRC is a substructure of the TC fShadowGetW1_BRC664 sal_uInt8 fShadowGet() { 665 return sal::static_int_cast< sal_uInt8, sal_uInt16 >((aBitsGet() >> 5) & 0x0001); } 666 // SVBT16 ico : 5;// 07C0 color code (see chp.ico) icoGetW1_BRC667 sal_uInt8 icoGet() { 668 return sal::static_int_cast< sal_uInt8, sal_uInt16 >((aBitsGet() >> 6) & 0x001f); } 669 // SVBT16 dxpSpace : 5;// F800 width of space to maintain between border and 670 // text within border. Must be 0 when BRC is a 671 // substructure of the TC. Stored in points for Windows. dxpSpaceGetW1_BRC672 sal_uInt8 dxpSpaceGet() { 673 return sal::static_int_cast< sal_uInt8, sal_uInt16 >((aBitsGet() >> 11) & 0x001f); } 674 }; 675 676 struct W1_BRC10 ///////////////////////////////// Border Code Word 1.0 677 { 678 SVBT16 aBits; aBitsGetW1_BRC10679 sal_uInt16 aBitsGet() { 680 return SVBT16ToShort(aBits); } dxpLine2WidthGetW1_BRC10681 sal_uInt8 dxpLine2WidthGet() { 682 return sal::static_int_cast< sal_uInt8, sal_uInt16 >((aBitsGet() >> 0) & 0x0007); } dxpSpaceBetweenGetW1_BRC10683 sal_uInt8 dxpSpaceBetweenGet() { 684 return sal::static_int_cast< sal_uInt8, sal_uInt16 >((aBitsGet() >> 3) & 0x0007); } dxpLine1WidthGetW1_BRC10685 sal_uInt8 dxpLine1WidthGet() { 686 return sal::static_int_cast< sal_uInt8, sal_uInt16 >((aBitsGet() >> 6) & 0x0007); } dxpSpaceGetW1_BRC10687 sal_uInt8 dxpSpaceGet() { 688 return sal::static_int_cast< sal_uInt8, sal_uInt16 >((aBitsGet() >> 9) & 0x001f); } fShadowGetW1_BRC10689 sal_uInt8 fShadowGet() { 690 return sal::static_int_cast< sal_uInt8, sal_uInt16 >((aBitsGet() >> 14) & 0x0001); } fSpareGetW1_BRC10691 sal_uInt8 fSpareGet() { 692 return sal::static_int_cast< sal_uInt8, sal_uInt16 >((aBitsGet() >> 15) & 0x0001); } 693 }; 694 695 struct W1_FLD //////////////////////////////////////// FieldDescriptor 696 { 697 SVBT8 ch; // boundary-type (begin(19), separator (20), end (21)) chGetW1_FLD698 sal_uInt8 chGet() { 699 return SVBT8ToByte(ch); } 700 SVBT8 flt; // field type / flags fltGetW1_FLD701 sal_uInt8 fltGet() { 702 return SVBT8ToByte(flt); } 703 // variant, when ch==21: fDifferGetW1_FLD704 sal_Bool fDifferGet() { 705 return (fltGet() >> 0) & 1; } fResultDirtyGetW1_FLD706 sal_Bool fResultDirtyGet() { 707 return (fltGet() >> 2) & 1; } ResultEditedGetW1_FLD708 sal_Bool ResultEditedGet() { 709 return (fltGet() >> 3) & 1; } fLockedGetW1_FLD710 sal_Bool fLockedGet() { 711 return (fltGet() >> 4) & 1; } fPrivateResultGetW1_FLD712 sal_Bool fPrivateResultGet() { 713 return (fltGet() >> 5) & 1; } fNestedGetW1_FLD714 sal_Bool fNestedGet() { 715 return (fltGet() >> 6) & 1; } 716 }; 717 718 struct W1_PIC /////////////////////////////////////// PictureStructure 719 { 720 SVBT32 lcb;// 0x0 number of bytes in the PIC structure plus size of following picture data which may be a Windows metafile, a bitmap, or the filename of a TIFF file. lcbGetW1_PIC721 sal_uLong lcbGet() { 722 return SVBT32ToUInt32(lcb); } 723 SVBT16 cbHeader;// 0x4 number of bytes in the PIC (to allow for future expansion). cbHeaderGetW1_PIC724 sal_uInt16 cbHeaderGet() { 725 return SVBT16ToShort(cbHeader); } 726 struct MFP { 727 SVBT16 mm;// 0x6 int mmGetW1_PIC::MFP728 sal_uInt16 mmGet() { 729 return SVBT16ToShort(mm); } 730 SVBT16 xExt;// 0x8 int xExtGetW1_PIC::MFP731 sal_uInt16 xExtGet() { 732 return SVBT16ToShort(xExt); } 733 SVBT16 yExt;// 0xa int yExtGetW1_PIC::MFP734 sal_uInt16 yExtGet() { 735 return SVBT16ToShort(yExt); } 736 SVBT16 hMF;// 0xc int hMFGetW1_PIC::MFP737 sal_uInt16 hMFGet() { 738 return SVBT16ToShort(hMF); } 739 } mfp; 740 union W1_MFP_BMP { 741 SVBT8 bm[14];// 0xe BITMAP(14 bytes) Windows bitmap structure when PIC describes a BITMAP. 742 SVBT8 rcWinMF[14];// 0xe rc (rectangle - 8 bytes) rect for window origin and extents when metafile is stored -- ignored if 0 743 } MFP_BMP; 744 SVBT16 dxaGoal;// 0x1c horizontal measurement in twips of the rectangle the picture should be imaged within. dxaGoalGetW1_PIC745 sal_uInt16 dxaGoalGet() { 746 return SVBT16ToShort(dxaGoal); } 747 SVBT16 dyaGoal;// 0x1e vertical measurement in twips of the rectangle the picture should be imaged within. dyaGoalGetW1_PIC748 sal_uInt16 dyaGoalGet() { 749 return SVBT16ToShort(dyaGoal); } 750 SVBT16 mx;// 0x20 horizontal scaling factor supplied by user in .1% units. mxGetW1_PIC751 sal_uInt16 mxGet() { 752 return SVBT16ToShort(mx); } 753 SVBT16 my;// 0x22 vertical scaling factor supplied by user in .1% units. myGetW1_PIC754 sal_uInt16 myGet() { 755 return SVBT16ToShort(my); } 756 SVBT16 dxaCropLeft;// 0x24 the amount the picture has been cropped on the left in twips. dxaCropLeftGetW1_PIC757 sal_uInt16 dxaCropLeftGet() { 758 return SVBT16ToShort(dxaCropLeft); } 759 SVBT16 dyaCropTop;// 0x26 the amount the picture has been cropped on the top in twips. dyaCropTopGetW1_PIC760 sal_uInt16 dyaCropTopGet() { 761 return SVBT16ToShort(dyaCropTop); } 762 SVBT16 dxaCropRight;// 0x28 the amount the picture has been cropped on the right in twips. dxaCropRightGetW1_PIC763 sal_uInt16 dxaCropRightGet() { 764 return SVBT16ToShort(dxaCropRight); } 765 SVBT16 dyaCropBottom;// 0x2a the amount the picture has been cropped on the bottom in twips. dyaCropBottomGetW1_PIC766 sal_uInt16 dyaCropBottomGet() { 767 return SVBT16ToShort(dyaCropBottom); } 768 SVBT16 flags; flagsGetW1_PIC769 sal_uInt16 flagsGet() { 770 return SVBT16ToShort(flags); } 771 // brcl : 4;// 000F Obsolete, superseded by brcTop, etc. In brclGetW1_PIC772 sal_uInt8 brclGet() { 773 return sal::static_int_cast< sal_uInt8, sal_uInt16 >(flagsGet() & 0xf); } 774 // fFrameEmpty : 1;// 0010 picture consists of a single frame fFrameEmptyGetW1_PIC775 sal_Bool fFrameEmptyGet() { 776 return sal::static_int_cast< sal_uInt8, sal_uInt16 >((flagsGet() >> 4) & 1); } 777 // win6 stuff: 778 // fBitmap : 1;// 0020 ==1, when picture is just a bitmap 779 // sal_Bool fBitmapGet() { 780 // return (flagsGet() >> 5) & 1; } 781 // fDrawHatch : 1;// 0040 ==1, when picture is an active OLE object 782 // sal_Bool fDrawHatchGet() { 783 // return (flagsGet() >> 6) & 1; } 784 // fError : 1;// 0080 ==1, when picture is just an error message 785 // sal_Bool fErrorGet() { 786 // return (flagsGet() >> 7) & 1; } 787 // bpp : 8;// FF00 bits per pixel, 0 = unknown 788 // sal_uInt8 bppGet() { 789 // return (flagsGet() >> 8) & 0xff; } 790 // SVBT16 rgbrc[4]; 791 // sal_uInt16 rgbrcGet(sal_uInt16 nIndex) { 792 // return SVBT16ToShort(rgbrc[nIndex]); } 793 // W1_BRC brcTop;// 0x2e specification for border above picture 794 // W1_BRC brcLeft;// 0x30 specification for border to the left 795 // W1_BRC brcBottom;// 0x32 specification for border below picture 796 // W1_BRC brcRight;// 0x34 specification for border to the right 797 // SVBT16 dxaOrigin;// 0x36 horizontal offset of hand annotation origin 798 // sal_uInt16 dxaOriginGet() { 799 // return SVBT16ToShort(dxaOrigin); } 800 // SVBT16 dyaOrigin;// 0x38 vertical offset of hand annotation origin 801 // sal_uInt16 dyaOriginGet() { 802 // return SVBT16ToShort(dyaOrigin); } 803 SVBT8 rgb;// 0x3a variable array of bytes containing Windows metafile, bitmap or TIFF file filename. rgbGetW1_PIC804 sal_uInt8* rgbGet() { 805 return rgb; } 806 }; 807 808 struct W1_TBD ///////////////////////////////////////////////////////// 809 { 810 SVBT8 aBits1; aBits1GetW1_TBD811 sal_uInt8 aBits1Get() { 812 return SVBT8ToByte(aBits1); } 813 // SVBT8 jc : 3;// 0x07 justification code: 0=left tab, 1=centered tab, 2=right tab, 3=decimal tab, 4=bar jcGetW1_TBD814 sal_uInt8 jcGet() { 815 return aBits1Get() & 0x07; } 816 // SVBT8 tlc : 3;// 0x38 tab leader code: 0=no leader, 1=dotted leader, 817 // 2=hyphenated leader, 3=single line leader, 4=heavy line leader tlcGetW1_TBD818 sal_uInt8 tlcGet() { 819 return (aBits1Get() >> 3 ) & 0x07; } 820 // * int :2 C0 reserved 821 }; 822 823 struct W1_TC ////////////////////////////////////////////////////////// 824 { 825 SVBT8 aBits1; aBits1GetW1_TC826 sal_uInt8 aBits1Get() { 827 return SVBT8ToByte(aBits1); } fFirstMergedGetW1_TC828 sal_uInt8 fFirstMergedGet() { 829 return aBits1Get() & 0x01; } fMergedGetW1_TC830 sal_uInt8 fMergedGet() { 831 return (aBits1Get() >> 1 ) & 0x01; } 832 SVBT8 aBits2; 833 // SVBT16 fFirstMerged : 1;// 0001 set to 1 when cell is first cell of a range of cells that have been merged. 834 // SVBT16 fMerged : 1;// 0002 set to 1 when cell has been merged with preceding cell. 835 // SVBT16 fUnused : 14;// FFFC reserved 836 W1_BRC10 rgbrc[4];// notational convenience for referring to brcTop, brcLeft, etc fields. rgbrcGetW1_TC837 W1_BRC10* rgbrcGet() { 838 return rgbrc; } 839 // BRC brcTop;// specification of the top border of a table cell 840 // BRC brcLeft;// specification of left border of table row 841 // BRC brcBottom;// specification of bottom border of table row 842 // BRC brcRight;// specification of right border of table row. 843 }; 844 // cbTC (count of bytes of a TC) is 10(decimal), A(hex). 845 846 #if 0 847 struct W1_SHD ////////////////////////////////////////////// struct SHD 848 { 849 SVBT16 aBits1; 850 // SVBT16 nFore : 5;// 0x001f ForegroundColor 851 sal_uInt16 GetFore() { return SVBT16ToShort(aBits1) & 0x01; }; 852 void SetFore( short nVal ){ 853 ShortToSVBT16((SVBT16ToShort(aBits1)&0xffe0)|(nVal&0x1f), aBits1); }; 854 // SVBT16 nBack : 5;// 0x03e0 BackgroundColor 855 W1_SHD() { ShortToSVBT16( 0, aBits1 ); }; 856 sal_uInt16 GetBack() { return (SVBT16ToShort(aBits1) >> 5 & 0x1f ); }; 857 void SetBack( short nVal ){ 858 ShortToSVBT16((SVBT16ToShort(aBits1)&0xfc1f)|(nVal&0x1f)<<5, aBits1); }; 859 // SVBT16 nStyle : 5;// 0x7c00 Percentage and Style 860 sal_uInt16 GetStyle() { return (SVBT16ToShort(aBits1) >> 10 & 0x1f ); }; 861 void SetStyle( short nVal ){ 862 ShortToSVBT16((SVBT16ToShort(aBits1)&0x83ff)|(nVal&0x1f)<<10, aBits1); }; 863 // SVBT16 nDontKnow : 1;// 0x8000 ??? 864 }; 865 866 struct W1_ANLV //////////////////////////////////////////////////////// 867 { 868 SVBT8 nfc;// 0 number format code, 0=Arabic, 1=Upper case Roman, 2=Lower case Roman 869 // 3=Upper case Letter, 4=Lower case letter, 5=Ordinal 870 SVBT8 cbTextBefore;// 1 offset into anld.rgch limit of prefix text 871 SVBT8 cbTextAfter;// 2 872 SVBT8 aBits1; 873 // SVBT8 jc : 2;// 3 : 0x03 justification code, 0=left, 1=center, 2=right, 3=left and right justify 874 // SVBT8 fPrev : 1;// 0x04 when ==1, include previous levels 875 // SVBT8 fHang : 1;// 0x08 when ==1, number will be displayed using a hanging indent 876 // SVBT8 fSetBold : 1;// 0x10 when ==1, boldness of number will be determined by anld.fBold. 877 // SVBT8 fSetItalic : 1;// 0x20 when ==1, italicness of number will be determined by anld.fItalic 878 // SVBT8 fSetSmallCaps : 1;// 0x40 when ==1, anld.fSmallCaps will determine whether number will be displayed in small caps or not. 879 // SVBT8 fSetCaps : 1;// 0x80 when ==1, anld.fCaps will determine whether number will be displayed capitalized or not 880 SVBT8 aBits2; 881 // SVBT8 fSetStrike : 1;// 4 : 0x01 when ==1, anld.fStrike will determine whether the number will be displayed using strikethrough or not. 882 // SVBT8 fSetKul : 1;// 0x02 when ==1, anld.kul will determine the underlining state of the autonumber. 883 // SVBT8 fPrevSpace : 1;// 0x04 when ==1, autonumber will be displayed with a single prefixing space character 884 // SVBT8 fBold : 1;// 0x08 determines boldness of autonumber when anld.fSetBold == 1. 885 // SVBT8 fItalic : 1;// 0x10 determines italicness of autonumber when anld.fSetItalic == 1. 886 // SVBT8 fSmallCaps : 1;// 0x20 determines whether autonumber will be displayed using small caps when anld.fSetSmallCaps == 1. 887 // SVBT8 fCaps : 1;// 0x40 determines whether autonumber will be displayed using caps when anld.fSetCaps == 1. 888 // SVBT8 fStrike : 1;// 0x80 determines whether autonumber will be displayed using caps when anld.fSetStrike == 1. 889 SVBT8 aBits3; 890 // SVBT8 kul : 3;// 5 : 0x07 determines whether autonumber will be displayed with underlining when anld.fSetKul == 1. 891 // SVBT8 ico : 5;// 0xF1 color of autonumber 892 SVBT16 ftc;// 6 font code of autonumber 893 SVBT16 hps;// 8 font half point size (or 0=auto) 894 SVBT16 iStartAt;// 0x0a starting value (0 to 65535) 895 SVBT16 dxaIndent;// 0x0c *short?* *sal_uInt16?* width of prefix text (same as indent) 896 SVBT16 dxaSpace;// 0x0e minimum space between number and paragraph 897 }; 898 // *cbANLV (count of bytes of ANLV) is 16 (decimal), 10(hex). 899 900 struct W1_ANLD //////////////////////////////////////////////////////// 901 { 902 W1_ANLV eAnlv;// 0 903 SVBT8 fNumber1;// 0x10 number only 1 item per table cell 904 SVBT8 fNumberAcross;// 0x11 number across cells in table rows(instead of down) 905 SVBT8 fRestartHdn;// 0x12 restart heading number on section boundary 906 SVBT8 fSpareX;// 0x13 unused( should be 0) 907 sal_Char rgchAnld[32];// 0x14 characters displayed before/after autonumber 908 }; 909 910 911 struct W1_OLST //////////////////////////////////////////////////////// 912 { 913 W1_ANLV rganlv[9];// 0 an array of 9 ANLV structures (heading levels) 914 SVBT8 fRestartHdr;// 0x90 when ==1, restart heading on section break 915 SVBT8 fSpareOlst2;// 0x91 reserved 916 SVBT8 fSpareOlst3;// 0x92 reserved 917 SVBT8 fSpareOlst4;// 0x93 reserved 918 sal_Char rgch[64];// 0x94 array of 64 chars text before/after number 919 }; 920 // cbOLST is 212(decimal), D4(hex). 921 922 #endif 923 #endif 924 925