fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / sc / source / filter / inc / biffhelper.hxx
blob33d8bd202884001663e04d36f3b12ee440104fc7
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_SC_SOURCE_FILTER_INC_BIFFHELPER_HXX
21 #define INCLUDED_SC_SOURCE_FILTER_INC_BIFFHELPER_HXX
23 #include <oox/helper/binarystreambase.hxx>
25 namespace oox { class SequenceInputStream; }
27 namespace oox {
28 namespace xls {
30 class BiffInputStream;
32 // BIFF12 record identifiers ==================================================
34 const sal_Int32 BIFF12_ID_ARRAY = 0x01AA;
35 const sal_Int32 BIFF12_ID_AUTOFILTER = 0x00A1;
36 const sal_Int32 BIFF12_ID_AUTOSORTSCOPE = 0x01CB;
37 const sal_Int32 BIFF12_ID_BINARYINDEXBLOCK = 0x002A;
38 const sal_Int32 BIFF12_ID_BINARYINDEXROWS = 0x0028;
39 const sal_Int32 BIFF12_ID_BOOKVIEWS = 0x0087;
40 const sal_Int32 BIFF12_ID_BORDER = 0x002E;
41 const sal_Int32 BIFF12_ID_BORDERS = 0x0265;
42 const sal_Int32 BIFF12_ID_BRK = 0x018C;
43 const sal_Int32 BIFF12_ID_CALCPR = 0x009D;
44 const sal_Int32 BIFF12_ID_CELL_BLANK = 0x0001;
45 const sal_Int32 BIFF12_ID_CELL_BOOL = 0x0004;
46 const sal_Int32 BIFF12_ID_CELL_DOUBLE = 0x0005;
47 const sal_Int32 BIFF12_ID_CELL_ERROR = 0x0003;
48 const sal_Int32 BIFF12_ID_CELL_RK = 0x0002;
49 const sal_Int32 BIFF12_ID_CELL_RSTRING = 0x003E;
50 const sal_Int32 BIFF12_ID_CELL_SI = 0x0007;
51 const sal_Int32 BIFF12_ID_CELL_STRING = 0x0006;
52 const sal_Int32 BIFF12_ID_CELLSTYLE = 0x0030;
53 const sal_Int32 BIFF12_ID_CELLSTYLES = 0x026B;
54 const sal_Int32 BIFF12_ID_CELLSTYLEXFS = 0x0272;
55 const sal_Int32 BIFF12_ID_CELLXFS = 0x0269;
56 const sal_Int32 BIFF12_ID_CFCOLOR = 0x0234;
57 const sal_Int32 BIFF12_ID_CFRULE = 0x01CF;
58 const sal_Int32 BIFF12_ID_CHARTPAGESETUP = 0x028C;
59 const sal_Int32 BIFF12_ID_CHARTPROTECTION = 0x029D;
60 const sal_Int32 BIFF12_ID_CHARTSHEETPR = 0x028B;
61 const sal_Int32 BIFF12_ID_CHARTSHEETVIEW = 0x008D;
62 const sal_Int32 BIFF12_ID_CHARTSHEETVIEWS = 0x008B;
63 const sal_Int32 BIFF12_ID_COL = 0x003C;
64 const sal_Int32 BIFF12_ID_COLBREAKS = 0x018A;
65 const sal_Int32 BIFF12_ID_COLOR = 0x023C;
66 const sal_Int32 BIFF12_ID_COLORS = 0x01D9;
67 const sal_Int32 BIFF12_ID_COLORSCALE = 0x01D5;
68 const sal_Int32 BIFF12_ID_COLS = 0x0186;
69 const sal_Int32 BIFF12_ID_COMMENT = 0x027B;
70 const sal_Int32 BIFF12_ID_COMMENTAUTHOR = 0x0278;
71 const sal_Int32 BIFF12_ID_COMMENTAUTHORS = 0x0276;
72 const sal_Int32 BIFF12_ID_COMMENTLIST = 0x0279;
73 const sal_Int32 BIFF12_ID_COMMENTS = 0x0274;
74 const sal_Int32 BIFF12_ID_COMMENTTEXT = 0x027D;
75 const sal_Int32 BIFF12_ID_CONDFORMATTING = 0x01CD;
76 const sal_Int32 BIFF12_ID_CONNECTION = 0x00C9;
77 const sal_Int32 BIFF12_ID_CONNECTIONS = 0x01AD;
78 const sal_Int32 BIFF12_ID_CONTROL = 0x0284;
79 const sal_Int32 BIFF12_ID_CONTROLS = 0x0283;
80 const sal_Int32 BIFF12_ID_CUSTOMCHARTVIEW = 0x028F;
81 const sal_Int32 BIFF12_ID_CUSTOMCHARTVIEWS = 0x028D;
82 const sal_Int32 BIFF12_ID_CUSTOMFILTER = 0x00AE;
83 const sal_Int32 BIFF12_ID_CUSTOMFILTERS = 0x00AC;
84 const sal_Int32 BIFF12_ID_CUSTOMSHEETVIEW = 0x01A7;
85 const sal_Int32 BIFF12_ID_CUSTOMSHEETVIEWS = 0x01A6;
86 const sal_Int32 BIFF12_ID_CUSTOMWORKBOOKVIEW= 0x018D;
87 const sal_Int32 BIFF12_ID_DATABAR = 0x01D3;
88 const sal_Int32 BIFF12_ID_DATATABLE = 0x01AC;
89 const sal_Int32 BIFF12_ID_DATAVALIDATION = 0x0040;
90 const sal_Int32 BIFF12_ID_DATAVALIDATIONS = 0x023D;
91 const sal_Int32 BIFF12_ID_DDEITEMVALUES = 0x0242;
92 const sal_Int32 BIFF12_ID_DDEITEM_BOOL = 0x0248;
93 const sal_Int32 BIFF12_ID_DDEITEM_DOUBLE = 0x0244;
94 const sal_Int32 BIFF12_ID_DDEITEM_ERROR = 0x0245;
95 const sal_Int32 BIFF12_ID_DDEITEM_STRING = 0x0246;
96 const sal_Int32 BIFF12_ID_DEFINEDNAME = 0x0027;
97 const sal_Int32 BIFF12_ID_DIMENSION = 0x0094;
98 const sal_Int32 BIFF12_ID_DISCRETEFILTER = 0x00A7;
99 const sal_Int32 BIFF12_ID_DISCRETEFILTERS = 0x00A5;
100 const sal_Int32 BIFF12_ID_DRAWING = 0x0226;
101 const sal_Int32 BIFF12_ID_DXF = 0x01FB;
102 const sal_Int32 BIFF12_ID_DXFS = 0x01F9;
103 const sal_Int32 BIFF12_ID_EXTCELL_BLANK = 0x016F;
104 const sal_Int32 BIFF12_ID_EXTCELL_BOOL = 0x0171;
105 const sal_Int32 BIFF12_ID_EXTCELL_DOUBLE = 0x0170;
106 const sal_Int32 BIFF12_ID_EXTCELL_ERROR = 0x0172;
107 const sal_Int32 BIFF12_ID_EXTCELL_STRING = 0x0173;
108 const sal_Int32 BIFF12_ID_EXTERNALADDIN = 0x029B;
109 const sal_Int32 BIFF12_ID_EXTERNALBOOK = 0x0168;
110 const sal_Int32 BIFF12_ID_EXTERNALNAME = 0x0241;
111 const sal_Int32 BIFF12_ID_EXTERNALREF = 0x0163;
112 const sal_Int32 BIFF12_ID_EXTERNALREFS = 0x0161;
113 const sal_Int32 BIFF12_ID_EXTERNALSELF = 0x0165;
114 const sal_Int32 BIFF12_ID_EXTERNALSAME = 0x0166;
115 const sal_Int32 BIFF12_ID_EXTERNALSHEETS = 0x016A;
116 const sal_Int32 BIFF12_ID_EXTROW = 0x016E;
117 const sal_Int32 BIFF12_ID_EXTSHEETDATA = 0x016B;
118 const sal_Int32 BIFF12_ID_EXTERNALNAMEFLAGS = 0x024A;
119 const sal_Int32 BIFF12_ID_EXTSHEETNAMES = 0x0167;
120 const sal_Int32 BIFF12_ID_FILESHARING = 0x0224;
121 const sal_Int32 BIFF12_ID_FILEVERSION = 0x0080;
122 const sal_Int32 BIFF12_ID_FILL = 0x002D;
123 const sal_Int32 BIFF12_ID_FILLS = 0x025B;
124 const sal_Int32 BIFF12_ID_FILTERCOLUMN = 0x00A3;
125 const sal_Int32 BIFF12_ID_FONT = 0x002B;
126 const sal_Int32 BIFF12_ID_FONTS = 0x0263;
127 const sal_Int32 BIFF12_ID_FORMULA_STRING = 0x0008;
128 const sal_Int32 BIFF12_ID_FORMULA_DOUBLE = 0x0009;
129 const sal_Int32 BIFF12_ID_FORMULA_BOOL = 0x000A;
130 const sal_Int32 BIFF12_ID_FORMULA_ERROR = 0x000B;
131 const sal_Int32 BIFF12_ID_FUNCTIONGROUP = 0x0299;
132 const sal_Int32 BIFF12_ID_FUNCTIONGROUPS = 0x0298;
133 const sal_Int32 BIFF12_ID_HEADERFOOTER = 0x01DF;
134 const sal_Int32 BIFF12_ID_HYPERLINK = 0x01EE;
135 const sal_Int32 BIFF12_ID_ICONSET = 0x01D1;
136 const sal_Int32 BIFF12_ID_INDEXEDCOLORS = 0x0235;
137 const sal_Int32 BIFF12_ID_INPUTCELLS = 0x01F8;
138 const sal_Int32 BIFF12_ID_LEGACYDRAWING = 0x0227;
139 const sal_Int32 BIFF12_ID_MERGECELL = 0x00B0;
140 const sal_Int32 BIFF12_ID_MERGECELLS = 0x00B1;
141 const sal_Int32 BIFF12_ID_MRUCOLORS = 0x0239;
142 const sal_Int32 BIFF12_ID_MULTCELL_BLANK = 0x000C;
143 const sal_Int32 BIFF12_ID_MULTCELL_BOOL = 0x000F;
144 const sal_Int32 BIFF12_ID_MULTCELL_DOUBLE = 0x0010;
145 const sal_Int32 BIFF12_ID_MULTCELL_ERROR = 0x000E;
146 const sal_Int32 BIFF12_ID_MULTCELL_RK = 0x000D;
147 const sal_Int32 BIFF12_ID_MULTCELL_RSTRING = 0x003D;
148 const sal_Int32 BIFF12_ID_MULTCELL_SI = 0x0012;
149 const sal_Int32 BIFF12_ID_MULTCELL_STRING = 0x0011;
150 const sal_Int32 BIFF12_ID_NUMFMT = 0x002C;
151 const sal_Int32 BIFF12_ID_NUMFMTS = 0x0267;
152 const sal_Int32 BIFF12_ID_OLEOBJECT = 0x027F;
153 const sal_Int32 BIFF12_ID_OLEOBJECTS = 0x027E;
154 const sal_Int32 BIFF12_ID_OLESIZE = 0x0225;
155 const sal_Int32 BIFF12_ID_PAGEMARGINS = 0x01DC;
156 const sal_Int32 BIFF12_ID_PAGESETUP = 0x01DE;
157 const sal_Int32 BIFF12_ID_PANE = 0x0097;
158 const sal_Int32 BIFF12_ID_PCDEFINITION = 0x00B3;
159 const sal_Int32 BIFF12_ID_PCDFDISCRETEPR = 0x00E1;
160 const sal_Int32 BIFF12_ID_PCDFGROUPITEMS = 0x00DD;
161 const sal_Int32 BIFF12_ID_PCDFIELD = 0x00B7;
162 const sal_Int32 BIFF12_ID_PCDFIELDGROUP = 0x00DB;
163 const sal_Int32 BIFF12_ID_PCDFIELDS = 0x00B5;
164 const sal_Int32 BIFF12_ID_PCDFRANGEPR = 0x00DF;
165 const sal_Int32 BIFF12_ID_PCDFSHAREDITEMS = 0x00BD;
166 const sal_Int32 BIFF12_ID_PCDSHEETSOURCE = 0x00BB;
167 const sal_Int32 BIFF12_ID_PCDSOURCE = 0x00B9;
168 const sal_Int32 BIFF12_ID_PCITEM_ARRAY = 0x00BF;
169 const sal_Int32 BIFF12_ID_PCITEM_BOOL = 0x0016;
170 const sal_Int32 BIFF12_ID_PCITEM_DATE = 0x0019;
171 const sal_Int32 BIFF12_ID_PCITEM_DOUBLE = 0x0015;
172 const sal_Int32 BIFF12_ID_PCITEM_ERROR = 0x0017;
173 const sal_Int32 BIFF12_ID_PCITEM_INDEX = 0x001A;
174 const sal_Int32 BIFF12_ID_PCITEM_MISSING = 0x0014;
175 const sal_Int32 BIFF12_ID_PCITEM_STRING = 0x0018;
176 const sal_Int32 BIFF12_ID_PCITEMA_BOOL = 0x001D;
177 const sal_Int32 BIFF12_ID_PCITEMA_DATE = 0x0020;
178 const sal_Int32 BIFF12_ID_PCITEMA_DOUBLE = 0x001C;
179 const sal_Int32 BIFF12_ID_PCITEMA_ERROR = 0x001E;
180 const sal_Int32 BIFF12_ID_PCITEMA_MISSING = 0x001B;
181 const sal_Int32 BIFF12_ID_PCITEMA_STRING = 0x001F;
182 const sal_Int32 BIFF12_ID_PCRECORD = 0x0021;
183 const sal_Int32 BIFF12_ID_PCRECORDDT = 0x0022;
184 const sal_Int32 BIFF12_ID_PCRECORDS = 0x00C1;
185 const sal_Int32 BIFF12_ID_PHONETICPR = 0x0219;
186 const sal_Int32 BIFF12_ID_PICTURE = 0x0232;
187 const sal_Int32 BIFF12_ID_PIVOTAREA = 0x00F7;
188 const sal_Int32 BIFF12_ID_PIVOTCACHE = 0x0182;
189 const sal_Int32 BIFF12_ID_PIVOTCACHES = 0x0180;
190 const sal_Int32 BIFF12_ID_PRINTOPTIONS = 0x01DD;
191 const sal_Int32 BIFF12_ID_PTCOLFIELDS = 0x0137;
192 const sal_Int32 BIFF12_ID_PTDATAFIELD = 0x0125;
193 const sal_Int32 BIFF12_ID_PTDATAFIELDS = 0x0127;
194 const sal_Int32 BIFF12_ID_PTDEFINITION = 0x0118;
195 const sal_Int32 BIFF12_ID_PTFIELD = 0x011D;
196 const sal_Int32 BIFF12_ID_PTFIELDS = 0x011F;
197 const sal_Int32 BIFF12_ID_PTFILTER = 0x0259;
198 const sal_Int32 BIFF12_ID_PTFILTERS = 0x0257;
199 const sal_Int32 BIFF12_ID_PTFITEM = 0x011A;
200 const sal_Int32 BIFF12_ID_PTFITEMS = 0x011B;
201 const sal_Int32 BIFF12_ID_PTLOCATION = 0x013A;
202 const sal_Int32 BIFF12_ID_PTPAGEFIELD = 0x0121;
203 const sal_Int32 BIFF12_ID_PTPAGEFIELDS = 0x0123;
204 const sal_Int32 BIFF12_ID_PTREFERENCE = 0x00FB;
205 const sal_Int32 BIFF12_ID_PTREFERENCEITEM = 0x017E;
206 const sal_Int32 BIFF12_ID_PTREFERENCES = 0x00F9;
207 const sal_Int32 BIFF12_ID_PTROWFIELDS = 0x0135;
208 const sal_Int32 BIFF12_ID_QUERYTABLE = 0x01BF;
209 const sal_Int32 BIFF12_ID_QUERYTABLEREFRESH = 0x01C1;
210 const sal_Int32 BIFF12_ID_RGBCOLOR = 0x01DB;
211 const sal_Int32 BIFF12_ID_ROW = 0x0000;
212 const sal_Int32 BIFF12_ID_ROWBREAKS = 0x0188;
213 const sal_Int32 BIFF12_ID_SCENARIO = 0x01F6;
214 const sal_Int32 BIFF12_ID_SCENARIOS = 0x01F4;
215 const sal_Int32 BIFF12_ID_SELECTION = 0x0098;
216 const sal_Int32 BIFF12_ID_SHAREDFMLA = 0x01AB;
217 const sal_Int32 BIFF12_ID_SHEET = 0x009C;
218 const sal_Int32 BIFF12_ID_SHEETDATA = 0x0091;
219 const sal_Int32 BIFF12_ID_SHEETFORMATPR = 0x01E5;
220 const sal_Int32 BIFF12_ID_SHEETPR = 0x0093;
221 const sal_Int32 BIFF12_ID_SHEETPROTECTION = 0x0217;
222 const sal_Int32 BIFF12_ID_SHEETS = 0x008F;
223 const sal_Int32 BIFF12_ID_SHEETVIEW = 0x0089;
224 const sal_Int32 BIFF12_ID_SHEETVIEWS = 0x0085;
225 const sal_Int32 BIFF12_ID_SI = 0x0013;
226 const sal_Int32 BIFF12_ID_SST = 0x009F;
227 const sal_Int32 BIFF12_ID_STYLESHEET = 0x0116;
228 const sal_Int32 BIFF12_ID_TABLE = 0x0157;
229 const sal_Int32 BIFF12_ID_TABLEPART = 0x0295;
230 const sal_Int32 BIFF12_ID_TABLEPARTS = 0x0294;
231 const sal_Int32 BIFF12_ID_TABLESTYLEINFO = 0x0201;
232 const sal_Int32 BIFF12_ID_TABLESTYLES = 0x01FC;
233 const sal_Int32 BIFF12_ID_TOP10FILTER = 0x00AA;
234 const sal_Int32 BIFF12_ID_VOLTYPE = 0x0204;
235 const sal_Int32 BIFF12_ID_VOLTYPEMAIN = 0x0206;
236 const sal_Int32 BIFF12_ID_VOLTYPES = 0x0202;
237 const sal_Int32 BIFF12_ID_VOLTYPESTP = 0x020A;
238 const sal_Int32 BIFF12_ID_VOLTYPETR = 0x020B;
239 const sal_Int32 BIFF12_ID_WEBPR = 0x0105;
240 const sal_Int32 BIFF12_ID_WEBPRTABLES = 0x0107;
241 const sal_Int32 BIFF12_ID_WORKBOOK = 0x0083;
242 const sal_Int32 BIFF12_ID_WORKBOOKPR = 0x0099;
243 const sal_Int32 BIFF12_ID_WORKBOOKVIEW = 0x009E;
244 const sal_Int32 BIFF12_ID_WORKSHEET = 0x0081;
245 const sal_Int32 BIFF12_ID_XF = 0x002F;
247 // BIFF2-BIFF8 record identifiers =============================================
249 /** An enumeration for all binary Excel file format types (BIFF types). */
250 enum BiffType
252 BIFF2 = 0, /// MS Excel 2.1.
253 BIFF3, /// MS Excel 3.0.
254 BIFF4, /// MS Excel 4.0.
255 BIFF5, /// MS Excel 5.0, MS Excel 7.0 (95).
256 BIFF8, /// MS Excel 8.0 (97), 9.0 (2000), 10.0 (XP), 11.0 (2003).
257 BIFF_UNKNOWN /// Unknown BIFF version.
260 const sal_uInt16 BIFF2_MAXRECSIZE = 2080;
261 const sal_uInt16 BIFF8_MAXRECSIZE = 8224;
263 // record identifiers ---------------------------------------------------------
265 const sal_uInt16 BIFF2_ID_ARRAY = 0x0021;
266 const sal_uInt16 BIFF3_ID_ARRAY = 0x0221;
267 const sal_uInt16 BIFF_ID_AUTOFILTER = 0x009D;
268 const sal_uInt16 BIFF2_ID_BLANK = 0x0001;
269 const sal_uInt16 BIFF3_ID_BLANK = 0x0201;
270 const sal_uInt16 BIFF2_ID_BOF = 0x0009;
271 const sal_uInt16 BIFF3_ID_BOF = 0x0209;
272 const sal_uInt16 BIFF4_ID_BOF = 0x0409;
273 const sal_uInt16 BIFF5_ID_BOF = 0x0809;
274 const sal_uInt16 BIFF_ID_BOOKBOOL = 0x00DA;
275 const sal_uInt16 BIFF_ID_BOOKEXT = 0x0863;
276 const sal_uInt16 BIFF2_ID_BOOLERR = 0x0005;
277 const sal_uInt16 BIFF3_ID_BOOLERR = 0x0205;
278 const sal_uInt16 BIFF_ID_BOTTOMMARGIN = 0x0029;
279 const sal_uInt16 BIFF_ID_CALCCOUNT = 0x000C;
280 const sal_uInt16 BIFF_ID_CALCMODE = 0x000D;
281 const sal_uInt16 BIFF_ID_CFHEADER = 0x01B0;
282 const sal_uInt16 BIFF_ID_CFRULE = 0x01B1;
283 const sal_uInt16 BIFF_ID_CFRULE12 = 0x087A;
284 const sal_uInt16 BIFF_ID_CFRULEEXT = 0x087B;
285 const sal_uInt16 BIFF_ID_CH3DDATAFORMAT = 0x105F;
286 const sal_uInt16 BIFF_ID_CHAREA = 0x101A;
287 const sal_uInt16 BIFF_ID_CHAREAFORMAT = 0x100A;
288 const sal_uInt16 BIFF_ID_CHATTACHEDLABEL = 0x100C;
289 const sal_uInt16 BIFF_ID_CHAXESSET = 0x1041;
290 const sal_uInt16 BIFF_ID_CHAXIS = 0x101D;
291 const sal_uInt16 BIFF_ID_CHAXISLINE = 0x1021;
292 const sal_uInt16 BIFF_ID_CHBAR = 0x1017;
293 const sal_uInt16 BIFF_ID_CHBEGIN = 0x1033;
294 const sal_uInt16 BIFF_ID_CHCHART = 0x1002;
295 const sal_uInt16 BIFF_ID_CHCHART3D = 0x103A;
296 const sal_uInt16 BIFF_ID_CHCHARTLINE = 0x101C;
297 const sal_uInt16 BIFF_ID_CHDATAFORMAT = 0x1006;
298 const sal_uInt16 BIFF_ID_CHDATERANGE = 0x1062;
299 const sal_uInt16 BIFF_ID_CHDEFAULTTEXT = 0x1024;
300 const sal_uInt16 BIFF_ID_CHDROPBAR = 0x103D;
301 const sal_uInt16 BIFF_ID_CHECKCOMPAT = 0x088C;
302 const sal_uInt16 BIFF_ID_CHEND = 0x1034;
303 const sal_uInt16 BIFF_ID_CHESCHERFORMAT = 0x1066;
304 const sal_uInt16 BIFF_ID_CHFONT = 0x1026;
305 const sal_uInt16 BIFF_ID_CHFORMAT = 0x104E;
306 const sal_uInt16 BIFF_ID_CHFORMATRUNS = 0x1050;
307 const sal_uInt16 BIFF_ID_CHFRAME = 0x1032;
308 const sal_uInt16 BIFF_ID_CHFRAMEPOS = 0x104F;
309 const sal_uInt16 BIFF_ID_CHFRBLOCKBEGIN = 0x0852;
310 const sal_uInt16 BIFF_ID_CHFRBLOCKEND = 0x0853;
311 const sal_uInt16 BIFF_ID_CHFRCATEGORYPROPS = 0x0856;
312 const sal_uInt16 BIFF_ID_CHFREXTPROPS = 0x089E;
313 const sal_uInt16 BIFF_ID_CHFREXTPROPSCONT = 0x089F;
314 const sal_uInt16 BIFF_ID_CHFRINFO = 0x0850;
315 const sal_uInt16 BIFF_ID_CHFRLABELPROPS = 0x086B;
316 const sal_uInt16 BIFF_ID_CHFRLAYOUT = 0x089D;
317 const sal_uInt16 BIFF_ID_CHFRPLOTAREALAYOUT = 0x08A7;
318 const sal_uInt16 BIFF_ID_CHFRSHAPEPROPS = 0x08A4;
319 const sal_uInt16 BIFF_ID_CHFRTEXTPROPS = 0x08A5;
320 const sal_uInt16 BIFF_ID_CHFRUNITPROPS = 0x0857;
321 const sal_uInt16 BIFF_ID_CHFRWRAPPER = 0x0851;
322 const sal_uInt16 BIFF_ID_CHLABELRANGE = 0x1020;
323 const sal_uInt16 BIFF_ID_CHLEGEND = 0x1015;
324 const sal_uInt16 BIFF_ID_CHLINE = 0x1018;
325 const sal_uInt16 BIFF_ID_CHLINEFORMAT = 0x1007;
326 const sal_uInt16 BIFF_ID_CHMARKERFORMAT = 0x1009;
327 const sal_uInt16 BIFF_ID_CHOBJECTLINK = 0x1027;
328 const sal_uInt16 BIFF_ID_CHPICFORMAT = 0x103C;
329 const sal_uInt16 BIFF_ID_CHPIE = 0x1019;
330 const sal_uInt16 BIFF_ID_CHPIEEXT = 0x1061;
331 const sal_uInt16 BIFF_ID_CHPIEFORMAT = 0x100B;
332 const sal_uInt16 BIFF_ID_CHPIVOTFLAGS = 0x0859;
333 const sal_uInt16 BIFF5_ID_CHPIVOTREF = 0x1048;
334 const sal_uInt16 BIFF8_ID_CHPIVOTREF = 0x0858;
335 const sal_uInt16 BIFF_ID_CHPLOTFRAME = 0x1035;
336 const sal_uInt16 BIFF_ID_CHPLOTGROWTH = 0x1064;
337 const sal_uInt16 BIFF_ID_CHPROPERTIES = 0x1044;
338 const sal_uInt16 BIFF_ID_CHRADARLINE = 0x103E;
339 const sal_uInt16 BIFF_ID_CHRADARAREA = 0x1040;
340 const sal_uInt16 BIFF_ID_CHSCATTER = 0x101B;
341 const sal_uInt16 BIFF_ID_CHSERERRORBAR = 0x105B;
342 const sal_uInt16 BIFF_ID_CHSERGROUP = 0x1045;
343 const sal_uInt16 BIFF_ID_CHSERIES = 0x1003;
344 const sal_uInt16 BIFF_ID_CHSERIESFORMAT = 0x105D;
345 const sal_uInt16 BIFF_ID_CHSERPARENT = 0x104A;
346 const sal_uInt16 BIFF_ID_CHSERTRENDLINE = 0x104B;
347 const sal_uInt16 BIFF_ID_CHSOURCELINK = 0x1051;
348 const sal_uInt16 BIFF_ID_CHSTRING = 0x100D;
349 const sal_uInt16 BIFF_ID_CHSURFACE = 0x103F;
350 const sal_uInt16 BIFF_ID_CHTEXT = 0x1025;
351 const sal_uInt16 BIFF_ID_CHTICK = 0x101E;
352 const sal_uInt16 BIFF_ID_CHTYPEGROUP = 0x1014;
353 const sal_uInt16 BIFF_ID_CHVALUERANGE = 0x101F;
354 const sal_uInt16 BIFF_ID_CODENAME = 0x01BA;
355 const sal_uInt16 BIFF_ID_CODEPAGE = 0x0042;
356 const sal_uInt16 BIFF_ID_COLINFO = 0x007D;
357 const sal_uInt16 BIFF_ID_COLUMNDEFAULT = 0x0020;
358 const sal_uInt16 BIFF_ID_COLWIDTH = 0x0024;
359 const sal_uInt16 BIFF_ID_COMPRESSPICS = 0x089B;
360 const sal_uInt16 BIFF_ID_CONNECTION = 0x0876;
361 const sal_uInt16 BIFF_ID_CONT = 0x003C;
362 const sal_uInt16 BIFF_ID_COORDLIST = 0x00A9;
363 const sal_uInt16 BIFF_ID_COUNTRY = 0x008C;
364 const sal_uInt16 BIFF_ID_CRN = 0x005A;
365 const sal_uInt16 BIFF2_ID_DATATABLE = 0x0036;
366 const sal_uInt16 BIFF3_ID_DATATABLE = 0x0236;
367 const sal_uInt16 BIFF2_ID_DATATABLE2 = 0x0037;
368 const sal_uInt16 BIFF_ID_DATAVALIDATION = 0x01BE;
369 const sal_uInt16 BIFF_ID_DATAVALIDATIONS = 0x01B2;
370 const sal_uInt16 BIFF_ID_DATEMODE = 0x0022;
371 const sal_uInt16 BIFF_ID_DBCELL = 0x00D7;
372 const sal_uInt16 BIFF_ID_DBQUERY = 0x00DC;
373 const sal_uInt16 BIFF_ID_DCONBINAME = 0x01B5;
374 const sal_uInt16 BIFF_ID_DCONNAME = 0x0052;
375 const sal_uInt16 BIFF_ID_DCONREF = 0x0051;
376 const sal_uInt16 BIFF_ID_DEFCOLWIDTH = 0x0055;
377 const sal_uInt16 BIFF2_ID_DEFINEDNAME = 0x0018;
378 const sal_uInt16 BIFF3_ID_DEFINEDNAME = 0x0218;
379 const sal_uInt16 BIFF5_ID_DEFINEDNAME = 0x0018;
380 const sal_uInt16 BIFF2_ID_DEFROWHEIGHT = 0x0025;
381 const sal_uInt16 BIFF3_ID_DEFROWHEIGHT = 0x0225;
382 const sal_uInt16 BIFF_ID_DELTA = 0x0010;
383 const sal_uInt16 BIFF2_ID_DIMENSION = 0x0000;
384 const sal_uInt16 BIFF3_ID_DIMENSION = 0x0200;
385 const sal_uInt16 BIFF_ID_DXF = 0x088D;
386 const sal_uInt16 BIFF_ID_EOF = 0x000A;
387 const sal_uInt16 BIFF_ID_EXTERNALBOOK = 0x01AE;
388 const sal_uInt16 BIFF2_ID_EXTERNALNAME = 0x0023;
389 const sal_uInt16 BIFF3_ID_EXTERNALNAME = 0x0223;
390 const sal_uInt16 BIFF5_ID_EXTERNALNAME = 0x0023;
391 const sal_uInt16 BIFF_ID_EXTERNSHEET = 0x0017;
392 const sal_uInt16 BIFF_ID_EXTSST = 0x00FF;
393 const sal_uInt16 BIFF_ID_FILEPASS = 0x002F;
394 const sal_uInt16 BIFF_ID_FILESHARING = 0x005B;
395 const sal_uInt16 BIFF_ID_FILTERCOLUMN = 0x009E;
396 const sal_uInt16 BIFF_ID_FILTERMODE = 0x009B;
397 const sal_uInt16 BIFF2_ID_FONT = 0x0031;
398 const sal_uInt16 BIFF3_ID_FONT = 0x0231;
399 const sal_uInt16 BIFF5_ID_FONT = 0x0031;
400 const sal_uInt16 BIFF_ID_FONTCOLOR = 0x0045;
401 const sal_uInt16 BIFF_ID_FOOTER = 0x0015;
402 const sal_uInt16 BIFF_ID_FORCEFULLCALC = 0x08A3;
403 const sal_uInt16 BIFF2_ID_FORMAT = 0x001E;
404 const sal_uInt16 BIFF4_ID_FORMAT = 0x041E;
405 const sal_uInt16 BIFF2_ID_FORMULA = 0x0006;
406 const sal_uInt16 BIFF3_ID_FORMULA = 0x0206;
407 const sal_uInt16 BIFF4_ID_FORMULA = 0x0406;
408 const sal_uInt16 BIFF5_ID_FORMULA = 0x0006;
409 const sal_uInt16 BIFF_ID_GUTS = 0x0080;
410 const sal_uInt16 BIFF_ID_HCENTER = 0x0083;
411 const sal_uInt16 BIFF_ID_HEADER = 0x0014;
412 const sal_uInt16 BIFF_ID_HEADERFOOTER = 0x089C;
413 const sal_uInt16 BIFF_ID_HIDEOBJ = 0x008D;
414 const sal_uInt16 BIFF_ID_HORPAGEBREAKS = 0x001B;
415 const sal_uInt16 BIFF_ID_HYPERLINK = 0x01B8;
416 const sal_uInt16 BIFF3_ID_IMGDATA = 0x007F;
417 const sal_uInt16 BIFF8_ID_IMGDATA = 0x00E9;
418 const sal_uInt16 BIFF2_ID_INDEX = 0x000B;
419 const sal_uInt16 BIFF3_ID_INDEX = 0x020B;
420 const sal_uInt16 BIFF2_ID_INTEGER = 0x0002;
421 const sal_uInt16 BIFF_ID_INTERFACEHDR = 0x00E1;
422 const sal_uInt16 BIFF_ID_ITERATION = 0x0011;
423 const sal_uInt16 BIFF_ID_IXFE = 0x0044;
424 const sal_uInt16 BIFF2_ID_LABEL = 0x0004;
425 const sal_uInt16 BIFF3_ID_LABEL = 0x0204;
426 const sal_uInt16 BIFF_ID_LABELRANGES = 0x015F;
427 const sal_uInt16 BIFF_ID_LABELSST = 0x00FD;
428 const sal_uInt16 BIFF_ID_LEFTMARGIN = 0x0026;
429 const sal_uInt16 BIFF_ID_MERGEDCELLS = 0x00E5;
430 const sal_uInt16 BIFF_ID_MSODRAWING = 0x00EC;
431 const sal_uInt16 BIFF_ID_MSODRAWINGGROUP = 0x00EB;
432 const sal_uInt16 BIFF_ID_MSODRAWINGSEL = 0x00ED;
433 const sal_uInt16 BIFF_ID_MTHREADSETTINGS = 0x089A;
434 const sal_uInt16 BIFF_ID_MULTBLANK = 0x00BE;
435 const sal_uInt16 BIFF_ID_MULTRK = 0x00BD;
436 const sal_uInt16 BIFF_ID_NOTE = 0x001C;
437 const sal_uInt16 BIFF_ID_NOTESOUND = 0x0096;
438 const sal_uInt16 BIFF2_ID_NUMBER = 0x0003;
439 const sal_uInt16 BIFF3_ID_NUMBER = 0x0203;
440 const sal_uInt16 BIFF_ID_OBJ = 0x005D;
441 const sal_uInt16 BIFF_ID_OBJECTPROTECT = 0x0063;
442 const sal_uInt16 BIFF_ID_OLESIZE = 0x00DE;
443 const sal_uInt16 BIFF_ID_PAGELAYOUTVIEW = 0x088B;
444 const sal_uInt16 BIFF_ID_PAGESETUP = 0x00A1;
445 const sal_uInt16 BIFF_ID_PALETTE = 0x0092;
446 const sal_uInt16 BIFF_ID_PANE = 0x0041;
447 const sal_uInt16 BIFF_ID_PARAMQUERY = 0x00DC;
448 const sal_uInt16 BIFF_ID_PASSWORD = 0x0013;
449 const sal_uInt16 BIFF_ID_PCDEFINITION = 0x00C6;
450 const sal_uInt16 BIFF_ID_PCDEFINITION2 = 0x0122;
451 const sal_uInt16 BIFF_ID_PCDFDISCRETEPR = 0x00D9;
452 const sal_uInt16 BIFF_ID_PCDFIELD = 0x00C7;
453 const sal_uInt16 BIFF_ID_PCDFIELDINDEX = 0x0103;
454 const sal_uInt16 BIFF_ID_PCDFORMULAFIELD = 0x00F9;
455 const sal_uInt16 BIFF_ID_PCDFRANGEPR = 0x00D8;
456 const sal_uInt16 BIFF_ID_PCDFSQLTYPE = 0x01BB;
457 const sal_uInt16 BIFF_ID_PCDSOURCE = 0x00E3;
458 const sal_uInt16 BIFF_ID_PCITEM_BOOL = 0x00CA;
459 const sal_uInt16 BIFF_ID_PCITEM_DATE = 0x00CE;
460 const sal_uInt16 BIFF_ID_PCITEM_DOUBLE = 0x00C9;
461 const sal_uInt16 BIFF_ID_PCITEM_ERROR = 0x00CB;
462 const sal_uInt16 BIFF_ID_PCITEM_INDEXLIST = 0x00C8;
463 const sal_uInt16 BIFF_ID_PCITEM_INTEGER = 0x00CC;
464 const sal_uInt16 BIFF_ID_PCITEM_MISSING = 0x00CF;
465 const sal_uInt16 BIFF_ID_PCITEM_STRING = 0x00CD;
466 const sal_uInt16 BIFF_ID_PHONETICPR = 0x00EF;
467 const sal_uInt16 BIFF_ID_PICTURE = 0x00E9;
468 const sal_uInt16 BIFF_ID_PIVOTCACHE = 0x00D5;
469 const sal_uInt16 BIFF_ID_PRECISION = 0x000E;
470 const sal_uInt16 BIFF_ID_PRINTGRIDLINES = 0x002B;
471 const sal_uInt16 BIFF_ID_PRINTHEADERS = 0x002A;
472 const sal_uInt16 BIFF_ID_PROJEXTSHEET = 0x00A3;
473 const sal_uInt16 BIFF_ID_PROTECT = 0x0012;
474 const sal_uInt16 BIFF_ID_PTDATAFIELD = 0x00C5;
475 const sal_uInt16 BIFF_ID_PTDEFINITION = 0x00B0;
476 const sal_uInt16 BIFF_ID_PTDEFINITION2 = 0x00F1;
477 const sal_uInt16 BIFF_ID_PTFIELD = 0x00B1;
478 const sal_uInt16 BIFF_ID_PTFIELD2 = 0x0100;
479 const sal_uInt16 BIFF_ID_PTFITEM = 0x00B2;
480 const sal_uInt16 BIFF_ID_PTPAGEFIELDS = 0x00B6;
481 const sal_uInt16 BIFF_ID_PTROWCOLFIELDS = 0x00B4;
482 const sal_uInt16 BIFF_ID_PTROWCOLITEMS = 0x00B5;
483 const sal_uInt16 BIFF_ID_QUERYTABLE = 0x01AD;
484 const sal_uInt16 BIFF_ID_QUERYTABLEREFRESH = 0x0802;
485 const sal_uInt16 BIFF_ID_QUERYTABLESETTINGS = 0x0803;
486 const sal_uInt16 BIFF_ID_QUERYTABLESTRING = 0x0804;
487 const sal_uInt16 BIFF_ID_RECALCID = 0x01C1;
488 const sal_uInt16 BIFF_ID_REFMODE = 0x000F;
489 const sal_uInt16 BIFF_ID_RIGHTMARGIN = 0x0027;
490 const sal_uInt16 BIFF_ID_RK = 0x027E;
491 const sal_uInt16 BIFF2_ID_ROW = 0x0008;
492 const sal_uInt16 BIFF3_ID_ROW = 0x0208;
493 const sal_uInt16 BIFF_ID_RSTRING = 0x00D6;
494 const sal_uInt16 BIFF_ID_SAVERECALC = 0x005F;
495 const sal_uInt16 BIFF_ID_SCENARIO = 0x00AF;
496 const sal_uInt16 BIFF_ID_SCENARIOS = 0x00AE;
497 const sal_uInt16 BIFF_ID_SCL = 0x00A0;
498 const sal_uInt16 BIFF_ID_SCENPROTECT = 0x00DD;
499 const sal_uInt16 BIFF_ID_SCREENTIP = 0x0800;
500 const sal_uInt16 BIFF_ID_SELECTION = 0x001D;
501 const sal_uInt16 BIFF_ID_SHAREDFEATHEAD = 0x0867;
502 const sal_uInt16 BIFF_ID_SHAREDFMLA = 0x04BC;
503 const sal_uInt16 BIFF_ID_SHEET = 0x0085;
504 const sal_uInt16 BIFF_ID_SHEETEXT = 0x0862;
505 const sal_uInt16 BIFF_ID_SHEETHEADER = 0x008F;
506 const sal_uInt16 BIFF_ID_SHEETPR = 0x0081;
507 const sal_uInt16 BIFF_ID_SST = 0x00FC;
508 const sal_uInt16 BIFF_ID_STANDARDWIDTH = 0x0099;
509 const sal_uInt16 BIFF2_ID_STRING = 0x0007;
510 const sal_uInt16 BIFF3_ID_STRING = 0x0207;
511 const sal_uInt16 BIFF_ID_STYLE = 0x0293;
512 const sal_uInt16 BIFF_ID_STYLEEXT = 0x0892;
513 const sal_uInt16 BIFF_ID_TABLESTYLES = 0x088E;
514 const sal_uInt16 BIFF_ID_THEME = 0x0896;
515 const sal_uInt16 BIFF_ID_TOPMARGIN = 0x0028;
516 const sal_uInt16 BIFF_ID_TXO = 0x01B6;
517 const sal_uInt16 BIFF_ID_UNCALCED = 0x005E;
518 const sal_uInt16 BIFF_ID_USESELFS = 0x0160;
519 const sal_uInt16 BIFF_ID_VBAPROJECT = 0x00D3;
520 const sal_uInt16 BIFF_ID_VBAPROJECTEMPTY = 0x01BD;
521 const sal_uInt16 BIFF_ID_VCENTER = 0x0084;
522 const sal_uInt16 BIFF_ID_VERPAGEBREAKS = 0x001A;
523 const sal_uInt16 BIFF_ID_WINDOW1 = 0x003D;
524 const sal_uInt16 BIFF2_ID_WINDOW2 = 0x003E;
525 const sal_uInt16 BIFF3_ID_WINDOW2 = 0x023E;
526 const sal_uInt16 BIFF_ID_WRITEACCESS = 0x005C;
527 const sal_uInt16 BIFF_ID_XCT = 0x0059;
528 const sal_uInt16 BIFF2_ID_XF = 0x0043;
529 const sal_uInt16 BIFF3_ID_XF = 0x0243;
530 const sal_uInt16 BIFF4_ID_XF = 0x0443;
531 const sal_uInt16 BIFF5_ID_XF = 0x00E0;
532 const sal_uInt16 BIFF_ID_XFCRC = 0x087C;
533 const sal_uInt16 BIFF_ID_XFEXT = 0x087D;
535 const sal_uInt16 BIFF_ID_UNKNOWN = SAL_MAX_UINT16;
537 // OBJ subrecord identifiers --------------------------------------------------
539 const sal_uInt16 BIFF_ID_OBJEND = 0x0000; /// End of OBJ.
540 const sal_uInt16 BIFF_ID_OBJMACRO = 0x0004; /// Macro link.
541 const sal_uInt16 BIFF_ID_OBJBUTTON = 0x0005; /// Button data.
542 const sal_uInt16 BIFF_ID_OBJGMO = 0x0006; /// Group marker.
543 const sal_uInt16 BIFF_ID_OBJCF = 0x0007; /// Clipboard format.
544 const sal_uInt16 BIFF_ID_OBJFLAGS = 0x0008; /// Option flags.
545 const sal_uInt16 BIFF_ID_OBJPICTFMLA = 0x0009; /// OLE link formula.
546 const sal_uInt16 BIFF_ID_OBJCBLS = 0x000A; /// Check box/radio button data.
547 const sal_uInt16 BIFF_ID_OBJRBO = 0x000B; /// Radio button group data.
548 const sal_uInt16 BIFF_ID_OBJSBS = 0x000C; /// Scroll bar data.
549 const sal_uInt16 BIFF_ID_OBJNTS = 0x000C; /// Note data.
550 const sal_uInt16 BIFF_ID_OBJSBSFMLA = 0x000E; /// Scroll bar/list box/combo box cell link.
551 const sal_uInt16 BIFF_ID_OBJGBODATA = 0x000F; /// Group box data.
552 const sal_uInt16 BIFF_ID_OBJEDODATA = 0x0010; /// Edit box data.
553 const sal_uInt16 BIFF_ID_OBJRBODATA = 0x0011; /// Radio button group data.
554 const sal_uInt16 BIFF_ID_OBJCBLSDATA = 0x0012; /// Check box/radio button data.
555 const sal_uInt16 BIFF_ID_OBJLBSDATA = 0x0013; /// List box/combo box data.
556 const sal_uInt16 BIFF_ID_OBJCBLSFMLA = 0x0014; /// Check box/radio button cell link.
557 const sal_uInt16 BIFF_ID_OBJCMO = 0x0015; /// Common object settings.
559 // record constants -----------------------------------------------------------
561 const sal_uInt16 BIFF_BOF_BIFF2 = 0x0200;
562 const sal_uInt16 BIFF_BOF_BIFF3 = 0x0300;
563 const sal_uInt16 BIFF_BOF_BIFF4 = 0x0400;
564 const sal_uInt16 BIFF_BOF_BIFF5 = 0x0500;
565 const sal_uInt16 BIFF_BOF_BIFF8 = 0x0600;
567 const sal_uInt8 BIFF_ERR_NULL = 0x00;
568 const sal_uInt8 BIFF_ERR_DIV0 = 0x07;
569 const sal_uInt8 BIFF_ERR_VALUE = 0x0F;
570 const sal_uInt8 BIFF_ERR_REF = 0x17;
571 const sal_uInt8 BIFF_ERR_NAME = 0x1D;
572 const sal_uInt8 BIFF_ERR_NUM = 0x24;
573 const sal_uInt8 BIFF_ERR_NA = 0x2A;
575 const sal_uInt8 BIFF_DATATYPE_EMPTY = 0;
576 const sal_uInt8 BIFF_DATATYPE_DOUBLE = 1;
577 const sal_uInt8 BIFF_DATATYPE_STRING = 2;
578 const sal_uInt8 BIFF_DATATYPE_BOOL = 4;
579 const sal_uInt8 BIFF_DATATYPE_ERROR = 16;
581 const sal_uInt8 BIFF_BOOLERR_BOOL = 0;
582 const sal_uInt8 BIFF_BOOLERR_ERROR = 1;
584 // BIFF8 unicode strings ------------------------------------------------------
586 const sal_uInt8 BIFF_STRF_16BIT = 0x01;
587 const sal_uInt8 BIFF_STRF_PHONETIC = 0x04;
588 const sal_uInt8 BIFF_STRF_RICH = 0x08;
589 const sal_uInt8 BIFF_STRF_UNKNOWN = 0xF2;
591 /** Static helper functions for BIFF filters. */
592 class BiffHelper
594 public:
595 // conversion -------------------------------------------------------------
597 /** Converts the passed packed number to a double. */
598 static double calcDoubleFromRk( sal_Int32 nRkValue );
600 /** Converts the passed BIFF error to a double containing the respective Calc error code. */
601 static double calcDoubleFromError( sal_uInt8 nErrorCode );
603 // BIFF12 import ----------------------------------------------------------
605 /** Reads a BIFF12 string with leading 16-bit or 32-bit length field. */
606 static OUString readString( SequenceInputStream& rStrm, bool b32BitLen = true, bool bAllowNulChars = false );
608 // BIFF2-BIFF8 import -----------------------------------------------------
610 /** Returns true, if the current record of the stream is a BOF record. */
611 static bool isBofRecord( BiffInputStream& rStrm );
613 /** Skips a block of records up to the specified end record.
615 Skips all records until next end record. When this function returns,
616 the stream points to the end record, and the next call of the function
617 startNextRecord() at the stream will start the record following the end
618 record.
620 The identifier of the record that is active while this function is
621 called is used as start record identifier. This identifier is used to
622 correctly skip embedded record blocks with the same start and end
623 record identifier.
625 @return True = stream points to the end record.
627 static bool skipRecordBlock( BiffInputStream& rStrm, sal_uInt16 nEndRecId );
629 private:
630 BiffHelper() SAL_DELETED_FUNCTION;
631 ~BiffHelper() SAL_DELETED_FUNCTION;
634 /** BIFF12 stream operator for an OUString, reads 32-bit string length and Unicode array. */
635 inline SequenceInputStream& operator>>( SequenceInputStream& rStrm, OUString& orString )
637 orString = BiffHelper::readString( rStrm );
638 return rStrm;
641 } // namespace xls
642 } // namespace oox
644 #endif
646 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */