LCOV - code coverage report
Current view: top level - sw/source/filter/ww1 - w1struct.hxx (source / functions) Hit Total Coverage
Test: commit 0e63ca4fde4e446f346e35849c756a30ca294aab Lines: 0 170 0.0 %
Date: 2014-04-11 Functions: 0 100 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       5             :  * This Source Code Form is subject to the terms of the Mozilla Public
       6             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       7             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      11             :  *   Licensed to the Apache Software Foundation (ASF) under one or more
      12             :  *   contributor license agreements. See the NOTICE file distributed
      13             :  *   with this work for additional information regarding copyright
      14             :  *   ownership. The ASF licenses this file to you under the Apache
      15             :  *   License, Version 2.0 (the "License"); you may not use this file
      16             :  *   except in compliance with the License. You may obtain a copy of
      17             :  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
      18             :  */
      19             : 
      20             : #ifndef INCLUDED_SW_SOURCE_FILTER_WW1_W1STRUCT_HXX
      21             : #define INCLUDED_SW_SOURCE_FILTER_WW1_W1STRUCT_HXX
      22             : 
      23             : // star view
      24             : #include <string.h>
      25             : #include <tools/solar.h>
      26             : 
      27             : class Ww1Shell;
      28             : class Ww1Manager;
      29             : 
      30             : struct W1_FIB
      31             : {
      32             :     SVBT16 wIdent;// 0x0 int magic number
      33             :     sal_uInt16 wIdentGet() {
      34             :         return SVBT16ToShort(wIdent); }
      35             :     SVBT16 nFib;// 0x2 FIB version written
      36             :     sal_uInt16 nFibGet() {
      37             :         return SVBT16ToShort(nFib); }
      38             :     SVBT16 nProduct;// 0x4 product version written by
      39             :     sal_uInt16 nProductGet() {
      40             :         return SVBT16ToShort(nProduct); }
      41             :     SVBT16 nlocale;// 0x6 language stamp---localized version;
      42             :     sal_uInt16 nlocaleGet() {
      43             :         return SVBT16ToShort(nlocale); }
      44             :     SVBT16 pnNext;// 0x8
      45             :     sal_uInt16 pnNextGet() {
      46             :         return SVBT16ToShort(pnNext); }
      47             :     SVBT16 fFlags;
      48           0 :     sal_uInt16 fFlagsGet() {
      49           0 :         return SVBT16ToShort(fFlags); }
      50             :     // SVBT16 fDot :1;// 0xa    0001
      51             :     sal_Bool fDotGet() {
      52             :         return 0 != ((fFlagsGet() >> 0) & 1); }
      53             :     // SVBT16 fGlsy :1;//       0002
      54             :     sal_Bool fGlsyGet() {
      55             :         return 0 != ((fFlagsGet() >> 1) & 1); }
      56             :     // SVBT16 fComplex :1;//        0004 when 1, file is in complex, fast-saved format.
      57           0 :     sal_Bool fComplexGet() {
      58           0 :         return 0 != ((fFlagsGet() >> 2) & 1); }
      59             :     // SVBT16 fHasPic :1;//     0008 file contains 1 or more pictures
      60             :     sal_Bool fHasPicGet() {
      61             :         return 0 != ((fFlagsGet() >> 3) & 1); }
      62             :     // SVBT16 cQuickSaves :4;//     00F0 count of times file was quicksaved
      63             :     sal_uInt16 cQuickSavesGet() {
      64             :         return (sal_uInt16)((fFlagsGet() >> 4) & 0xf); }
      65             :     // SVBT16 u1 :8;//      FF00 unused
      66             :     sal_uInt16 u1Get() {
      67             :         return (sal_uInt16)((fFlagsGet() >> 8) & 0xff); }
      68             :     SVBT16 nFibBack;// 0xc
      69             :     sal_uInt16 nFibBackGet() {
      70             :         return SVBT16ToShort(nFibBack); }
      71             :     SVBT16 u2[5];// 0xe reserved
      72             :     SVBT32 fcMin;// 0x18 file offset of first character of text
      73           0 :     sal_uLong fcMinGet() {
      74           0 :         return SVBT32ToUInt32(fcMin); }
      75             :     SVBT32 fcMac;// 0x1c file offset of last character of text + 1
      76             :     sal_uLong fcMacGet() {
      77             :         return SVBT32ToUInt32(fcMac); }
      78             :     SVBT32 cbMac;// 0x20 file offset of last byte written to file + 1.
      79             :     sal_uLong cbMacGet() {
      80             :         return SVBT32ToUInt32(cbMac); }
      81             :     SVBT32 u4[4];// 0x24 reserved
      82             :     SVBT32 ccpText;// 0x34 length of main document text stream
      83           0 :     sal_uLong ccpTextGet() {
      84           0 :         return SVBT32ToUInt32(ccpText); }
      85             :     SVBT32 ccpFtn;// 0x38 length of footnote subdocument text stream
      86           0 :     sal_uLong ccpFtnGet() {
      87           0 :         return SVBT32ToUInt32(ccpFtn); }
      88             :     SVBT32 ccpHdd;// 0x3c length of header subdocument text stream
      89           0 :     sal_uLong ccpHddGet() {
      90           0 :         return SVBT32ToUInt32(ccpHdd); }
      91             :     SVBT32 ccpMcr;// 0x40 length of macro subdocument text stream
      92             :     sal_uLong ccpMcrGet() {
      93             :         return SVBT32ToUInt32(ccpMcr); }
      94             :     SVBT32 ccpAtn;// 0x44 length of annotation subdocument text stream
      95             :     sal_uLong ccpAtnGet() {
      96             :         return SVBT32ToUInt32(ccpAtn); }
      97             :     SVBT32 cp5[4];// 0x48
      98             :     SVBT32 fcStshfOrig;// 0x58 file offset of original allocation for STSH in file
      99             :     sal_uLong fcStshfOrigGet() {
     100             :         return SVBT32ToUInt32(fcStshfOrig); }
     101             :     SVBT16 cbStshfOrig;// 0x5c count of bytes of original STSH allocation
     102             :     sal_uInt16 cbStshfOrigGet() {
     103             :         return SVBT16ToShort(cbStshfOrig); }
     104             :     SVBT32 fcStshf;// 0x5e file offset of STSH in file.
     105           0 :     sal_uLong fcStshfGet() {
     106           0 :         return SVBT32ToUInt32(fcStshf); }
     107             :     SVBT16 cbStshf;// 0x62 count of bytes of current STSH allocation
     108           0 :     sal_uInt16 cbStshfGet() {
     109           0 :         return SVBT16ToShort(cbStshf); }
     110             :     SVBT32 fcPlcffndRef;// 0x64 file offset of footnote reference PLC.
     111           0 :     sal_uLong fcPlcffndRefGet() {
     112           0 :         return SVBT32ToUInt32(fcPlcffndRef); }
     113             :     SVBT16 cbPlcffndRef;// 0x68 count of bytes of footnote reference PLC
     114           0 :     sal_uInt16 cbPlcffndRefGet() {
     115           0 :         return SVBT16ToShort(cbPlcffndRef); }
     116             :                             // == 0 if no footnotes defined in document.
     117             : 
     118             :     SVBT32 fcPlcffndTxt;// 0x6a file offset of footnote text PLC.
     119           0 :     sal_uLong fcPlcffndTxtGet() {
     120           0 :         return SVBT32ToUInt32(fcPlcffndTxt); }
     121             :     SVBT16 cbPlcffndTxt;// 0x6e count of bytes of footnote text PLC.
     122           0 :     sal_uInt16 cbPlcffndTxtGet() {
     123           0 :         return SVBT16ToShort(cbPlcffndTxt); }
     124             :                             // == 0 if no footnotes defined in document
     125             : 
     126             :     SVBT32 fcPlcfandRef;// 0x70 file offset of annotation reference PLC.
     127             :     sal_uLong fcPlcfandRefGet() {
     128             :         return SVBT32ToUInt32(fcPlcfandRef); }
     129             :     SVBT16 cbPlcfandRef;// 0x74 count of bytes of annotation reference PLC.
     130             :     sal_uInt16 cbPlcfandRefGet() {
     131             :         return SVBT16ToShort(cbPlcfandRef); }
     132             : 
     133             :     SVBT32 fcPlcfandTxt;// 0x76 file offset of annotation text PLC.
     134             :     sal_uLong fcPlcfandTxtGet() {
     135             :         return SVBT32ToUInt32(fcPlcfandTxt); }
     136             :     SVBT16 cbPlcfandTxt;// 0x7a count of bytes of the annotation text PLC
     137             :     sal_uInt16 cbPlcfandTxtGet() {
     138             :         return SVBT16ToShort(cbPlcfandTxt); }
     139             : 
     140             :     SVBT32 fcPlcfsed;// 8x7c file offset of section descriptor PLC.
     141           0 :     sal_uLong fcPlcfsedGet() {
     142           0 :         return SVBT32ToUInt32(fcPlcfsed); }
     143             :     SVBT16 cbPlcfsed;// 0x80 count of bytes of section descriptor PLC.
     144           0 :     sal_uInt16 cbPlcfsedGet() {
     145           0 :         return SVBT16ToShort(cbPlcfsed); }
     146             : 
     147             :     SVBT32 fcPlcfpgd;// 0x82 file offset of paragraph descriptor PLC
     148             :     sal_uLong fcPlcfpgdGet() {
     149             :         return SVBT32ToUInt32(fcPlcfpgd); }
     150             :     SVBT16 cbPlcfpgd;// 0x86 count of bytes of paragraph descriptor PLC.
     151             :     sal_uInt16 cbPlcfpgdGet() {
     152             :         return SVBT16ToShort(cbPlcfpgd); }
     153             :                             // ==0 if file was never repaginated
     154             :                             // Should not be written by third party creators
     155             : 
     156             :     SVBT32 fcPlcfphe;// 0x88 file offset of PLC of paragraph heights.
     157             :     sal_uLong fcPlcfpheGet() {
     158             :         return SVBT32ToUInt32(fcPlcfphe); }
     159             :     SVBT16 cbPlcfphe;// 0x8c count of bytes of paragraph height PLC.
     160             :     sal_uInt16 cbPlcfpheGet() {
     161             :         return SVBT16ToShort(cbPlcfphe); }
     162             :                             // ==0 when file is non-complex.
     163             : 
     164             :     SVBT32 fcSttbfglsy;// 0x8e file offset of glossary string table.
     165             :     sal_uLong fcSttbfglsyGet() {
     166             :         return SVBT32ToUInt32(fcSttbfglsy); }
     167             :     SVBT16 cbSttbfglsy;// 0x92 count of bytes of glossary string table.
     168             :     sal_uInt16 cbSttbfglsyGet() {
     169             :         return SVBT16ToShort(cbSttbfglsy); }
     170             :                             // == 0 for non-glossary documents.
     171             :                             // !=0 for glossary documents.
     172             : 
     173             :     SVBT32 fcPlcfglsy;// 0x94 file offset of glossary PLC.
     174             :     sal_uLong fcPlcfglsyGet() {
     175             :         return SVBT32ToUInt32(fcPlcfglsy); }
     176             :     SVBT16 cbPlcfglsy;// 0x98 count of bytes of glossary PLC.
     177             :     sal_uInt16 cbPlcfglsyGet() {
     178             :         return SVBT16ToShort(cbPlcfglsy); }
     179             :                             // == 0 for non-glossary documents.
     180             :                             // !=0 for glossary documents.
     181             : 
     182             :     SVBT32 fcPlcfhdd;// 0x9a byte offset of header PLC.
     183           0 :     sal_uLong fcPlcfhddGet() {
     184           0 :         return SVBT32ToUInt32(fcPlcfhdd); }
     185             :     SVBT16 cbPlcfhdd;// 0x9e count of bytes of header PLC.
     186           0 :     sal_uInt16 cbPlcfhddGet() {
     187           0 :         return SVBT16ToShort(cbPlcfhdd); }
     188             :                             // == 0 if document contains no headers
     189             : 
     190             :     SVBT32 fcPlcfbteChpx;// 0xa0 file offset of character property bin table.PLC.
     191           0 :     sal_uLong fcPlcfbteChpxGet() {
     192           0 :         return SVBT32ToUInt32(fcPlcfbteChpx); }
     193             :     SVBT16 cbPlcfbteChpx;// 0xa4 count of bytes of character property bin table PLC.
     194           0 :     sal_uInt16 cbPlcfbteChpxGet() {
     195           0 :         return SVBT16ToShort(cbPlcfbteChpx); }
     196             : 
     197             :     SVBT32 fcPlcfbtePapx;// 0xa6 file offset of paragraph property bin table.PLC.
     198           0 :     sal_uLong fcPlcfbtePapxGet() {
     199           0 :         return SVBT32ToUInt32(fcPlcfbtePapx); }
     200             :     SVBT16 cbPlcfbtePapx;// 0xaa count of bytes of paragraph property bin table PLC.
     201           0 :     sal_uInt16 cbPlcfbtePapxGet() {
     202           0 :         return SVBT16ToShort(cbPlcfbtePapx); }
     203             : 
     204             :     SVBT32 fcPlcfsea;// 0xac file offset of PLC reserved for private use. The SEA is 6 bytes long.
     205             :     sal_uLong fcPlcfseaGet() {
     206             :         return SVBT32ToUInt32(fcPlcfsea); }
     207             :     SVBT16 cbPlcfsea;// 0xb0    count of bytes of private use PLC.
     208             :     sal_uInt16 cbPlcfseaGet() {
     209             :         return SVBT16ToShort(cbPlcfsea); }
     210             : 
     211             :     SVBT32 fcSttbfffn;// 0xb2   file offset of font information STTBF. See the FFN file structure definition.
     212           0 :     sal_uLong fcSttbfffnGet() {
     213           0 :         return SVBT32ToUInt32(fcSttbfffn); }
     214             :     SVBT16 cbSttbfffn;// 0xb6   count of bytes in sttbfffn.
     215           0 :     sal_uInt16 cbSttbfffnGet() {
     216           0 :         return SVBT16ToShort(cbSttbfffn); }
     217             : 
     218             :     SVBT32 fcPlcffldMom;// 0xb8 offset in doc stream to the PLC of field positions in the main document.
     219           0 :     sal_uLong fcPlcffldMomGet() {
     220           0 :         return SVBT32ToUInt32(fcPlcffldMom); }
     221             :     SVBT16 cbPlcffldMom;// 0xbc
     222           0 :     sal_uInt16 cbPlcffldMomGet() {
     223           0 :         return SVBT16ToShort(cbPlcffldMom); }
     224             : 
     225             :     SVBT32 fcPlcffldHdr;// 0xbe offset in doc stream to the PLC of field positions in the header subdocument.
     226           0 :     sal_uLong fcPlcffldHdrGet() {
     227           0 :         return SVBT32ToUInt32(fcPlcffldHdr); }
     228             :     SVBT16 cbPlcffldHdr;// 0xc2
     229           0 :     sal_uInt16 cbPlcffldHdrGet() {
     230           0 :         return SVBT16ToShort(cbPlcffldHdr); }
     231             : 
     232             :     SVBT32 fcPlcffldFtn;// 0xc4 offset in doc stream to the PLC of field positions in the footnote subdocument.
     233           0 :     sal_uLong fcPlcffldFtnGet() {
     234           0 :         return SVBT32ToUInt32(fcPlcffldFtn); }
     235             :     SVBT16 cbPlcffldFtn;// 0xc8
     236           0 :     sal_uInt16 cbPlcffldFtnGet() {
     237           0 :         return SVBT16ToShort(cbPlcffldFtn); }
     238             : 
     239             :     SVBT32 fcPlcffldAtn;// 0xca offset in doc stream to the PLC of field positions in the annotation subdocument.
     240             :     sal_uLong fcPlcffldAtnGet() {
     241             :         return SVBT32ToUInt32(fcPlcffldAtn); }
     242             :     SVBT16 cbPlcffldAtn;// 0xce
     243             :     sal_uInt16 cbPlcffldAtnGet() {
     244             :         return SVBT16ToShort(cbPlcffldAtn); }
     245             : 
     246             :     SVBT32 fcPlcffldMcr;// 0xd0 offset in doc stream to the PLC of field positions in the macro subdocument.
     247             :     sal_uLong fcPlcffldMcrGet() {
     248             :         return SVBT32ToUInt32(fcPlcffldMcr); }
     249             :     SVBT16 cbPlcffldMcr;// 0xd4
     250             :     sal_uInt16 cbPlcffldMcrGet() {
     251             :         return SVBT16ToShort(cbPlcffldMcr); }
     252             : 
     253             :     SVBT32 fcSttbfbkmk;// 0xd6 offset in document stream of the STTBF that records bookmark names in the main document
     254           0 :     sal_uLong fcSttbfbkmkGet() {
     255           0 :         return SVBT32ToUInt32(fcSttbfbkmk); }
     256             :     SVBT16 cbSttbfbkmk;// 0xda
     257           0 :     sal_uInt16 cbSttbfbkmkGet() {
     258           0 :         return SVBT16ToShort(cbSttbfbkmk); }
     259             : 
     260             :     SVBT32 fcPlcfbkf;// 0xdc offset in document stream of the PLCF that records the beginning CP offsets of bookmarks in the main document. See BKF
     261           0 :     sal_uLong fcPlcfbkfGet() {
     262           0 :         return SVBT32ToUInt32(fcPlcfbkf); }
     263             :     SVBT16 cbPlcfbkf;// 0xe0
     264           0 :     sal_uInt16 cbPlcfbkfGet() {
     265           0 :         return SVBT16ToShort(cbPlcfbkf); }
     266             : 
     267             :     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.
     268           0 :     sal_uLong fcPlcfbklGet() {
     269           0 :         return SVBT32ToUInt32(fcPlcfbkl); }
     270             :     SVBT16 cbPlcfbkl;// 0xe6 SVBT16
     271           0 :     sal_uInt16 cbPlcfbklGet() {
     272           0 :         return SVBT16ToShort(cbPlcfbkl); }
     273             : 
     274             :     SVBT32 fcCmds;// 0xe8 FC
     275             :     sal_uLong fcCmdsGet() {
     276             :         return SVBT32ToUInt32(fcCmds); }
     277             :     SVBT16 cbCmds;// 0xec
     278             :     sal_uInt16 cbCmdsGet() {
     279             :         return SVBT16ToShort(cbCmds); }
     280             : 
     281             :     SVBT32 fcPlcmcr;// 0xee FC
     282             :     sal_uLong fcPlcmcrGet() {
     283             :         return SVBT32ToUInt32(fcPlcmcr); }
     284             :     SVBT16 cbPlcmcr;// 0xf2
     285             :     sal_uInt16 cbPlcmcrGet() {
     286             :         return SVBT16ToShort(cbPlcmcr); }
     287             : 
     288             :     SVBT32 fcSttbfmcr;// 0xf4 FC
     289             :     sal_uLong fcSttbfmcrGet() {
     290             :         return SVBT32ToUInt32(fcSttbfmcr); }
     291             :     SVBT16 cbSttbfmcr;// 0xf8
     292             :     sal_uInt16 cbSttbfmcrGet() {
     293             :         return SVBT16ToShort(cbSttbfmcr); }
     294             : 
     295             :     SVBT32 fcPrEnv;// 0xfa
     296             :     sal_uLong fcPrEnvGet() {
     297             :         return SVBT32ToUInt32(fcPrEnv); }
     298             :     SVBT16 cbPrEnv;// 0xfe
     299             :     sal_uInt16 cbPrEnvGet() {
     300             :         return SVBT16ToShort(cbPrEnv); }
     301             : 
     302             :     SVBT32 fcWss;// 0x100 file offset of Window Save State data structure. See WSS.
     303             :     sal_uLong fcWssGet() {
     304             :         return SVBT32ToUInt32(fcWss); }
     305             :     SVBT16 cbWss;// 0x100 count of bytes of WSS. ==0 if unable to store the window state.
     306             :     sal_uInt16 cbWssGet() {
     307             :         return SVBT16ToShort(cbWss); }
     308             : 
     309             :     SVBT32 fcDop;// 0x106 file offset of document property data structure.
     310           0 :     sal_uLong fcDopGet() {
     311           0 :         return SVBT32ToUInt32(fcDop); }
     312             :     SVBT16 cbDop;// 0x10a count of bytes of document properties.
     313           0 :     sal_uInt16 cbDopGet() {
     314           0 :         return SVBT16ToShort(cbDop); }
     315             : 
     316             :     SVBT32 fcSttbfAssoc;// 0x10c offset to STTBF of associated strings. See STTBFASSOC.
     317           0 :     sal_uLong fcSttbfAssocGet() {
     318           0 :         return SVBT32ToUInt32(fcSttbfAssoc); }
     319             :     SVBT16 cbSttbfAssoc;// 0x110
     320           0 :     sal_uInt16 cbSttbfAssocGet() {
     321           0 :         return SVBT16ToShort(cbSttbfAssoc); }
     322             : 
     323             :     SVBT32 fcClx;// 0x112 file offset of beginning of information for complex files.
     324             :     sal_uLong fcClxGet() {
     325             :         return SVBT32ToUInt32(fcClx); }
     326             :     SVBT16 cbClx;// 0x116 count of bytes of complex file information. 0 if file is non-complex.
     327             :     sal_uInt16 cbClxGet() {
     328             :         return SVBT16ToShort(cbClx); }
     329             : 
     330             :     SVBT32 fcPlcfpgdFtn;// 0x118 file offset of page descriptor PLC for footnote subdocument.
     331             :     sal_uLong fcPlcfpgdFtnGet() {
     332             :         return SVBT32ToUInt32(fcPlcfpgdFtn); }
     333             :     SVBT16 cbPlcfpgdFtn;// 0x11C count of bytes of page descriptor PLC for footnote subdocument.
     334             :     sal_uInt16 cbPlcfpgdFtnGet() {
     335             :         return SVBT16ToShort(cbPlcfpgdFtn); }
     336             :                             // ==0 if document has not been paginated. The length of the PGD is 8 bytes.
     337             : 
     338             :     SVBT32 fcSpare1;// 0x11e file offset of the name of the original file.
     339             :     sal_uLong fcSpare1Get() {
     340             :         return SVBT32ToUInt32(fcSpare1); }
     341             :     SVBT16 cbSpare1;// 0x122 count of bytes of the name of the original file.
     342             :     sal_uInt16 cbSpare1Get() {
     343             :         return SVBT16ToShort(cbSpare1); }
     344             :     SVBT32 fcSpare2;// 0x124 file offset of the name of the original file.
     345             :     sal_uLong fcSpare2Get() {
     346             :         return SVBT32ToUInt32(fcSpare2); }
     347             :     SVBT16 cbSpare2;// 0x128 count of bytes of the name of the original file.
     348             :     sal_uInt16 cbSpare2Get() {
     349             :         return SVBT16ToShort(cbSpare2); }
     350             :     SVBT32 fcSpare3;// 0x12a file offset of the name of the original file.
     351             :     sal_uLong fcSpare3Get() {
     352             :         return SVBT32ToUInt32(fcSpare3); }
     353             :     SVBT16 cbSpare3;// 0x12e count of bytes of the name of the original file.
     354             :     sal_uInt16 cbSpare3Get() {
     355             :         return SVBT16ToShort(cbSpare3); }
     356             :     SVBT32 fcSpare4;// 0x130 file offset of the name of the original file.
     357             :     sal_uLong fcSpare4Get() {
     358             :         return SVBT32ToUInt32(fcSpare4); }
     359             :     SVBT16 cbSpare4;// 0x134 count of bytes of the name of the original file.
     360             :     sal_uInt16 cbSpare4Get() {
     361             :         return SVBT16ToShort(cbSpare4); }
     362             : 
     363             :     SVBT16 cpnBteChp;// 0x18E count of CHPX FKPs recorded in file. In non-complex files if the number of
     364             :     sal_uInt16 cpnBteChpGet() {
     365             :         return SVBT16ToShort(cpnBteChp); }
     366             :                             // entries in the plcfbteChpx is less than this, the plcfbteChpx is incomplete.
     367             :     SVBT16 cpnBtePap;// 0x190 count of PAPX FKPs recorded in file. In non-complex files if the number of
     368             :     sal_uInt16 cpnBtePapGet() {
     369             :         return SVBT16ToShort(cpnBtePap); }
     370             :                             // entries in the plcfbtePapx is less than this, the plcfbtePapx is incomplete.
     371             : };
     372             : 
     373             : struct W1_DOP //Document Properties
     374             : {
     375             :     SVBT16 fFlags;
     376           0 :     sal_uInt16 fFlagsGet() {
     377           0 :         return SVBT16ToShort(fFlags); }
     378             :     // SVBT16 fFacingPages : 1;// 1 when facing pages should be printed
     379             :     sal_Bool fFacingPagesGet() {
     380             :         return 0 != ((fFlagsGet() >> 0) & 1); }
     381             :     // SVBT16 fWidowControl : 1;// 1 when widow control is in effect. 0 when widow control disabled.
     382             :     sal_Bool fWidowControlGet() {
     383             :         return 0 != ((fFlagsGet() >> 1) & 1); }
     384             :     // SVBT16 : 3;// unused
     385             :     // SVBT16 fpc : 2;// 1 footnote position code: 0 as endnotes, 1 at bottom of page, 2 immediately beneath text
     386           0 :     sal_uInt16 fpcGet() {
     387           0 :         return (sal_uInt16)((fFlagsGet() >> 5) & 3); }
     388             :     // SVBT16 fWide : 1;// Landscape
     389           0 :     sal_Bool fWideGet() {
     390           0 :         return 0 != ((fFlagsGet() >> 7) & 1); }
     391             :     // SVBT16 grpfIhdt : 8;// 0 specification of document headers and footers. See explanation under Headers and Footers topic.
     392           0 :     sal_uInt16 grpfIhdtGet() {
     393           0 :         return (sal_uInt16)((fFlagsGet() >> 8) & 0xff); }
     394             :     SVBT16 fFtnFlags;
     395           0 :     sal_uInt16 fFtnFlagsGet() {
     396           0 :         return SVBT16ToShort(fFtnFlags); }
     397             :     // SVBT16 fFtnRestart : 1;
     398             :     sal_Bool fFtnRestartGet() {
     399             :         return 0 != ((fFtnFlagsGet() >> 0) & 1); }
     400             :     // SVBT16 nFtn : 15;// 1 initial footnote number for document
     401           0 :     sal_uInt16 nFtnGet() {
     402           0 :         return (sal_uInt16)((fFtnFlagsGet() >> 1) & 0x7fff); }
     403             :     SVBT16 fRvsFlags;
     404             :     sal_uInt16 fRvsFlagsGet() {
     405             :         return SVBT16ToShort(fRvsFlags); }
     406             :     // SVBT16 irmBar : 8;
     407             :     sal_uInt16 irmBarGet() {
     408             :         return (sal_uInt16)((fRvsFlagsGet() >> 0) & 0xff); }
     409             :     // SVBT16 irmProps : 7;
     410             :     sal_uInt16 irmPropsGet() {
     411             :         return (sal_uInt16)((fRvsFlagsGet() >> 8) & 0x7f); }
     412             :     // SVBT16 fRevMarking   : 1;//   when 1, Word will mark revisions as the document is edited
     413             :     sal_Bool fRevMarkingGet() {
     414             :         return 0 != ((fRvsFlagsGet() >> 15) & 1); }
     415             :     SVBT16 fSveFlags;
     416             :     sal_uInt16 fSveFlagsGet() {
     417             :         return SVBT16ToShort(fSveFlags); }
     418             :     // SVBT16 fBackup : 1;//     always make backup when document saved when 1.
     419             :     sal_Bool fBackupGet() {
     420             :         return 0 != ((fSveFlagsGet() >> 0) & 1); }
     421             :     // SVBT16 fExactCWords : 1;
     422             :     sal_Bool fExactCWordsGet() {
     423             :         return 0 != ((fSveFlagsGet() >> 1) & 1); }
     424             :     // SVBT16 fPagHidden : 1;
     425             :     sal_Bool fPagHiddenGet() {
     426             :         return 0 != ((fSveFlagsGet() >> 2) & 1); }
     427             :     // SVBT16 fPagResults : 1;
     428             :     sal_Bool fPagResultsGet() {
     429             :         return 0 != ((fSveFlagsGet() >> 3) & 1); }
     430             :     // SVBT16 fLockAtn : 1;//    when 1, annotations are locked for editing
     431             :     sal_Bool fLockAtnGet() {
     432             :         return 0 != ((fSveFlagsGet() >> 4) & 1); }
     433             :     // SVBT16 fMirrorMargins : 1;//  swap margins on left/right pages when 1.
     434             :     sal_Bool fMirrorMarginsGet() {
     435             :         return 0 != ((fSveFlagsGet() >> 5) & 1); }
     436             :     // SVBT16 : 10;// unused
     437             :     SVBT16 fSpares;
     438             :     sal_uInt16 fSparesGet() {
     439             :         return SVBT16ToShort(fSpares); }
     440             :     SVBT16 yaPage;
     441           0 :     sal_uInt16 yaPageGet() {
     442           0 :         return SVBT16ToShort(yaPage); }
     443             :     SVBT16 xaPage;
     444           0 :     sal_uInt16 xaPageGet() {
     445           0 :         return SVBT16ToShort(xaPage); }
     446             :     SVBT16 dyaTop;
     447           0 :     sal_uInt16 dyaTopGet() {
     448           0 :         return SVBT16ToShort(dyaTop); }
     449             :     SVBT16 dxaLeft;
     450           0 :     sal_uInt16 dxaLeftGet() {
     451           0 :         return SVBT16ToShort(dxaLeft); }
     452             :     SVBT16 dyaBottom;
     453           0 :     sal_uInt16 dyaBottomGet() {
     454           0 :         return SVBT16ToShort(dyaBottom); }
     455             :     SVBT16 dxaRight;
     456           0 :     sal_uInt16 dxaRightGet() {
     457           0 :         return SVBT16ToShort(dxaRight); }
     458             :     SVBT16 dxaGutter;
     459           0 :     sal_uInt16 dxaGutterGet() {
     460           0 :         return SVBT16ToShort(dxaGutter); }
     461             :     SVBT16  dxaTab;// 720 twips default tab width
     462           0 :     sal_uInt16 dxaTabGet() {
     463           0 :         return SVBT16ToShort(dxaTab); }
     464             :     SVBT16  wSpare;
     465             :     sal_uInt16 wSpareGet() {
     466             :         return SVBT16ToShort(wSpare); }
     467             :     SVBT16  dxaHotZ;// width of hyphenation hot zone measured in twips
     468             :     sal_uInt16 dxaHotZGet() {
     469             :         return SVBT16ToShort(dxaHotZ); }
     470             :     SVBT16  rgwSpare[2];// reserved
     471             :     SVBT32  dttmCreated;// DTTM date and time document was created
     472             :     sal_uLong dttmCreatedGet() {
     473             :         return SVBT32ToUInt32(dttmCreated); }
     474             :     SVBT32  dttmRevised;// DTTM date and time document was last revised
     475             :     sal_uLong dttmRevisedGet() {
     476             :         return SVBT32ToUInt32(dttmRevised); }
     477             :     SVBT32  dttmLastPrint;// DTTM date and time document was last printed
     478             :     sal_uLong dttmLastPrintGet() {
     479             :         return SVBT32ToUInt32(dttmLastPrint); }
     480             :     SVBT16  nRevision;// number of times document has been revised since its creation
     481             :     sal_uInt16 nRevisionGet() {
     482             :         return SVBT16ToShort(nRevision); }
     483             :     SVBT32  tmEdited;// time document was last edited
     484             :     sal_uLong tmEditedGet() {
     485             :         return SVBT32ToUInt32(tmEdited); }
     486             :     SVBT32  cWords;// count of words tallied by last Word Count execution
     487             :     sal_uLong cWordsGet() {
     488             :         return SVBT32ToUInt32(cWords); }
     489             :     SVBT32  cCh;// count of characters tallied by last Word Count execution
     490             :     sal_uLong cChGet() {
     491             :         return SVBT32ToUInt32(cCh); }
     492             :     SVBT16  cPg;// count of pages tallied by last Word Count execution
     493             :     sal_uInt16 cPgGet() {
     494             :         return SVBT16ToShort(cPg); }
     495             :     SVBT16  rgwSpareDocSum[2];
     496             : };
     497             : // cbDOP is 66.
     498             : 
     499             : struct W1_CHP
     500             : {
     501             :     SVBT16  fChar;
     502             :     SVBT16  ftc;// Font Code
     503             :     sal_uInt8   hps;// Font size in half points
     504             :     sal_uInt8   hpsPos;// Sub/Superscript ( signed number, 0 = normal )
     505             :     SVBT16  fText;
     506             :     SVBT32  fcPic;// not stored in File
     507             :     sal_uInt8   fnPic;// internal
     508             :     SVBT16  hpsLargeChp;// ???
     509             : 
     510           0 :     W1_CHP() { memset( this, 0, sizeof( *this)); }
     511             : 
     512           0 :     sal_uInt16 fCharGet()       { return SVBT16ToShort(fChar); }
     513             :     void fCharSet(sal_uInt16 n) { ShortToSVBT16(n, fChar); }
     514           0 :     sal_Bool fBoldGet()         { return 0 != ((fCharGet() >> 0) & 1); }
     515             :     void fBoldSet(sal_Bool b)   { fCharSet( ( fCharGet() & 0xfffe ) | ( b << 0 ) ); }
     516           0 :     sal_Bool fItalicGet()       { return 0 != ((fCharGet() >> 1) & 1); }
     517             :     void fItalicSet(sal_Bool b) { fCharSet( ( fCharGet() & 0xfffd ) | ( b << 1 ) ); }
     518           0 :     sal_Bool fStrikeGet()       { return 0 != ((fCharGet() >> 2) & 1); }
     519           0 :     sal_Bool fOutlineGet()      { return 0 != ((fCharGet() >> 3) & 1); }
     520             :     sal_Bool fFldVanishGet()    { return 0 != ((fCharGet() >> 4) & 1); }
     521           0 :     sal_Bool fSmallCapsGet()    { return 0 != ((fCharGet() >> 5) & 1); }
     522           0 :     sal_Bool fCapsGet()         { return 0 != ((fCharGet() >> 6) & 1); }
     523             :     sal_Bool fVanishGet()       { return 0 != ((fCharGet() >> 7) & 1); }
     524             :     sal_Bool fRMarkGet()        { return 0 != ((fCharGet() >> 8) & 1); }
     525             :     sal_Bool fSpecGet()         { return 0 != ((fCharGet() >> 9) & 1); }
     526           0 :     sal_Bool fsIcoGet()         { return 0 != ((fCharGet() >> 10) & 1); }
     527           0 :     sal_Bool fsFtcGet()         { return 0 != ((fCharGet() >> 11) & 1); }
     528             :     void fsFtcSet(sal_Bool b)   { fCharSet( ( fCharGet() & 0xf7ff ) | ( b << 11 ) ); }
     529           0 :     sal_Bool fsHpsGet()         { return 0 != ((fCharGet() >> 12) & 1); }
     530             :     void fsHpsSet(sal_Bool b)   { fCharSet( ( fCharGet() & 0xefff ) | ( b << 12 ) ); }
     531           0 :     sal_Bool fsKulGet()         { return 0 != ((fCharGet() >> 13) & 1); }
     532             :     void fsKulSet(sal_Bool b)   { fCharSet( ( fCharGet() & 0xdfff ) | ( b << 13 ) ); }
     533           0 :     sal_Bool fsPosGet()         { return 0 != ((fCharGet() >> 14) & 1); }
     534           0 :     sal_Bool fsSpaceGet()       { return 0 != ((fCharGet() >> 15) & 1); }
     535             :     // SVBT16 fBold :1;// 1 == opposite boldness of style
     536             :     // SVBT16 fItalic :1;// 1 == opposite of style
     537             :     // SVBT16 fStrike :1;// 1 == opposite of style
     538             :     // SVBT16 fOutline :1;// 1 == opposite of style
     539             :     // SVBT16 fFldVanish :1;// 1 == opposite of style
     540             :     // SVBT16 fSmallCaps :1;// 1 == opposite of style
     541             :     // SVBT16 fCaps :1;// 1 == opposite of style
     542             :     // SVBT16 fVanish :1;// 1 == opposite of style
     543             :     // SVBT16 fRMark :1;// ???
     544             :     // SVBT16 fSpec :1;// 1 == opposite of style
     545             :     // SVBT16 fsIco :1;// 1 == Color (ico) different to style
     546             :     // SVBT16 fsFtc :1;// 1 == FontCode (ftc) different to style
     547             :     // SVBT16 fsHps :1;// 1 == FontSize (hps) different to style
     548             :     // SVBT16 fsKul :1;// 1 == Underline Code (kul) different to style
     549             :     // SVBT16 fsPos :1;// 1 == Char position (hpsPos) different to style
     550             :     // SVBT16 fsSpace :1;// 1 == Char Spacing (qpsSpace) different to style
     551             : 
     552           0 :     sal_uInt16 ftcGet()         { return SVBT16ToShort(ftc); }
     553             :     void ftcSet(sal_uInt16 n)   { ShortToSVBT16(n, ftc); }
     554           0 :     void hpsSet(sal_uInt8 n)    { hps = n; }
     555           0 :     sal_uInt8 hpsGet()          { return hps; }
     556             : 
     557           0 :     sal_uInt8 hpsPosGet()       { return hpsPos; }
     558           0 :     sal_uInt16 fTextGet()       { return SVBT16ToShort(fText); }
     559             :     void fTextSet(sal_uInt16 n) { ShortToSVBT16(n, fText); }
     560           0 :     sal_uInt16 qpsSpaceGet()    { return (sal_uInt16)((fTextGet() >> 0) & 0x3f); }
     561             :     sal_uInt16 wSpare2Get()     { return (sal_uInt16)((fTextGet() >> 6) & 3); }
     562           0 :     sal_uInt16 icoGet()         { return (sal_uInt16)((fTextGet() >> 8) & 0xf); }
     563           0 :     sal_uInt16 kulGet()         { return (sal_uInt16)((fTextGet() >> 12) & 7); }
     564             :     void kulSet(sal_uInt16 n)   { fTextSet( ( fTextGet() & 0x8fff ) | ( ( n & 7 ) << 12 ) ); }
     565             :     sal_Bool fSysVanishGet()    { return 0 != ((fTextGet() >> 15) & 1); }
     566             :     // SVBT16 qpsSpace :6;// Char Spacing, -7 .. 56; 57 = -7, 63 = -1
     567             :     // SVBT16 wSpare2 : 2;// reserved
     568             :     // SVBT16 ico :4;// color of Text: 0=black, 1=blue, 2=cyan, 3=green, 4=magenta, 5=red, 6=yellow, 7=white
     569             :     // SVBT16 kul: 3;// Underline code: 0=none, 1=single, 2=by word, 3=double, 4=dotted
     570             :     // SVBT16 fSysVanish: 1;// used internally
     571             : 
     572           0 :     sal_uLong fcPicGet()        { return SVBT32ToUInt32(fcPic); }
     573             :     sal_uInt16 fnPicGet()       { return fnPic; }
     574             :     sal_uInt16 hpsLargeChpGet() { return SVBT16ToShort(hpsLargeChp); }
     575             : 
     576             :     void Out(Ww1Shell&, Ww1Manager&);
     577             : };
     578             : 
     579             : struct W1_FFN ///////////////////////////////////////// Font Descriptor
     580             : {
     581             :     sal_uInt8 cbFfnM1;// 0x0    total length of FFN - 1.
     582           0 :     sal_uInt16 cbFfnM1Get() {
     583           0 :         return static_cast<sal_uInt8>(cbFfnM1); }
     584             :     sal_uInt8 fFlags;
     585           0 :     sal_uInt16 fFlagsGet() {
     586           0 :         return static_cast<sal_uInt8>(fFlags); }
     587             :     // sal_uInt8 prg : 2;// 0x1:03  pitch request
     588           0 :     sal_uInt16 prgGet() {
     589           0 :         return (sal_uInt16)((fFlagsGet() >> 0) & 3); }
     590             :     // sal_uInt8 fTrueType : 1;//   0x1:04  when 1, font is a TrueType font
     591             :     sal_Bool fTrueTypeGet() {
     592             :         return 0 != ((fFlagsGet() >> 2) & 1); }
     593             :     // sal_uInt8 : 1;// 0x1:08  reserved
     594             :     // sal_uInt8 ff : 3;//  0x1:70  font family id
     595           0 :     sal_uInt16 ffGet() {
     596           0 :         return (sal_uInt16)((fFlagsGet() >> 4) & 7); }
     597             :     // sal_uInt8 : 1;// 0x1:80  reserved
     598             :     sal_uInt8 szFfn[65];// 0x6      zero terminated string that records name of font.
     599             :                             // Careful: the array may be smaller!!!
     600             :                             // Possibly followed by a second sz which records the name of an
     601             :                             // alternate font to use if the first named font does not exist
     602             :                             // on this system. Maximal size of szFfn is 65 characters.
     603           0 :     sal_uInt8* szFfnGet() { return szFfn; }
     604             : };
     605             : 
     606             : struct W1_PHE // Paragraph Height
     607             : {
     608             :     SVBT16 fFlags;
     609             :     sal_uInt16 fFlagsGet() {
     610             :         return SVBT16ToShort(fFlags); }
     611             :     sal_Bool fSpareGet() {
     612             :         return 0 != (fFlagsGet() & 1); }
     613             :     sal_Bool fUnkGet() {
     614             :         return 0 != ((fFlagsGet() >> 1) & 1); }
     615             :     sal_Bool fDiffLinesGet() {
     616             :         return 0 != ((fFlagsGet() >> 2) & 1); }
     617             :     sal_uInt8 clMacGet() {
     618             :         return sal::static_int_cast< sal_uInt8, sal_uInt16 >((fFlagsGet() >> 8) & 0xff); }
     619             :     SVBT16 dxaCol;
     620             :     sal_uInt16 dxaColGet() {
     621             :         return SVBT16ToShort(dxaCol); }
     622             :     SVBT16 xxx; // note the triple usage.... see doc.
     623             :     sal_uInt16 dylHeightGet() {
     624             :         return SVBT16ToShort(xxx); }
     625             :     sal_uInt16 dylLineGet() {
     626             :         return SVBT16ToShort(xxx); }
     627             :     sal_uInt16 fStyleDirtyGet() {
     628             :         return SVBT16ToShort(xxx); }
     629             : };
     630             : 
     631             : struct W1_PAPX // Paragraph Property Difference
     632             : {
     633             :     sal_uInt8 stc;
     634           0 :     sal_uInt8 stcGet() { return stc; }
     635             :     W1_PHE phe;
     636             :     sal_uInt8 grpprl[1];
     637           0 :     sal_uInt8* grpprlGet() {
     638           0 :         return grpprl; }
     639             : };
     640             : 
     641             : struct W1_BRC // Border Code
     642             : {
     643             :     SVBT16 aBits;
     644             :     sal_uInt16 aBitsGet() {
     645             :         return SVBT16ToShort(aBits); }
     646             :     // SVBT16 dxpLineWidth : 3;// 0007 When dxpLineWidth is 0, 1, 2, 3, 4, or 5,
     647             :                                 // this field is the width of a single line of border
     648             :                                 // in units of 0.75 points Must be nonzero when brcType
     649             :                                 // is nonzero. 6 == dotted, 7 == dashed.
     650             :     sal_uInt8 dxpLineWidthGet() {
     651             :         return sal::static_int_cast< sal_uInt8, sal_uInt16 >((aBitsGet() >> 0) & 0x0007); }
     652             :     // SVBT16 brcType : 2;// 0018 border type code: 0 == none, 1 == single, 2 == thick,
     653             :                             // 3 == double
     654             :     sal_uInt8 brcTypeGet() {
     655             :         return sal::static_int_cast< sal_uInt8, sal_uInt16 >((aBitsGet() >> 3) & 0x0003); }
     656             :     // SVBT16 fShadow : 1;// 0020   when 1, border is drawn with shadow. Must be 0
     657             :                             // when BRC is a substructure of the TC
     658             :     sal_uInt8 fShadowGet() {
     659             :         return sal::static_int_cast< sal_uInt8, sal_uInt16 >((aBitsGet() >> 5) & 0x0001); }
     660             :     // SVBT16 ico : 5;// 07C0 color code (see chp.ico)
     661             :     sal_uInt8 icoGet() {
     662             :         return sal::static_int_cast< sal_uInt8, sal_uInt16 >((aBitsGet() >> 6) & 0x001f); }
     663             :     // SVBT16 dxpSpace : 5;// F800  width of space to maintain between border and
     664             :                                 // text within border. Must be 0 when BRC is a
     665             :                                 // substructure of the TC. Stored in points for Windows.
     666             :     sal_uInt8 dxpSpaceGet() {
     667             :         return sal::static_int_cast< sal_uInt8, sal_uInt16 >((aBitsGet() >> 11) & 0x001f); }
     668             : };
     669             : 
     670             : struct W1_BRC10 // Border Code Word 1.0
     671             : {
     672             :     SVBT16 aBits;
     673           0 :     sal_uInt16 aBitsGet() {
     674           0 :         return SVBT16ToShort(aBits); }
     675           0 :     sal_uInt8 dxpLine2WidthGet() {
     676           0 :         return sal::static_int_cast< sal_uInt8, sal_uInt16 >((aBitsGet() >> 0) & 0x0007); }
     677             :     sal_uInt8 dxpSpaceBetweenGet() {
     678             :         return sal::static_int_cast< sal_uInt8, sal_uInt16 >((aBitsGet() >> 3) & 0x0007); }
     679           0 :     sal_uInt8 dxpLine1WidthGet() {
     680           0 :         return sal::static_int_cast< sal_uInt8, sal_uInt16 >((aBitsGet() >> 6) & 0x0007); }
     681           0 :     sal_uInt8 dxpSpaceGet() {
     682           0 :         return sal::static_int_cast< sal_uInt8, sal_uInt16 >((aBitsGet() >> 9) & 0x001f); }
     683           0 :     sal_uInt8 fShadowGet() {
     684           0 :         return sal::static_int_cast< sal_uInt8, sal_uInt16 >((aBitsGet() >> 14) & 0x0001); }
     685             :     sal_uInt8 fSpareGet() {
     686             :         return sal::static_int_cast< sal_uInt8, sal_uInt16 >((aBitsGet() >> 15) & 0x0001); }
     687             : };
     688             : 
     689             : struct W1_FLD // FieldDescriptor
     690             : {
     691             :     sal_uInt8 ch; // boundary-type (begin(19), separator (20), end (21))
     692           0 :     sal_uInt8 chGet() { return ch; }
     693             :     sal_uInt8 flt; // field type / flags
     694           0 :     sal_uInt8 fltGet() { return flt; }
     695             :     // variant, when ch==21:
     696             :     sal_Bool fDifferGet() {
     697             :         return (fltGet() >> 0) & 1; }
     698             :     sal_Bool fResultDirtyGet() {
     699             :         return (fltGet() >> 2) & 1; }
     700             :     sal_Bool ResultEditedGet() {
     701             :         return (fltGet() >> 3) & 1; }
     702             :     sal_Bool fLockedGet() {
     703             :         return (fltGet() >> 4) & 1; }
     704             :     sal_Bool fPrivateResultGet() {
     705             :         return (fltGet() >> 5) & 1; }
     706             :     sal_Bool fNestedGet() {
     707             :         return (fltGet() >> 6) & 1; }
     708             : };
     709             : 
     710             : struct W1_PIC // PictureStructure
     711             : {
     712             :     SVBT32 lcb;// 0x0 number of bytes in the PIC structure plus size of following picture data which may be a Window's metafile, a bitmap, or the filename of a TIFF file.
     713           0 :     sal_uLong lcbGet() {
     714           0 :         return SVBT32ToUInt32(lcb); }
     715             :     SVBT16 cbHeader;// 0x4 number of bytes in the PIC (to allow for future expansion).
     716             :     sal_uInt16 cbHeaderGet() {
     717             :         return SVBT16ToShort(cbHeader); }
     718             :     struct MFP {
     719             :         SVBT16 mm;// 0x6    int
     720           0 :         sal_uInt16 mmGet() {
     721           0 :             return SVBT16ToShort(mm); }
     722             :         SVBT16 xExt;// 0x8  int
     723           0 :         sal_uInt16 xExtGet() {
     724           0 :             return SVBT16ToShort(xExt); }
     725             :         SVBT16 yExt;// 0xa  int
     726           0 :         sal_uInt16 yExtGet() {
     727           0 :             return SVBT16ToShort(yExt); }
     728             :         SVBT16 hMF;// 0xc   int
     729             :         sal_uInt16 hMFGet() {
     730             :             return SVBT16ToShort(hMF); }
     731             :     } mfp;
     732             :     union W1_MFP_BMP {
     733             :         sal_uInt8 bm[14];// 0xe BITMAP(14 bytes)    Window's bitmap structure when PIC describes a BITMAP.
     734             :         sal_uInt8 rcWinMF[14];// 0xe    rc (rectangle - 8 bytes) rect for window origin and extents when metafile is stored -- ignored if 0
     735             :     } MFP_BMP;
     736             :     SVBT16 dxaGoal;// 0x1c  horizontal measurement in twips of the rectangle the picture should be imaged within.
     737             :     sal_uInt16 dxaGoalGet() {
     738             :         return SVBT16ToShort(dxaGoal); }
     739             :     SVBT16 dyaGoal;// 0x1e  vertical measurement in twips of the rectangle the picture should be imaged within.
     740             :     sal_uInt16 dyaGoalGet() {
     741             :         return SVBT16ToShort(dyaGoal); }
     742             :     SVBT16 mx;// 0x20   horizontal scaling factor supplied by user in .1% units.
     743             :     sal_uInt16 mxGet() {
     744             :         return SVBT16ToShort(mx); }
     745             :     SVBT16 my;// 0x22   vertical scaling factor supplied by user in .1% units.
     746             :     sal_uInt16 myGet() {
     747             :         return SVBT16ToShort(my); }
     748             :     SVBT16 dxaCropLeft;// 0x24  the amount the picture has been cropped on the left in twips.
     749             :     sal_uInt16 dxaCropLeftGet() {
     750             :         return SVBT16ToShort(dxaCropLeft); }
     751             :     SVBT16 dyaCropTop;// 0x26   the amount the picture has been cropped on the top in twips.
     752             :     sal_uInt16 dyaCropTopGet() {
     753             :         return SVBT16ToShort(dyaCropTop); }
     754             :     SVBT16 dxaCropRight;// 0x28 the amount the picture has been cropped on the right in twips.
     755             :     sal_uInt16 dxaCropRightGet() {
     756             :         return SVBT16ToShort(dxaCropRight); }
     757             :     SVBT16 dyaCropBottom;// 0x2a    the amount the picture has been cropped on the bottom in twips.
     758             :     sal_uInt16 dyaCropBottomGet() {
     759             :         return SVBT16ToShort(dyaCropBottom); }
     760             :     SVBT16 flags;
     761             :     sal_uInt16 flagsGet() {
     762             :         return SVBT16ToShort(flags); }
     763             : //  brcl : 4;// 000F    Obsolete, superseded by brcTop, etc. In
     764             :     sal_uInt8 brclGet() {
     765             :         return sal::static_int_cast< sal_uInt8, sal_uInt16 >(flagsGet() & 0xf); }
     766             : //  fFrameEmpty : 1;// 0010 picture consists of a single frame
     767             :     sal_Bool fFrameEmptyGet() {
     768             :         return sal::static_int_cast< sal_uInt8, sal_uInt16 >((flagsGet() >> 4) & 1); }
     769             : // win6 stuff:
     770             : //  fBitmap : 1;// 0020 ==1, when picture is just a bitmap
     771             : //  sal_Bool fBitmapGet() {
     772             : //      return (flagsGet() >> 5) & 1; }
     773             : //  fDrawHatch : 1;// 0040  ==1, when picture is an active OLE object
     774             : //  sal_Bool fDrawHatchGet() {
     775             : //      return (flagsGet() >> 6) & 1; }
     776             : //  fError : 1;// 0080  ==1, when picture is just an error message
     777             : //  sal_Bool fErrorGet() {
     778             : //      return (flagsGet() >> 7) & 1; }
     779             : //  bpp : 8;// FF00 bits per pixel, 0 = unknown
     780             : //  sal_uInt8 bppGet() {
     781             : //      return (flagsGet() >> 8) & 0xff; }
     782             : //  SVBT16 rgbrc[4];
     783             : //  sal_uInt16 rgbrcGet(sal_uInt16 nIndex) {
     784             : //      return SVBT16ToShort(rgbrc[nIndex]); }
     785             : //  W1_BRC brcTop;// 0x2e   specification for border above picture
     786             : //  W1_BRC brcLeft;// 0x30 specification for border to the left
     787             : //  W1_BRC brcBottom;// 0x32    specification for border below picture
     788             : //  W1_BRC brcRight;// 0x34 specification for border to the right
     789             : //  SVBT16 dxaOrigin;// 0x36    horizontal offset of hand annotation origin
     790             : //  sal_uInt16 dxaOriginGet() {
     791             : //      return SVBT16ToShort(dxaOrigin); }
     792             : //  SVBT16 dyaOrigin;// 0x38    vertical offset of hand annotation origin
     793             : //  sal_uInt16 dyaOriginGet() {
     794             : //      return SVBT16ToShort(dyaOrigin); }
     795             :     sal_uInt8 rgb;// 0x3a   variable array of bytes containing Window's metafile, bitmap or TIFF file filename.
     796           0 :     sal_uInt8* rgbGet() { return &rgb; }
     797             : };
     798             : 
     799             : struct W1_TBD
     800             : {
     801             :     sal_uInt8 aBits1;
     802           0 :     sal_uInt8 aBits1Get() { return aBits1; }
     803             : // sal_uInt8 jc : 3;// 0x07 justification code: 0=left tab, 1=centered tab, 2=right tab, 3=decimal tab, 4=bar
     804           0 :     sal_uInt8 jcGet() {
     805           0 :         return aBits1Get() & 0x07; }
     806             : // sal_uInt8 tlc : 3;// 0x38    tab leader code: 0=no leader, 1=dotted leader,
     807             :                         // 2=hyphenated leader, 3=single line leader, 4=heavy line leader
     808           0 :     sal_uInt8 tlcGet() {
     809           0 :         return (aBits1Get() >> 3 ) & 0x07; }
     810             : // *    int :2  C0  reserved
     811             : };
     812             : 
     813             : struct W1_TC
     814             : {
     815             :     sal_uInt8 aBits1;
     816           0 :     sal_uInt8 aBits1Get() { return aBits1; }
     817             :     sal_uInt8 fFirstMergedGet() {
     818             :         return aBits1Get() & 0x01; }
     819           0 :     sal_uInt8 fMergedGet() {
     820           0 :         return (aBits1Get() >> 1 ) & 0x01; }
     821             :     sal_uInt8 aBits2;
     822             : // SVBT16 fFirstMerged : 1;// 0001  set to 1 when cell is first cell of a range of cells that have been merged.
     823             : // SVBT16 fMerged : 1;// 0002   set to 1 when cell has been merged with preceding cell.
     824             : // SVBT16 fUnused : 14;// FFFC  reserved
     825             :     W1_BRC10 rgbrc[4];// notational convenience for referring to brcTop, brcLeft, etc fields.
     826           0 :     W1_BRC10* rgbrcGet() {
     827           0 :         return rgbrc; }
     828             : // BRC brcTop;// specification of the top border of a table cell
     829             : // BRC brcLeft;// specification of left border of table row
     830             : // BRC brcBottom;// specification of bottom border of table row
     831             : // BRC brcRight;// specification of right border of table row.
     832             : };
     833             : // cbTC (count of bytes of a TC) is 10(decimal), A(hex).
     834             : 
     835             : #endif
     836             : 
     837             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10