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