LCOV - code coverage report
Current view: top level - sw/source/filter/ww1 - w1struct.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 176 0.0 %
Date: 2012-08-25 Functions: 0 100 0.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 0 -

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

Generated by: LCOV version 1.10