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 W1STRUCT_HXX
21 : #define 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 :
317 : SVBT32 fcSttbfAssoc;// 0x10c offset to STTBF of associated strings. See STTBFASSOC.
318 0 : sal_uLong fcSttbfAssocGet() {
319 0 : return SVBT32ToUInt32(fcSttbfAssoc); }
320 : SVBT16 cbSttbfAssoc;// 0x110
321 0 : sal_uInt16 cbSttbfAssocGet() {
322 0 : return SVBT16ToShort(cbSttbfAssoc); }
323 :
324 : SVBT32 fcClx;// 0x112 file offset of beginning of information for complex files.
325 : sal_uLong fcClxGet() {
326 : return SVBT32ToUInt32(fcClx); }
327 : SVBT16 cbClx;// 0x116 count of bytes of complex file information. 0 if file is non-complex.
328 : sal_uInt16 cbClxGet() {
329 : return SVBT16ToShort(cbClx); }
330 :
331 : SVBT32 fcPlcfpgdFtn;// 0x118 file offset of page descriptor PLC for footnote subdocument.
332 : sal_uLong fcPlcfpgdFtnGet() {
333 : return SVBT32ToUInt32(fcPlcfpgdFtn); }
334 : SVBT16 cbPlcfpgdFtn;// 0x11C count of bytes of page descriptor PLC for footnote subdocument.
335 : sal_uInt16 cbPlcfpgdFtnGet() {
336 : return SVBT16ToShort(cbPlcfpgdFtn); }
337 : // ==0 if document has not been paginated. The length of the PGD is 8 bytes.
338 :
339 : SVBT32 fcSpare1;// 0x11e file offset of the name of the original file.
340 : sal_uLong fcSpare1Get() {
341 : return SVBT32ToUInt32(fcSpare1); }
342 : SVBT16 cbSpare1;// 0x122 count of bytes of the name of the original file.
343 : sal_uInt16 cbSpare1Get() {
344 : return SVBT16ToShort(cbSpare1); }
345 : SVBT32 fcSpare2;// 0x124 file offset of the name of the original file.
346 : sal_uLong fcSpare2Get() {
347 : return SVBT32ToUInt32(fcSpare2); }
348 : SVBT16 cbSpare2;// 0x128 count of bytes of the name of the original file.
349 : sal_uInt16 cbSpare2Get() {
350 : return SVBT16ToShort(cbSpare2); }
351 : SVBT32 fcSpare3;// 0x12a file offset of the name of the original file.
352 : sal_uLong fcSpare3Get() {
353 : return SVBT32ToUInt32(fcSpare3); }
354 : SVBT16 cbSpare3;// 0x12e count of bytes of the name of the original file.
355 : sal_uInt16 cbSpare3Get() {
356 : return SVBT16ToShort(cbSpare3); }
357 : SVBT32 fcSpare4;// 0x130 file offset of the name of the original file.
358 : sal_uLong fcSpare4Get() {
359 : return SVBT32ToUInt32(fcSpare4); }
360 : SVBT16 cbSpare4;// 0x134 count of bytes of the name of the original file.
361 : sal_uInt16 cbSpare4Get() {
362 : return SVBT16ToShort(cbSpare4); }
363 :
364 : SVBT16 cpnBteChp;// 0x18E count of CHPX FKPs recorded in file. In non-complex files if the number of
365 : sal_uInt16 cpnBteChpGet() {
366 : return SVBT16ToShort(cpnBteChp); }
367 : // entries in the plcfbteChpx is less than this, the plcfbteChpx is incomplete.
368 : SVBT16 cpnBtePap;// 0x190 count of PAPX FKPs recorded in file. In non-complex files if the number of
369 : sal_uInt16 cpnBtePapGet() {
370 : return SVBT16ToShort(cpnBtePap); }
371 : // entries in the plcfbtePapx is less than this, the plcfbtePapx is incomplete.
372 : };
373 :
374 : struct W1_DOP ///////////////////////////////////// Document Properties
375 : {
376 : SVBT16 fFlags;
377 0 : sal_uInt16 fFlagsGet() {
378 0 : return SVBT16ToShort(fFlags); }
379 : // SVBT16 fFacingPages : 1;// 1 when facing pages should be printed
380 : sal_Bool fFacingPagesGet() {
381 : return 0 != ((fFlagsGet() >> 0) & 1); }
382 : // SVBT16 fWidowControl : 1;// 1 when widow control is in effect. 0 when widow control disabled.
383 : sal_Bool fWidowControlGet() {
384 : return 0 != ((fFlagsGet() >> 1) & 1); }
385 : // SVBT16 : 3;// unused
386 : // SVBT16 fpc : 2;// 1 footnote position code: 0 as endnotes, 1 at bottom of page, 2 immediately beneath text
387 0 : sal_uInt16 fpcGet() {
388 0 : return (sal_uInt16)((fFlagsGet() >> 5) & 3); }
389 : // SVBT16 fWide : 1;// Landscape
390 0 : sal_Bool fWideGet() {
391 0 : return 0 != ((fFlagsGet() >> 7) & 1); }
392 : // SVBT16 grpfIhdt : 8;// 0 specification of document headers and footers. See explanation under Headers and Footers topic.
393 0 : sal_uInt16 grpfIhdtGet() {
394 0 : return (sal_uInt16)((fFlagsGet() >> 8) & 0xff); }
395 : SVBT16 fFtnFlags;
396 0 : sal_uInt16 fFtnFlagsGet() {
397 0 : return SVBT16ToShort(fFtnFlags); }
398 : // SVBT16 fFtnRestart : 1;
399 : sal_Bool fFtnRestartGet() {
400 : return 0 != ((fFtnFlagsGet() >> 0) & 1); }
401 : // SVBT16 nFtn : 15;// 1 initial footnote number for document
402 0 : sal_uInt16 nFtnGet() {
403 0 : return (sal_uInt16)((fFtnFlagsGet() >> 1) & 0x7fff); }
404 : SVBT16 fRvsFlags;
405 : sal_uInt16 fRvsFlagsGet() {
406 : return SVBT16ToShort(fRvsFlags); }
407 : // SVBT16 irmBar : 8;
408 : sal_uInt16 irmBarGet() {
409 : return (sal_uInt16)((fRvsFlagsGet() >> 0) & 0xff); }
410 : // SVBT16 irmProps : 7;
411 : sal_uInt16 irmPropsGet() {
412 : return (sal_uInt16)((fRvsFlagsGet() >> 8) & 0x7f); }
413 : // SVBT16 fRevMarking : 1;// when 1, Word will mark revisions as the document is edited
414 : sal_Bool fRevMarkingGet() {
415 : return 0 != ((fRvsFlagsGet() >> 15) & 1); }
416 : SVBT16 fSveFlags;
417 : sal_uInt16 fSveFlagsGet() {
418 : return SVBT16ToShort(fSveFlags); }
419 : // SVBT16 fBackup : 1;// always make backup when document saved when 1.
420 : sal_Bool fBackupGet() {
421 : return 0 != ((fSveFlagsGet() >> 0) & 1); }
422 : // SVBT16 fExactCWords : 1;
423 : sal_Bool fExactCWordsGet() {
424 : return 0 != ((fSveFlagsGet() >> 1) & 1); }
425 : // SVBT16 fPagHidden : 1;//
426 : sal_Bool fPagHiddenGet() {
427 : return 0 != ((fSveFlagsGet() >> 2) & 1); }
428 : // SVBT16 fPagResults : 1;
429 : sal_Bool fPagResultsGet() {
430 : return 0 != ((fSveFlagsGet() >> 3) & 1); }
431 : // SVBT16 fLockAtn : 1;// when 1, annotations are locked for editing
432 : sal_Bool fLockAtnGet() {
433 : return 0 != ((fSveFlagsGet() >> 4) & 1); }
434 : // SVBT16 fMirrorMargins : 1;// swap margins on left/right pages when 1.
435 : sal_Bool fMirrorMarginsGet() {
436 : return 0 != ((fSveFlagsGet() >> 5) & 1); }
437 : // SVBT16 : 10;// unused
438 : SVBT16 fSpares;
439 : sal_uInt16 fSparesGet() {
440 : return SVBT16ToShort(fSpares); }
441 : SVBT16 yaPage;
442 0 : sal_uInt16 yaPageGet() {
443 0 : return SVBT16ToShort(yaPage); }
444 : SVBT16 xaPage;
445 0 : sal_uInt16 xaPageGet() {
446 0 : return SVBT16ToShort(xaPage); }
447 : SVBT16 dyaTop;
448 0 : sal_uInt16 dyaTopGet() {
449 0 : return SVBT16ToShort(dyaTop); }
450 : SVBT16 dxaLeft;
451 0 : sal_uInt16 dxaLeftGet() {
452 0 : return SVBT16ToShort(dxaLeft); }
453 : SVBT16 dyaBottom;
454 0 : sal_uInt16 dyaBottomGet() {
455 0 : return SVBT16ToShort(dyaBottom); }
456 : SVBT16 dxaRight;
457 0 : sal_uInt16 dxaRightGet() {
458 0 : return SVBT16ToShort(dxaRight); }
459 : SVBT16 dxaGutter;
460 0 : sal_uInt16 dxaGutterGet() {
461 0 : return SVBT16ToShort(dxaGutter); }
462 : SVBT16 dxaTab;// 720 twips default tab width
463 0 : sal_uInt16 dxaTabGet() {
464 0 : return SVBT16ToShort(dxaTab); }
465 : SVBT16 wSpare;//
466 : sal_uInt16 wSpareGet() {
467 : return SVBT16ToShort(wSpare); }
468 : SVBT16 dxaHotZ;// width of hyphenation hot zone measured in twips
469 : sal_uInt16 dxaHotZGet() {
470 : return SVBT16ToShort(dxaHotZ); }
471 : SVBT16 rgwSpare[2];// reserved
472 : SVBT32 dttmCreated;// DTTM date and time document was created
473 : sal_uLong dttmCreatedGet() {
474 : return SVBT32ToUInt32(dttmCreated); }
475 : SVBT32 dttmRevised;// DTTM date and time document was last revised
476 : sal_uLong dttmRevisedGet() {
477 : return SVBT32ToUInt32(dttmRevised); }
478 : SVBT32 dttmLastPrint;// DTTM date and time document was last printed
479 : sal_uLong dttmLastPrintGet() {
480 : return SVBT32ToUInt32(dttmLastPrint); }
481 : SVBT16 nRevision;// number of times document has been revised since its creation
482 : sal_uInt16 nRevisionGet() {
483 : return SVBT16ToShort(nRevision); }
484 : SVBT32 tmEdited;// time document was last edited
485 : sal_uLong tmEditedGet() {
486 : return SVBT32ToUInt32(tmEdited); }
487 : SVBT32 cWords;// count of words tallied by last Word Count execution
488 : sal_uLong cWordsGet() {
489 : return SVBT32ToUInt32(cWords); }
490 : SVBT32 cCh;// count of characters tallied by last Word Count execution
491 : sal_uLong cChGet() {
492 : return SVBT32ToUInt32(cCh); }
493 : SVBT16 cPg;// count of pages tallied by last Word Count execution
494 : sal_uInt16 cPgGet() {
495 : return SVBT16ToShort(cPg); }
496 : SVBT16 rgwSpareDocSum[2];
497 : };
498 : // cbDOP is 66.
499 :
500 : struct W1_CHP /////////////////////////////////////////////////////////
501 : {
502 : SVBT16 fChar;
503 : SVBT16 ftc;// Font Code
504 : SVBT8 hps;// Font size in half points
505 : SVBT8 hpsPos;// Sub/Superscript ( signed number, 0 = normal )
506 : SVBT16 fText;
507 : SVBT32 fcPic;// not stored in File
508 : SVBT8 fnPic;// internal
509 : SVBT16 hpsLargeChp;// ???
510 :
511 0 : W1_CHP() { memset( this, 0, sizeof( *this)); }
512 :
513 0 : sal_uInt16 fCharGet() { return SVBT16ToShort(fChar); }
514 : void fCharSet(sal_uInt16 n) { ShortToSVBT16(n, fChar); }
515 0 : sal_Bool fBoldGet() { return 0 != ((fCharGet() >> 0) & 1); }
516 : void fBoldSet(sal_Bool b) { fCharSet( ( fCharGet() & 0xfffe ) | ( b << 0 ) ); }
517 0 : sal_Bool fItalicGet() { return 0 != ((fCharGet() >> 1) & 1); }
518 : void fItalicSet(sal_Bool b) { fCharSet( ( fCharGet() & 0xfffd ) | ( b << 1 ) ); }
519 0 : sal_Bool fStrikeGet() { return 0 != ((fCharGet() >> 2) & 1); }
520 0 : sal_Bool fOutlineGet() { return 0 != ((fCharGet() >> 3) & 1); }
521 : sal_Bool fFldVanishGet() { return 0 != ((fCharGet() >> 4) & 1); }
522 0 : sal_Bool fSmallCapsGet() { return 0 != ((fCharGet() >> 5) & 1); }
523 0 : sal_Bool fCapsGet() { return 0 != ((fCharGet() >> 6) & 1); }
524 : sal_Bool fVanishGet() { return 0 != ((fCharGet() >> 7) & 1); }
525 : sal_Bool fRMarkGet() { return 0 != ((fCharGet() >> 8) & 1); }
526 : sal_Bool fSpecGet() { return 0 != ((fCharGet() >> 9) & 1); }
527 0 : sal_Bool fsIcoGet() { return 0 != ((fCharGet() >> 10) & 1); }
528 0 : sal_Bool fsFtcGet() { return 0 != ((fCharGet() >> 11) & 1); }
529 : void fsFtcSet(sal_Bool b) { fCharSet( ( fCharGet() & 0xf7ff ) | ( b << 11 ) ); }
530 0 : sal_Bool fsHpsGet() { return 0 != ((fCharGet() >> 12) & 1); }
531 : void fsHpsSet(sal_Bool b) { fCharSet( ( fCharGet() & 0xefff ) | ( b << 12 ) ); }
532 0 : sal_Bool fsKulGet() { return 0 != ((fCharGet() >> 13) & 1); }
533 : void fsKulSet(sal_Bool b) { fCharSet( ( fCharGet() & 0xdfff ) | ( b << 13 ) ); }
534 0 : sal_Bool fsPosGet() { return 0 != ((fCharGet() >> 14) & 1); }
535 0 : sal_Bool fsSpaceGet() { return 0 != ((fCharGet() >> 15) & 1); }
536 : // SVBT16 fBold :1;// 1 == opposite boldness of style
537 : // SVBT16 fItalic :1;// 1 == opposite of style
538 : // SVBT16 fStrike :1;// 1 == opposite of style
539 : // SVBT16 fOutline :1;// 1 == opposite of style
540 : // SVBT16 fFldVanish :1;// 1 == opposite of style
541 : // SVBT16 fSmallCaps :1;// 1 == opposite of style
542 : // SVBT16 fCaps :1;// 1 == opposite of style
543 : // SVBT16 fVanish :1;// 1 == opposite of style
544 : // SVBT16 fRMark :1;// ???
545 : // SVBT16 fSpec :1;// 1 == opposite of style
546 : // SVBT16 fsIco :1;// 1 == Color (ico) different to style
547 : // SVBT16 fsFtc :1;// 1 == FontCode (ftc) different to style
548 : // SVBT16 fsHps :1;// 1 == FontSize (hps) different to style
549 : // SVBT16 fsKul :1;// 1 == Underline Code (kul) different to style
550 : // SVBT16 fsPos :1;// 1 == Char position (hpsPos) different to style
551 : // SVBT16 fsSpace :1;// 1 == Char Spacing (qpsSpace) different to style
552 :
553 0 : sal_uInt16 ftcGet() { return SVBT16ToShort(ftc); }
554 : void ftcSet(sal_uInt16 n) { ShortToSVBT16(n, ftc); }
555 0 : void hpsSet(sal_uInt8 n) { ByteToSVBT8(n, hps); }
556 0 : sal_uInt8 hpsGet() { return SVBT8ToByte(hps); }
557 :
558 0 : sal_uInt8 hpsPosGet() { return SVBT8ToByte(hpsPos); }
559 0 : sal_uInt16 fTextGet() { return SVBT16ToShort(fText); }
560 : void fTextSet(sal_uInt16 n) { ShortToSVBT16(n, fText); }
561 0 : sal_uInt16 qpsSpaceGet() { return (sal_uInt16)((fTextGet() >> 0) & 0x3f); }
562 : sal_uInt16 wSpare2Get() { return (sal_uInt16)((fTextGet() >> 6) & 3); }
563 0 : sal_uInt16 icoGet() { return (sal_uInt16)((fTextGet() >> 8) & 0xf); }
564 0 : sal_uInt16 kulGet() { return (sal_uInt16)((fTextGet() >> 12) & 7); }
565 : void kulSet(sal_uInt16 n) { fTextSet( ( fTextGet() & 0x8fff ) | ( ( n & 7 ) << 12 ) ); }
566 : sal_Bool fSysVanishGet() { return 0 != ((fTextGet() >> 15) & 1); }
567 : // SVBT16 qpsSpace :6;// Char Spacing, -7 .. 56; 57 = -7, 63 = -1
568 : // SVBT16 wSpare2 : 2;// reserved
569 : // SVBT16 ico :4;// color of Text: 0=black, 1=blue, 2=cyan, 3=green, 4=magenta, 5=red, 6=yellow, 7=white
570 : // SVBT16 kul: 3;// Underline code: 0=none, 1=single, 2=by word, 3=double, 4=dotted
571 : // SVBT16 fSysVanish: 1;// used internally
572 :
573 0 : sal_uLong fcPicGet() { return SVBT32ToUInt32(fcPic); }
574 : sal_uInt16 fnPicGet() { return SVBT8ToByte(fnPic); }
575 : sal_uInt16 hpsLargeChpGet() { return SVBT16ToShort(hpsLargeChp); }
576 :
577 : void Out(Ww1Shell&, Ww1Manager&);
578 : };
579 :
580 : struct W1_FFN ///////////////////////////////////////// Font Descriptor
581 : {
582 : SVBT8 cbFfnM1;// 0x0 total length of FFN - 1.
583 0 : sal_uInt16 cbFfnM1Get() {
584 0 : return SVBT8ToByte(cbFfnM1); }
585 : SVBT8 fFlags;
586 0 : sal_uInt16 fFlagsGet() {
587 0 : return SVBT8ToByte(fFlags); }
588 : // SVBT8 prg : 2;// 0x1:03 pitch request
589 0 : sal_uInt16 prgGet() {
590 0 : return (sal_uInt16)((fFlagsGet() >> 0) & 3); }
591 : // SVBT8 fTrueType : 1;// 0x1:04 when 1, font is a TrueType font
592 : sal_Bool fTrueTypeGet() {
593 : return 0 != ((fFlagsGet() >> 2) & 1); }
594 : // SVBT8 : 1;// 0x1:08 reserved
595 : // SVBT8 ff : 3;// 0x1:70 font family id
596 0 : sal_uInt16 ffGet() {
597 0 : return (sal_uInt16)((fFlagsGet() >> 4) & 7); }
598 : // SVBT8 : 1;// 0x1:80 reserved
599 : sal_uInt8 szFfn[65];// 0x6 zero terminated string that records name of font.
600 : // Vorsicht: Dieses Array kann auch kleiner sein!!!
601 : // Possibly followed by a second sz which records the name of an
602 : // alternate font to use if the first named font does not exist
603 : // on this system. Maximal size of szFfn is 65 characters.
604 0 : sal_uInt8* szFfnGet() { return szFfn; }
605 : };
606 :
607 : struct W1_PHE /////////////////////////////////////// Paragraph Height
608 : {
609 : SVBT16 fFlags;
610 : sal_uInt16 fFlagsGet() {
611 : return SVBT16ToShort(fFlags); }
612 : sal_Bool fSpareGet() {
613 : return 0 != (fFlagsGet() & 1); }
614 : sal_Bool fUnkGet() {
615 : return 0 != ((fFlagsGet() >> 1) & 1); }
616 : sal_Bool fDiffLinesGet() {
617 : return 0 != ((fFlagsGet() >> 2) & 1); }
618 : sal_uInt8 clMacGet() {
619 : return sal::static_int_cast< sal_uInt8, sal_uInt16 >((fFlagsGet() >> 8) & 0xff); }
620 : SVBT16 dxaCol;
621 : sal_uInt16 dxaColGet() {
622 : return SVBT16ToShort(dxaCol); }
623 : SVBT16 xxx; // beachte die dreifachnutzung.... siehe doc.
624 : sal_uInt16 dylHeightGet() {
625 : return SVBT16ToShort(xxx); }
626 : sal_uInt16 dylLineGet() {
627 : return SVBT16ToShort(xxx); }
628 : sal_uInt16 fStyleDirtyGet() {
629 : return SVBT16ToShort(xxx); }
630 : };
631 :
632 : struct W1_PAPX ///////////////////////// Paragraph Property Difference
633 : {
634 : SVBT8 stc;
635 0 : sal_uInt8 stcGet() {
636 0 : return SVBT8ToByte(stc); }
637 : W1_PHE phe;
638 : sal_uInt8 grpprl[1];
639 0 : sal_uInt8* grpprlGet() {
640 0 : return grpprl; }
641 : };
642 :
643 : struct W1_BRC //////////////////////////////////////////// Border Code
644 : {
645 : SVBT16 aBits;
646 : sal_uInt16 aBitsGet() {
647 : return SVBT16ToShort(aBits); }
648 : // SVBT16 dxpLineWidth : 3;// 0007 When dxpLineWidth is 0, 1, 2, 3, 4, or 5,
649 : // this field is the width of a single line of border
650 : // in units of 0.75 points Must be nonzero when brcType
651 : // is nonzero. 6 == dotted, 7 == dashed.
652 : sal_uInt8 dxpLineWidthGet() {
653 : return sal::static_int_cast< sal_uInt8, sal_uInt16 >((aBitsGet() >> 0) & 0x0007); }
654 : // SVBT16 brcType : 2;// 0018 border type code: 0 == none, 1 == single, 2 == thick,
655 : // 3 == double
656 : sal_uInt8 brcTypeGet() {
657 : return sal::static_int_cast< sal_uInt8, sal_uInt16 >((aBitsGet() >> 3) & 0x0003); }
658 : // SVBT16 fShadow : 1;// 0020 when 1, border is drawn with shadow. Must be 0
659 : // when BRC is a substructure of the TC
660 : sal_uInt8 fShadowGet() {
661 : return sal::static_int_cast< sal_uInt8, sal_uInt16 >((aBitsGet() >> 5) & 0x0001); }
662 : // SVBT16 ico : 5;// 07C0 color code (see chp.ico)
663 : sal_uInt8 icoGet() {
664 : return sal::static_int_cast< sal_uInt8, sal_uInt16 >((aBitsGet() >> 6) & 0x001f); }
665 : // SVBT16 dxpSpace : 5;// F800 width of space to maintain between border and
666 : // text within border. Must be 0 when BRC is a
667 : // substructure of the TC. Stored in points for Windows.
668 : sal_uInt8 dxpSpaceGet() {
669 : return sal::static_int_cast< sal_uInt8, sal_uInt16 >((aBitsGet() >> 11) & 0x001f); }
670 : };
671 :
672 : struct W1_BRC10 ///////////////////////////////// Border Code Word 1.0
673 : {
674 : SVBT16 aBits;
675 0 : sal_uInt16 aBitsGet() {
676 0 : return SVBT16ToShort(aBits); }
677 0 : sal_uInt8 dxpLine2WidthGet() {
678 0 : return sal::static_int_cast< sal_uInt8, sal_uInt16 >((aBitsGet() >> 0) & 0x0007); }
679 : sal_uInt8 dxpSpaceBetweenGet() {
680 : return sal::static_int_cast< sal_uInt8, sal_uInt16 >((aBitsGet() >> 3) & 0x0007); }
681 0 : sal_uInt8 dxpLine1WidthGet() {
682 0 : return sal::static_int_cast< sal_uInt8, sal_uInt16 >((aBitsGet() >> 6) & 0x0007); }
683 0 : sal_uInt8 dxpSpaceGet() {
684 0 : return sal::static_int_cast< sal_uInt8, sal_uInt16 >((aBitsGet() >> 9) & 0x001f); }
685 0 : sal_uInt8 fShadowGet() {
686 0 : return sal::static_int_cast< sal_uInt8, sal_uInt16 >((aBitsGet() >> 14) & 0x0001); }
687 : sal_uInt8 fSpareGet() {
688 : return sal::static_int_cast< sal_uInt8, sal_uInt16 >((aBitsGet() >> 15) & 0x0001); }
689 : };
690 :
691 : struct W1_FLD //////////////////////////////////////// FieldDescriptor
692 : {
693 : SVBT8 ch; // boundary-type (begin(19), separator (20), end (21))
694 0 : sal_uInt8 chGet() {
695 0 : return SVBT8ToByte(ch); }
696 : SVBT8 flt; // field type / flags
697 0 : sal_uInt8 fltGet() {
698 0 : return SVBT8ToByte(flt); }
699 : // variant, when ch==21:
700 : sal_Bool fDifferGet() {
701 : return (fltGet() >> 0) & 1; }
702 : sal_Bool fResultDirtyGet() {
703 : return (fltGet() >> 2) & 1; }
704 : sal_Bool ResultEditedGet() {
705 : return (fltGet() >> 3) & 1; }
706 : sal_Bool fLockedGet() {
707 : return (fltGet() >> 4) & 1; }
708 : sal_Bool fPrivateResultGet() {
709 : return (fltGet() >> 5) & 1; }
710 : sal_Bool fNestedGet() {
711 : return (fltGet() >> 6) & 1; }
712 : };
713 :
714 : struct W1_PIC /////////////////////////////////////// PictureStructure
715 : {
716 : 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.
717 0 : sal_uLong lcbGet() {
718 0 : return SVBT32ToUInt32(lcb); }
719 : SVBT16 cbHeader;// 0x4 number of bytes in the PIC (to allow for future expansion).
720 : sal_uInt16 cbHeaderGet() {
721 : return SVBT16ToShort(cbHeader); }
722 : struct MFP {
723 : SVBT16 mm;// 0x6 int
724 0 : sal_uInt16 mmGet() {
725 0 : return SVBT16ToShort(mm); }
726 : SVBT16 xExt;// 0x8 int
727 0 : sal_uInt16 xExtGet() {
728 0 : return SVBT16ToShort(xExt); }
729 : SVBT16 yExt;// 0xa int
730 0 : sal_uInt16 yExtGet() {
731 0 : return SVBT16ToShort(yExt); }
732 : SVBT16 hMF;// 0xc int
733 : sal_uInt16 hMFGet() {
734 : return SVBT16ToShort(hMF); }
735 : } mfp;
736 : union W1_MFP_BMP {
737 : SVBT8 bm[14];// 0xe BITMAP(14 bytes) Window's bitmap structure when PIC describes a BITMAP.
738 : SVBT8 rcWinMF[14];// 0xe rc (rectangle - 8 bytes) rect for window origin and extents when metafile is stored -- ignored if 0
739 : } MFP_BMP;
740 : SVBT16 dxaGoal;// 0x1c horizontal measurement in twips of the rectangle the picture should be imaged within.
741 : sal_uInt16 dxaGoalGet() {
742 : return SVBT16ToShort(dxaGoal); }
743 : SVBT16 dyaGoal;// 0x1e vertical measurement in twips of the rectangle the picture should be imaged within.
744 : sal_uInt16 dyaGoalGet() {
745 : return SVBT16ToShort(dyaGoal); }
746 : SVBT16 mx;// 0x20 horizontal scaling factor supplied by user in .1% units.
747 : sal_uInt16 mxGet() {
748 : return SVBT16ToShort(mx); }
749 : SVBT16 my;// 0x22 vertical scaling factor supplied by user in .1% units.
750 : sal_uInt16 myGet() {
751 : return SVBT16ToShort(my); }
752 : SVBT16 dxaCropLeft;// 0x24 the amount the picture has been cropped on the left in twips.
753 : sal_uInt16 dxaCropLeftGet() {
754 : return SVBT16ToShort(dxaCropLeft); }
755 : SVBT16 dyaCropTop;// 0x26 the amount the picture has been cropped on the top in twips.
756 : sal_uInt16 dyaCropTopGet() {
757 : return SVBT16ToShort(dyaCropTop); }
758 : SVBT16 dxaCropRight;// 0x28 the amount the picture has been cropped on the right in twips.
759 : sal_uInt16 dxaCropRightGet() {
760 : return SVBT16ToShort(dxaCropRight); }
761 : SVBT16 dyaCropBottom;// 0x2a the amount the picture has been cropped on the bottom in twips.
762 : sal_uInt16 dyaCropBottomGet() {
763 : return SVBT16ToShort(dyaCropBottom); }
764 : SVBT16 flags;
765 : sal_uInt16 flagsGet() {
766 : return SVBT16ToShort(flags); }
767 : // brcl : 4;// 000F Obsolete, superseded by brcTop, etc. In
768 : sal_uInt8 brclGet() {
769 : return sal::static_int_cast< sal_uInt8, sal_uInt16 >(flagsGet() & 0xf); }
770 : // fFrameEmpty : 1;// 0010 picture consists of a single frame
771 : sal_Bool fFrameEmptyGet() {
772 : return sal::static_int_cast< sal_uInt8, sal_uInt16 >((flagsGet() >> 4) & 1); }
773 : // win6 stuff:
774 : // fBitmap : 1;// 0020 ==1, when picture is just a bitmap
775 : // sal_Bool fBitmapGet() {
776 : // return (flagsGet() >> 5) & 1; }
777 : // fDrawHatch : 1;// 0040 ==1, when picture is an active OLE object
778 : // sal_Bool fDrawHatchGet() {
779 : // return (flagsGet() >> 6) & 1; }
780 : // fError : 1;// 0080 ==1, when picture is just an error message
781 : // sal_Bool fErrorGet() {
782 : // return (flagsGet() >> 7) & 1; }
783 : // bpp : 8;// FF00 bits per pixel, 0 = unknown
784 : // sal_uInt8 bppGet() {
785 : // return (flagsGet() >> 8) & 0xff; }
786 : // SVBT16 rgbrc[4];
787 : // sal_uInt16 rgbrcGet(sal_uInt16 nIndex) {
788 : // return SVBT16ToShort(rgbrc[nIndex]); }
789 : // W1_BRC brcTop;// 0x2e specification for border above picture
790 : // W1_BRC brcLeft;// 0x30 specification for border to the left
791 : // W1_BRC brcBottom;// 0x32 specification for border below picture
792 : // W1_BRC brcRight;// 0x34 specification for border to the right
793 : // SVBT16 dxaOrigin;// 0x36 horizontal offset of hand annotation origin
794 : // sal_uInt16 dxaOriginGet() {
795 : // return SVBT16ToShort(dxaOrigin); }
796 : // SVBT16 dyaOrigin;// 0x38 vertical offset of hand annotation origin
797 : // sal_uInt16 dyaOriginGet() {
798 : // return SVBT16ToShort(dyaOrigin); }
799 : SVBT8 rgb;// 0x3a variable array of bytes containing Window's metafile, bitmap or TIFF file filename.
800 0 : sal_uInt8* rgbGet() {
801 0 : return rgb; }
802 : };
803 :
804 : struct W1_TBD /////////////////////////////////////////////////////////
805 : {
806 : SVBT8 aBits1;
807 0 : sal_uInt8 aBits1Get() {
808 0 : return SVBT8ToByte(aBits1); }
809 : // SVBT8 jc : 3;// 0x07 justification code: 0=left tab, 1=centered tab, 2=right tab, 3=decimal tab, 4=bar
810 0 : sal_uInt8 jcGet() {
811 0 : return aBits1Get() & 0x07; }
812 : // SVBT8 tlc : 3;// 0x38 tab leader code: 0=no leader, 1=dotted leader,
813 : // 2=hyphenated leader, 3=single line leader, 4=heavy line leader
814 0 : sal_uInt8 tlcGet() {
815 0 : return (aBits1Get() >> 3 ) & 0x07; }
816 : // * int :2 C0 reserved
817 : };
818 :
819 : struct W1_TC //////////////////////////////////////////////////////////
820 : {
821 : SVBT8 aBits1;
822 0 : sal_uInt8 aBits1Get() {
823 0 : return SVBT8ToByte(aBits1); }
824 : sal_uInt8 fFirstMergedGet() {
825 : return aBits1Get() & 0x01; }
826 0 : sal_uInt8 fMergedGet() {
827 0 : return (aBits1Get() >> 1 ) & 0x01; }
828 : SVBT8 aBits2;
829 : // SVBT16 fFirstMerged : 1;// 0001 set to 1 when cell is first cell of a range of cells that have been merged.
830 : // SVBT16 fMerged : 1;// 0002 set to 1 when cell has been merged with preceding cell.
831 : // SVBT16 fUnused : 14;// FFFC reserved
832 : W1_BRC10 rgbrc[4];// notational convenience for referring to brcTop, brcLeft, etc fields.
833 0 : W1_BRC10* rgbrcGet() {
834 0 : return rgbrc; }
835 : // BRC brcTop;// specification of the top border of a table cell
836 : // BRC brcLeft;// specification of left border of table row
837 : // BRC brcBottom;// specification of bottom border of table row
838 : // BRC brcRight;// specification of right border of table row.
839 : };
840 : // cbTC (count of bytes of a TC) is 10(decimal), A(hex).
841 :
842 : #endif
843 :
844 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|