LibreOffice Module sc (master) 1
read.cxx
Go to the documentation of this file.
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#include <document.hxx>
21#include <scerrors.hxx>
22#include <fprogressbar.hxx>
23#include <globstr.hrc>
24#include <xlcontent.hxx>
25#include <xltracer.hxx>
26#include <xltable.hxx>
27#include <xihelper.hxx>
28#include <xipage.hxx>
29#include <xiview.hxx>
30#include <xilink.hxx>
31#include <xiname.hxx>
32#include <xlname.hxx>
33#include <xicontent.hxx>
34#include <xiescher.hxx>
35#include <xipivot.hxx>
36#include <xistyle.hxx>
37#include <XclImpChangeTrack.hxx>
38#include <documentimport.hxx>
39
40#include <root.hxx>
41#include <imp_op.hxx>
42#include <excimp8.hxx>
43
45
46#include <memory>
47
48namespace
49{
50 bool TryStartNextRecord(XclImpStream& rIn, std::size_t nProgressBasePos)
51 {
52 bool bValid = true;
53 // i#115255 fdo#40304 BOUNDSHEET doesn't point to a valid
54 // BOF record position. Scan the records manually (from
55 // the BOUNDSHEET position) until we find a BOF. Some 3rd
56 // party Russian programs generate invalid xls docs with
57 // this kind of silliness.
58 if (rIn.PeekRecId(nProgressBasePos) == EXC_ID5_BOF)
59 // BOUNDSHEET points to a valid BOF record. Good.
60 rIn.StartNextRecord(nProgressBasePos);
61 else
62 {
63 while (bValid && rIn.GetRecId() != EXC_ID5_BOF)
64 bValid = rIn.StartNextRecord();
65 }
66 return bValid;
67 }
68}
69
71{
74 XclImpPalette& rPal = GetPalette();
75 XclImpFontBuffer& rFontBfr = GetFontBuffer();
76 XclImpNumFmtBuffer& rNumFmtBfr = GetNumFmtBuffer();
77 XclImpXFBuffer& rXFBfr = GetXFBuffer();
79 // call to GetCurrSheetDrawing() cannot be cached (changes in new sheets)
80
81 enum STATE {
82 Z_BiffNull, // not a valid Biff-Format
83 Z_Biff2, // Biff2: only one table
84
85 Z_Biff3, // Biff3: only one table
86
87 Z_Biff4, // Biff4: only one table
88 Z_Biff4W, // Biff4 Workbook: Globals
89 Z_Biff4T, // Biff4 Workbook: a table itself
90 Z_Biff4E, // Biff4 Workbook: between tables
91
92 Z_Biff5WPre,// Biff5: Prefetch Workbook
93 Z_Biff5W, // Biff5: Globals
94 Z_Biff5TPre,// Biff5: Prefetch for Shrfmla/Array Formula
95 Z_Biff5T, // Biff5: a table itself
96 Z_Biff5E, // Biff5: between tables
97 Z_Biffn0, // all Biffs: skip table till next EOF
98 Z_End };
99
100 STATE eCurrent = Z_BiffNull, ePrev = Z_BiffNull;
101
102 ErrCode eLastErr = ERRCODE_NONE;
103 sal_uInt16 nOpcode;
104 sal_uInt16 nBofLevel = 0;
105
106 std::unique_ptr< ScfSimpleProgressBar > pProgress( new ScfSimpleProgressBar(
107 aIn.GetSvStreamSize(), GetDocShell(), STR_LOAD_DOC ) );
108
109 /* #i104057# Need to track a base position for progress bar calculation,
110 because sheet substreams may not be in order of sheets. */
111 std::size_t nProgressBasePos = 0;
112 std::size_t nProgressBaseSize = 0;
113
114 for (; eCurrent != Z_End; mnLastRecId = nOpcode)
115 {
116 if( eCurrent == Z_Biff5E )
117 {
118 sal_uInt16 nScTab = GetCurrScTab();
119 if( nScTab < maSheetOffsets.size() )
120 {
121 nProgressBaseSize += (aIn.GetSvStreamPos() - nProgressBasePos);
122 nProgressBasePos = maSheetOffsets[ nScTab ];
123
124 bool bValid = TryStartNextRecord(aIn, nProgressBasePos);
125 if (!bValid)
126 {
127 // Safeguard ourselves from potential infinite loop.
128 eCurrent = Z_End;
129 }
130 }
131 else
132 eCurrent = Z_End;
133 }
134 else
136
137 nOpcode = aIn.GetRecId();
138
139 if( !aIn.IsValid() )
140 {
141 // finalize table if EOF is missing
142 switch( eCurrent )
143 {
144 case Z_Biff2:
145 case Z_Biff3:
146 case Z_Biff4:
147 case Z_Biff4T:
148 case Z_Biff5TPre:
149 case Z_Biff5T:
150 rNumFmtBfr.CreateScFormats();
151 Eof();
152 break;
153 default:;
154 }
155 break;
156 }
157
158 if( eCurrent == Z_End )
159 break;
160
161 if( eCurrent != Z_Biff5TPre && eCurrent != Z_Biff5WPre )
162 pProgress->ProgressAbs( nProgressBaseSize + aIn.GetSvStreamPos() - nProgressBasePos );
163
164 switch( eCurrent )
165 {
166
167 case Z_BiffNull: // ------------------------------- Z_BiffNull -
168 {
169 switch( nOpcode )
170 {
171 case EXC_ID2_BOF:
172 case EXC_ID3_BOF:
173 case EXC_ID4_BOF:
174 case EXC_ID5_BOF:
175 {
176 // #i23425# don't rely on the record ID, but on the detected BIFF version
177 switch( GetBiff() )
178 {
179 case EXC_BIFF2:
180 Bof2();
181 if( pExcRoot->eDateiTyp == Biff2 )
182 {
183 eCurrent = Z_Biff2;
184 NewTable();
185 }
186 break;
187 case EXC_BIFF3:
188 Bof3();
189 if( pExcRoot->eDateiTyp == Biff3 )
190 {
191 eCurrent = Z_Biff3;
192 NewTable();
193 }
194 break;
195 case EXC_BIFF4:
196 Bof4();
197 if( pExcRoot->eDateiTyp == Biff4 )
198 {
199 eCurrent = Z_Biff4;
200 NewTable();
201 }
202 else if( pExcRoot->eDateiTyp == Biff4W )
203 eCurrent = Z_Biff4W;
204 break;
205 case EXC_BIFF5:
206 Bof5();
207 if( pExcRoot->eDateiTyp == Biff5W )
208 {
209 eCurrent = Z_Biff5WPre;
210
211 nBdshtTab = 0;
212
213 aIn.StoreGlobalPosition(); // store position
214 }
215 else if( pExcRoot->eDateiTyp == Biff5 )
216 {
217 // #i62752# possible to have BIFF5 sheet without globals
218 NewTable();
219 eCurrent = Z_Biff5TPre; // Shrfmla Prefetch, Row-Prefetch
220 nBofLevel = 0;
221 aIn.StoreGlobalPosition(); // store position
222 }
223 break;
224 default:
226 }
227 }
228 break;
229 }
230 }
231 break;
232
233 case Z_Biff2: // ---------------------------------- Z_Biff2 -
234 {
235 switch( nOpcode )
236 {
238 case EXC_ID3_DIMENSIONS: ReadDimensions(); break;
239 case EXC_ID2_BLANK:
240 case EXC_ID3_BLANK: ReadBlank(); break;
241 case EXC_ID2_INTEGER: ReadInteger(); break;
242 case EXC_ID2_NUMBER:
243 case EXC_ID3_NUMBER: ReadNumber(); break;
244 case EXC_ID2_LABEL:
245 case EXC_ID3_LABEL: ReadLabel(); break;
246 case EXC_ID2_BOOLERR:
247 case EXC_ID3_BOOLERR: ReadBoolErr(); break;
248 case EXC_ID_RK: ReadRk(); break;
249
250 case 0x06: Formula25(); break; // FORMULA [ 2 5]
251 case 0x08: Row25(); break; // ROW [ 2 5]
252 case 0x0A: // EOF [ 2345]
253 rNumFmtBfr.CreateScFormats();
254 rNameMgr.ConvertAllTokens();
255 Eof();
256 eCurrent = Z_End;
257 break;
258 case 0x14:
259 case 0x15: rPageSett.ReadHeaderFooter( maStrm ); break;
260 case 0x17: Externsheet(); break; // EXTERNSHEET [ 2345]
261 case 0x18: rNameMgr.ReadName( maStrm ); break;
262 case 0x1C: GetCurrSheetDrawing().ReadNote( maStrm );break;
263 case 0x1D: rTabViewSett.ReadSelection( maStrm ); break;
264 case 0x1E: rNumFmtBfr.ReadFormat( maStrm ); break;
265 case 0x20: Columndefault(); break; // COLUMNDEFAULT[ 2 ]
266 case 0x21: Array25(); break; // ARRAY [ 2 5]
267 case 0x23: Externname25(); break; // EXTERNNAME [ 2 5]
268 case 0x24: Colwidth(); break; // COLWIDTH [ 2 ]
269 case 0x25: Defrowheight2(); break; // DEFAULTROWHEI[ 2 ]
270 case 0x26:
271 case 0x27:
272 case 0x28:
273 case 0x29: rPageSett.ReadMargin( maStrm ); break;
274 case 0x2A: rPageSett.ReadPrintHeaders( maStrm ); break;
275 case 0x2B: rPageSett.ReadPrintGridLines( maStrm ); break;
276 case 0x2F: // FILEPASS [ 2345]
278 if( eLastErr != ERRCODE_NONE )
279 eCurrent = Z_End;
280 break;
281 case EXC_ID2_FONT: rFontBfr.ReadFont( maStrm ); break;
282 case EXC_ID_EFONT: rFontBfr.ReadEfont( maStrm ); break;
283 case 0x3E: rTabViewSett.ReadWindow2( maStrm, false );break;
284 case 0x41: rTabViewSett.ReadPane( maStrm ); break;
285 case 0x42: Codepage(); break; // CODEPAGE [ 2345]
286 case 0x43: rXFBfr.ReadXF( maStrm ); break;
287 case 0x44: Ixfe(); break; // IXFE [ 2 ]
288 }
289 }
290 break;
291
292 case Z_Biff3: // ---------------------------------- Z_Biff3 -
293 {
294 switch( nOpcode )
295 {
296 // skip chart substream
297 case EXC_ID2_BOF:
298 case EXC_ID3_BOF:
299 case EXC_ID4_BOF:
301
303 case EXC_ID3_DIMENSIONS: ReadDimensions(); break;
304 case EXC_ID2_BLANK:
305 case EXC_ID3_BLANK: ReadBlank(); break;
306 case EXC_ID2_INTEGER: ReadInteger(); break;
307 case EXC_ID2_NUMBER:
308 case EXC_ID3_NUMBER: ReadNumber(); break;
309 case EXC_ID2_LABEL:
310 case EXC_ID3_LABEL: ReadLabel(); break;
311 case EXC_ID2_BOOLERR:
312 case EXC_ID3_BOOLERR: ReadBoolErr(); break;
313 case EXC_ID_RK: ReadRk(); break;
314
315 case 0x0A: // EOF [ 2345]
316 rNumFmtBfr.CreateScFormats();
317 rNameMgr.ConvertAllTokens();
318 Eof();
319 eCurrent = Z_End;
320 break;
321 case 0x14:
322 case 0x15: rPageSett.ReadHeaderFooter( maStrm ); break;
323 case 0x17: Externsheet(); break; // EXTERNSHEET [ 2345]
324 case 0x1A:
325 case 0x1B: rPageSett.ReadPageBreaks( maStrm ); break;
326 case 0x1C: GetCurrSheetDrawing().ReadNote( maStrm );break;
327 case 0x1D: rTabViewSett.ReadSelection( maStrm ); break;
328 case 0x1E: rNumFmtBfr.ReadFormat( maStrm ); break;
329 case 0x22: Rec1904(); break; // 1904 [ 2345]
330 case 0x26:
331 case 0x27:
332 case 0x28:
333 case 0x29: rPageSett.ReadMargin( maStrm ); break;
334 case 0x2A: rPageSett.ReadPrintHeaders( maStrm ); break;
335 case 0x2B: rPageSett.ReadPrintGridLines( maStrm ); break;
336 case 0x2F: // FILEPASS [ 2345]
338 if( eLastErr != ERRCODE_NONE )
339 eCurrent = Z_End;
340 break;
341 case EXC_ID_FILESHARING: ReadFileSharing(); break;
342 case 0x41: rTabViewSett.ReadPane( maStrm ); break;
343 case 0x42: Codepage(); break; // CODEPAGE [ 2345]
344 case 0x56: break; // BUILTINFMTCNT[ 34 ]
345 case 0x5D: GetCurrSheetDrawing().ReadObj( maStrm );break;
346 case 0x7D: Colinfo(); break; // COLINFO [ 345]
347 case 0x8C: Country(); break; // COUNTRY [ 345]
348 case 0x92: rPal.ReadPalette( maStrm ); break;
349 case 0x0206: Formula3(); break; // FORMULA [ 3 ]
350 case 0x0208: Row34(); break; // ROW [ 34 ]
351 case 0x0218: rNameMgr.ReadName( maStrm ); break;
352 case 0x0221: Array34(); break; // ARRAY [ 34 ]
353 case 0x0223: break; // EXTERNNAME [ 34 ]
354 case 0x0225: Defrowheight345();break;//DEFAULTROWHEI[ 345]
355 case 0x0231: rFontBfr.ReadFont( maStrm ); break;
356 case 0x023E: rTabViewSett.ReadWindow2( maStrm, false );break;
357 case 0x0243: rXFBfr.ReadXF( maStrm ); break;
358 case 0x0293: rXFBfr.ReadStyle( maStrm ); break;
359 }
360 }
361 break;
362
363 case Z_Biff4: // ---------------------------------- Z_Biff4 -
364 {
365 switch( nOpcode )
366 {
367 // skip chart substream
368 case EXC_ID2_BOF:
369 case EXC_ID3_BOF:
370 case EXC_ID4_BOF:
372
374 case EXC_ID3_DIMENSIONS: ReadDimensions(); break;
375 case EXC_ID2_BLANK:
376 case EXC_ID3_BLANK: ReadBlank(); break;
377 case EXC_ID2_INTEGER: ReadInteger(); break;
378 case EXC_ID2_NUMBER:
379 case EXC_ID3_NUMBER: ReadNumber(); break;
380 case EXC_ID2_LABEL:
381 case EXC_ID3_LABEL: ReadLabel(); break;
382 case EXC_ID2_BOOLERR:
383 case EXC_ID3_BOOLERR: ReadBoolErr(); break;
384 case EXC_ID_RK: ReadRk(); break;
385
386 case 0x0A: // EOF [ 2345]
387 rNumFmtBfr.CreateScFormats();
388 rNameMgr.ConvertAllTokens();
389 Eof();
390 eCurrent = Z_End;
391 break;
392 case 0x12: SheetProtect(); break; // SHEET PROTECTION
393 case 0x14:
394 case 0x15: rPageSett.ReadHeaderFooter( maStrm ); break;
395 case 0x17: Externsheet(); break; // EXTERNSHEET [ 2345]
396 case 0x1A:
397 case 0x1B: rPageSett.ReadPageBreaks( maStrm ); break;
398 case 0x1C: GetCurrSheetDrawing().ReadNote( maStrm );break;
399 case 0x1D: rTabViewSett.ReadSelection( maStrm ); break;
400 case 0x22: Rec1904(); break; // 1904 [ 2345]
401 case 0x26:
402 case 0x27:
403 case 0x28:
404 case 0x29: rPageSett.ReadMargin( maStrm ); break;
405 case 0x2A: rPageSett.ReadPrintHeaders( maStrm ); break;
406 case 0x2B: rPageSett.ReadPrintGridLines( maStrm ); break;
407 case 0x2F: // FILEPASS [ 2345]
409 if( eLastErr != ERRCODE_NONE )
410 eCurrent = Z_End;
411 break;
412 case EXC_ID_FILESHARING: ReadFileSharing(); break;
413 case 0x41: rTabViewSett.ReadPane( maStrm ); break;
414 case 0x42: Codepage(); break; // CODEPAGE [ 2345]
415 case 0x55: DefColWidth(); break;
416 case 0x56: break; // BUILTINFMTCNT[ 34 ]
417 case 0x5D: GetCurrSheetDrawing().ReadObj( maStrm );break;
418 case 0x7D: Colinfo(); break; // COLINFO [ 345]
419 case 0x8C: Country(); break; // COUNTRY [ 345]
420 case 0x92: rPal.ReadPalette( maStrm ); break;
421 case 0x99: Standardwidth(); break; // STANDARDWIDTH[ 45]
422 case 0xA1: rPageSett.ReadSetup( maStrm ); break;
423 case 0x0208: Row34(); break; // ROW [ 34 ]
424 case 0x0218: rNameMgr.ReadName( maStrm ); break;
425 case 0x0221: Array34(); break; // ARRAY [ 34 ]
426 case 0x0223: break; // EXTERNNAME [ 34 ]
427 case 0x0225: Defrowheight345();break;//DEFAULTROWHEI[ 345]
428 case 0x0231: rFontBfr.ReadFont( maStrm ); break;
429 case 0x023E: rTabViewSett.ReadWindow2( maStrm, false );break;
430 case 0x0406: Formula4(); break; // FORMULA [ 4 ]
431 case 0x041E: rNumFmtBfr.ReadFormat( maStrm ); break;
432 case 0x0443: rXFBfr.ReadXF( maStrm ); break;
433 case 0x0293: rXFBfr.ReadStyle( maStrm ); break;
434 }
435 }
436 break;
437
438 case Z_Biff4W: // --------------------------------- Z_Biff4W -
439 {
440 switch( nOpcode )
441 {
442 case 0x0A: // EOF [ 2345]
443 rNameMgr.ConvertAllTokens();
444 eCurrent = Z_End;
445 break;
446 case 0x12: DocProtect(); break; // PROTECT [ 5]
447 case 0x2F: // FILEPASS [ 2345]
449 if( eLastErr != ERRCODE_NONE )
450 eCurrent = Z_End;
451 break;
452 case EXC_ID_FILESHARING: ReadFileSharing(); break;
453 case 0x17: Externsheet(); break; // EXTERNSHEET [ 2345]
454 case 0x42: Codepage(); break; // CODEPAGE [ 2345]
455 case 0x55: DefColWidth(); break;
456 case 0x56: break; // BUILTINFMTCNT[ 34 ]
457 case 0x8C: Country(); break; // COUNTRY [ 345]
458 case 0x8F: break; // BUNDLEHEADER [ 4 ]
459 case 0x92: rPal.ReadPalette( maStrm ); break;
460 case 0x99: Standardwidth(); break; // STANDARDWIDTH[ 45]
461 case 0x0218: rNameMgr.ReadName( maStrm ); break;
462 case 0x0223: break; // EXTERNNAME [ 34 ]
463 case 0x0225: Defrowheight345();break;//DEFAULTROWHEI[ 345]
464 case 0x0231: rFontBfr.ReadFont( maStrm ); break;
465 case EXC_ID4_BOF: // BOF [ 4 ]
466 Bof4();
467 if( pExcRoot->eDateiTyp == Biff4 )
468 {
469 eCurrent = Z_Biff4T;
470 NewTable();
471 }
472 else
473 eCurrent = Z_End;
474 break;
475 case 0x041E: rNumFmtBfr.ReadFormat( maStrm ); break;
476 case 0x0443: rXFBfr.ReadXF( maStrm ); break;
477 case 0x0293: rXFBfr.ReadStyle( maStrm ); break;
478 }
479
480 }
481 break;
482
483 case Z_Biff4T: // --------------------------------- Z_Biff4T -
484 {
485 switch( nOpcode )
486 {
487 // skip chart substream
488 case EXC_ID2_BOF:
489 case EXC_ID3_BOF:
490 case EXC_ID4_BOF:
492
494 case EXC_ID3_DIMENSIONS: ReadDimensions(); break;
495 case EXC_ID2_BLANK:
496 case EXC_ID3_BLANK: ReadBlank(); break;
497 case EXC_ID2_INTEGER: ReadInteger(); break;
498 case EXC_ID2_NUMBER:
499 case EXC_ID3_NUMBER: ReadNumber(); break;
500 case EXC_ID2_LABEL:
501 case EXC_ID3_LABEL: ReadLabel(); break;
502 case EXC_ID2_BOOLERR:
503 case EXC_ID3_BOOLERR: ReadBoolErr(); break;
504 case EXC_ID_RK: ReadRk(); break;
505
506 case 0x0A: // EOF [ 2345]
507 rNameMgr.ConvertAllTokens();
508 Eof();
509 eCurrent = Z_Biff4E;
510 break;
511 case 0x12: SheetProtect(); break; // SHEET PROTECTION
512 case 0x14:
513 case 0x15: rPageSett.ReadHeaderFooter( maStrm ); break;
514 case 0x1A:
515 case 0x1B: rPageSett.ReadPageBreaks( maStrm ); break;
516 case 0x1C: GetCurrSheetDrawing().ReadNote( maStrm );break;
517 case 0x1D: rTabViewSett.ReadSelection( maStrm ); break;
518 case 0x2F: // FILEPASS [ 2345]
520 if( eLastErr != ERRCODE_NONE )
521 eCurrent = Z_End;
522 break;
523 case 0x41: rTabViewSett.ReadPane( maStrm ); break;
524 case 0x42: Codepage(); break; // CODEPAGE [ 2345]
525 case 0x55: DefColWidth(); break;
526 case 0x56: break; // BUILTINFMTCNT[ 34 ]
527 case 0x5D: GetCurrSheetDrawing().ReadObj( maStrm );break;
528 case 0x7D: Colinfo(); break; // COLINFO [ 345]
529 case 0x8C: Country(); break; // COUNTRY [ 345]
530 case 0x8F: break; // BUNDLEHEADER [ 4 ]
531 case 0x92: rPal.ReadPalette( maStrm ); break;
532 case 0x99: Standardwidth(); break; // STANDARDWIDTH[ 45]
533 case 0xA1: rPageSett.ReadSetup( maStrm ); break;
534 case 0x0208: Row34(); break; // ROW [ 34 ]
535 case 0x0218: rNameMgr.ReadName( maStrm ); break;
536 case 0x0221: Array34(); break;
537 case 0x0225: Defrowheight345();break;//DEFAULTROWHEI[ 345]
538 case 0x0231: rFontBfr.ReadFont( maStrm ); break;
539 case 0x023E: rTabViewSett.ReadWindow2( maStrm, false );break;
540 case 0x0406: Formula4(); break;
541 case 0x041E: rNumFmtBfr.ReadFormat( maStrm ); break;
542 case 0x0443: rXFBfr.ReadXF( maStrm ); break;
543 case 0x0293: rXFBfr.ReadStyle( maStrm ); break;
544 }
545
546 }
547 break;
548
549 case Z_Biff4E: // --------------------------------- Z_Biff4E -
550 {
551 switch( nOpcode )
552 {
553 case 0x0A: // EOF [ 2345]
554 eCurrent = Z_End;
555 break;
556 case 0x8F: break; // BUNDLEHEADER [ 4 ]
557 case EXC_ID4_BOF: // BOF [ 4 ]
558 Bof4();
559 NewTable();
560 if( pExcRoot->eDateiTyp == Biff4 )
561 {
562 eCurrent = Z_Biff4T;
563 }
564 else
565 {
566 ePrev = eCurrent;
567 eCurrent = Z_Biffn0;
568 }
569 break;
570 }
571
572 }
573 break;
574 case Z_Biff5WPre: // ------------------------------ Z_Biff5WPre -
575 {
576 switch( nOpcode )
577 {
578 case 0x0A: // EOF [ 2345]
579 eCurrent = Z_Biff5W;
580 aIn.SeekGlobalPosition(); // and back to old position
581 break;
582 case 0x12: DocProtect(); break; // PROTECT [ 5]
583 case 0x2F: // FILEPASS [ 2345]
585 if( eLastErr != ERRCODE_NONE )
586 eCurrent = Z_End;
587 break;
588 case EXC_ID_FILESHARING: ReadFileSharing(); break;
589 case 0x3D: Window1(); break;
590 case 0x42: Codepage(); break; // CODEPAGE [ 2345]
591 case 0x85: Boundsheet(); break; // BOUNDSHEET [ 5]
592 case 0x8C: Country(); break; // COUNTRY [ 345]
593 // PALETTE follows XFs, but already needed while reading the XFs
594 case 0x92: rPal.ReadPalette( maStrm ); break;
595 }
596 }
597 break;
598 case Z_Biff5W: // --------------------------------- Z_Biff5W -
599 {
600 switch( nOpcode )
601 {
602 case 0x0A: // EOF [ 2345]
603 rNumFmtBfr.CreateScFormats();
604 rXFBfr.CreateUserStyles();
605 rNameMgr.ConvertAllTokens();
606 eCurrent = Z_Biff5E;
607 break;
608 case 0x18: rNameMgr.ReadName( maStrm ); break;
609 case 0x1E: rNumFmtBfr.ReadFormat( maStrm ); break;
610 case 0x22: Rec1904(); break; // 1904 [ 2345]
611 case 0x31: rFontBfr.ReadFont( maStrm ); break;
612 case 0x56: break; // BUILTINFMTCNT[ 34 ]
613 case 0x8D: Hideobj(); break; // HIDEOBJ [ 345]
614 case 0xDE: Olesize(); break;
615 case 0xE0: rXFBfr.ReadXF( maStrm ); break;
616 case 0x0293: rXFBfr.ReadStyle( maStrm ); break;
617 case 0x041E: rNumFmtBfr.ReadFormat( maStrm ); break;
618 }
619
620 }
621 break;
622
623 case Z_Biff5TPre: // ------------------------------- Z_Biff5Pre -
624 {
625 if (nOpcode == EXC_ID5_BOF)
626 nBofLevel++;
627 else if( (nOpcode == 0x000A) && nBofLevel )
628 nBofLevel--;
629 else if( !nBofLevel ) // don't read chart records
630 {
631 switch( nOpcode )
632 {
634 case EXC_ID3_DIMENSIONS: ReadDimensions(); break;
635 case 0x08: Row25(); break; // ROW [ 2 5]
636 case 0x0A: // EOF [ 2345]
637 eCurrent = Z_Biff5T;
638 aIn.SeekGlobalPosition(); // and back to old position
639 break;
640 case 0x12: SheetProtect(); break; // SHEET PROTECTION
641 case 0x1A:
642 case 0x1B: rPageSett.ReadPageBreaks( maStrm ); break;
643 case 0x1D: rTabViewSett.ReadSelection( maStrm ); break;
644 case 0x17: Externsheet(); break; // EXTERNSHEET [ 2345]
645 case 0x21: Array25(); break; // ARRAY [ 2 5]
646 case 0x23: Externname25(); break; // EXTERNNAME [ 2 5]
647 case 0x41: rTabViewSett.ReadPane( maStrm ); break;
648 case 0x42: Codepage(); break; // CODEPAGE [ 2345]
649 case 0x55: DefColWidth(); break;
650 case 0x7D: Colinfo(); break; // COLINFO [ 345]
651 case 0x81: Wsbool(); break; // WSBOOL [ 2345]
652 case 0x8C: Country(); break; // COUNTRY [ 345]
653 case 0x99: Standardwidth(); break; // STANDARDWIDTH[ 45]
654 case 0x0208: Row34(); break; // ROW [ 34 ]
655 case 0x0221: Array34(); break; // ARRAY [ 34 ]
656 case 0x0223: break; // EXTERNNAME [ 34 ]
657 case 0x0225: Defrowheight345();break;//DEFAULTROWHEI[ 345]
658 case 0x023E: rTabViewSett.ReadWindow2( maStrm, false );break;
659 }
660 }
661 }
662 break;
663
664 case Z_Biff5T: // --------------------------------- Z_Biff5T -
665 {
666 switch( nOpcode )
667 {
668 case EXC_ID2_BLANK:
669 case EXC_ID3_BLANK: ReadBlank(); break;
670 case EXC_ID2_INTEGER: ReadInteger(); break;
671 case EXC_ID2_NUMBER:
672 case EXC_ID3_NUMBER: ReadNumber(); break;
673 case EXC_ID2_LABEL:
674 case EXC_ID3_LABEL: ReadLabel(); break;
675 case EXC_ID2_BOOLERR:
676 case EXC_ID3_BOOLERR: ReadBoolErr(); break;
677 case EXC_ID_RK: ReadRk(); break;
678
679 case EXC_ID2_FORMULA:
680 case EXC_ID3_FORMULA:
681 case EXC_ID4_FORMULA: Formula25(); break;
682 case EXC_ID_SHRFMLA: Shrfmla(); break;
683 case 0x0A: Eof(); eCurrent = Z_Biff5E; break;
684 case 0x14:
685 case 0x15: rPageSett.ReadHeaderFooter( maStrm ); break;
686 case 0x17: Externsheet(); break; // EXTERNSHEET [ 2345]
687 case 0x1C: GetCurrSheetDrawing().ReadNote( maStrm );break;
688 case 0x1D: rTabViewSett.ReadSelection( maStrm ); break;
689 case 0x23: Externname25(); break; // EXTERNNAME [ 2 5]
690 case 0x26:
691 case 0x27:
692 case 0x28:
693 case 0x29: rPageSett.ReadMargin( maStrm ); break;
694 case 0x2A: rPageSett.ReadPrintHeaders( maStrm ); break;
695 case 0x2B: rPageSett.ReadPrintGridLines( maStrm ); break;
696 case 0x2F: // FILEPASS [ 2345]
698 if( eLastErr != ERRCODE_NONE )
699 eCurrent = Z_End;
700 break;
701 case 0x5D: GetCurrSheetDrawing().ReadObj( maStrm );break;
702 case 0x83:
703 case 0x84: rPageSett.ReadCenter( maStrm ); break;
704 case 0xA0: rTabViewSett.ReadScl( maStrm ); break;
705 case 0xA1: rPageSett.ReadSetup( maStrm ); break;
706 case 0xBD: Mulrk(); break; // MULRK [ 5]
707 case 0xBE: Mulblank(); break; // MULBLANK [ 5]
708 case 0xD6: Rstring(); break; // RSTRING [ 5]
709 case 0x00E5: Cellmerging(); break; // #i62300#
710 case 0x0236: TableOp(); break; // TABLE [ 5]
711 case EXC_ID5_BOF: // BOF [ 5]
713 break;
714 }
715
716 }
717 break;
718
719 case Z_Biff5E: // --------------------------------- Z_Biff5E -
720 {
721 switch( nOpcode )
722 {
723 case EXC_ID5_BOF: // BOF [ 5]
724 Bof5();
725 NewTable();
726 switch( pExcRoot->eDateiTyp )
727 {
728 case Biff5:
729 case Biff5M4:
730 eCurrent = Z_Biff5TPre; // Shrfmla Prefetch, Row-Prefetch
731 nBofLevel = 0;
732 aIn.StoreGlobalPosition(); // store position
733 break;
734 case Biff5C: // chart sheet
736 Eof();
738 break;
739 case Biff5V:
740 default:
741 rD.SetVisible( GetCurrScTab(), false );
742 ePrev = eCurrent;
743 eCurrent = Z_Biffn0;
744 }
745 OSL_ENSURE( pExcRoot->eDateiTyp != Biff5W,
746 "+ImportExcel::Read(): Doppel-Whopper-Workbook!" );
747
748 break;
749 }
750
751 }
752 break;
753 case Z_Biffn0: // --------------------------------- Z_Biffn0 -
754 {
755 switch( nOpcode )
756 {
757 case 0x0A: // EOF [ 2345]
758 eCurrent = ePrev;
759 IncCurrScTab();
760 break;
761 }
762
763 }
764 break;
765
766 case Z_End: // ----------------------------------- Z_End -
767 OSL_FAIL( "*ImportExcel::Read(): Not possible state!" );
768 break;
769 default: OSL_FAIL( "-ImportExcel::Read(): state forgotten!" );
770 }
771 }
772
773 if( eLastErr == ERRCODE_NONE )
774 {
775 pProgress.reset();
776
780 PostDocLoad();
781
782 rD.CalcAfterLoad(false);
783
784 const XclImpAddressConverter& rAddrConv = GetAddressConverter();
785 if( rAddrConv.IsTabTruncated() )
787 else if( bTabTruncated || rAddrConv.IsRowTruncated() )
789 else if( rAddrConv.IsColTruncated() )
791 }
792
793 return eLastErr;
794}
795
797{
798#ifdef EXC_INCL_DUMPER
799 {
800 Biff8RecDumper aDumper( GetRoot(), sal_True );
801 if( aDumper.Dump( aIn ) )
802 return ERRCODE_ABORT;
803 }
804#endif
805 // read the entire BIFF8 stream
806 // don't look too close - this stuff seriously needs to be reworked
807
808 XclImpPageSettings& rPageSett = GetPageSettings();
810 XclImpPalette& rPal = GetPalette();
811 XclImpFontBuffer& rFontBfr = GetFontBuffer();
812 XclImpNumFmtBuffer& rNumFmtBfr = GetNumFmtBuffer();
813 XclImpXFBuffer& rXFBfr = GetXFBuffer();
814 XclImpSst& rSst = GetSst();
815 XclImpTabInfo& rTabInfo = GetTabInfo();
816 XclImpNameManager& rNameMgr = GetNameManager();
817 XclImpLinkManager& rLinkMgr = GetLinkManager();
819 // call to GetCurrSheetDrawing() cannot be cached (changes in new sheets)
824
825 bool bInUserView = false; // true = In USERSVIEW(BEGIN|END) record block.
826
827 enum XclImpReadState
828 {
829 EXC_STATE_BEFORE_GLOBALS,
830 EXC_STATE_GLOBALS_PRE,
831 EXC_STATE_GLOBALS,
832 EXC_STATE_BEFORE_SHEET,
833 EXC_STATE_SHEET_PRE,
834 EXC_STATE_SHEET,
835 EXC_STATE_END
836 };
837
838 XclImpReadState eCurrent = EXC_STATE_BEFORE_GLOBALS;
839
840 ErrCode eLastErr = ERRCODE_NONE;
841
842 std::unique_ptr< ScfSimpleProgressBar > pProgress( new ScfSimpleProgressBar(
843 aIn.GetSvStreamSize(), GetDocShell(), STR_LOAD_DOC ) );
844
845 /* #i104057# Need to track a base position for progress bar calculation,
846 because sheet substreams may not be in order of sheets. */
847 std::size_t nProgressBasePos = 0;
848 std::size_t nProgressBaseSize = 0;
849
850 bool bSheetHasCodeName = false;
851
852 std::vector<OUString> aCodeNames;
853 std::vector < SCTAB > nTabsWithNoCodeName;
854
855 sal_uInt16 nRecId = 0;
856
857 for (; eCurrent != EXC_STATE_END; mnLastRecId = nRecId)
858 {
859 if( eCurrent == EXC_STATE_BEFORE_SHEET )
860 {
861 sal_uInt16 nScTab = GetCurrScTab();
862 if( nScTab < maSheetOffsets.size() )
863 {
864 nProgressBaseSize += (maStrm.GetSvStreamPos() - nProgressBasePos);
865 nProgressBasePos = maSheetOffsets[ nScTab ];
866
867 bool bValid = TryStartNextRecord(aIn, nProgressBasePos);
868 if (!bValid)
869 {
870 // Safeguard ourselves from potential infinite loop.
871 eCurrent = EXC_STATE_END;
872 }
873
874 // import only 256 sheets
875 if( nScTab > GetScMaxPos().Tab() )
876 {
877 if( maStrm.GetRecId() != EXC_ID_EOF )
879 // #i29930# show warning box
881 eCurrent = EXC_STATE_END;
882 }
883 else
884 {
885 // #i109800# SHEET record may point to any record inside the
886 // sheet substream
887 bool bIsBof = maStrm.GetRecId() == EXC_ID5_BOF;
888 if( bIsBof )
889 Bof5(); // read the BOF record
890 else
891 pExcRoot->eDateiTyp = Biff8; // on missing BOF, assume a standard worksheet
892 NewTable();
893 switch( pExcRoot->eDateiTyp )
894 {
895 case Biff8: // worksheet
896 case Biff8M4: // macro sheet
897 eCurrent = EXC_STATE_SHEET_PRE; // Shrfmla Prefetch, Row-Prefetch
898 // go to next record
899 if( bIsBof ) maStrm.StartNextRecord();
901 break;
902 case Biff8C: // chart sheet
904 Eof();
906 break;
907 case Biff8W: // workbook
908 OSL_FAIL( "ImportExcel8::Read - double workbook globals" );
909 [[fallthrough]];
910 case Biff8V: // VB module
911 default:
912 // TODO: do not create a sheet in the Calc document
913 rD.SetVisible( nScTab, false );
915 IncCurrScTab();
916 }
917 }
918 }
919 else
920 eCurrent = EXC_STATE_END;
921 }
922 else
924
925 if( !aIn.IsValid() )
926 {
927 // #i63591# finalize table if EOF is missing
928 switch( eCurrent )
929 {
930 case EXC_STATE_SHEET_PRE:
931 eCurrent = EXC_STATE_SHEET;
933 continue; // next iteration in while loop
934 case EXC_STATE_SHEET:
935 Eof();
936 eCurrent = EXC_STATE_END;
937 break;
938 default:
939 eCurrent = EXC_STATE_END;
940 }
941 }
942
943 if( eCurrent == EXC_STATE_END )
944 break;
945
946 if( eCurrent != EXC_STATE_SHEET_PRE && eCurrent != EXC_STATE_GLOBALS_PRE )
947 pProgress->ProgressAbs( nProgressBaseSize + aIn.GetSvStreamPos() - nProgressBasePos );
948
949 nRecId = aIn.GetRecId();
950
951 /* #i39464# Ignore records between USERSVIEWBEGIN and USERSVIEWEND
952 completely (user specific view settings). Otherwise view settings
953 and filters are loaded multiple times, which at least causes
954 problems in auto-filters. */
955 switch( nRecId )
956 {
958 OSL_ENSURE( !bInUserView, "ImportExcel8::Read - nested user view settings" );
959 bInUserView = true;
960 break;
962 OSL_ENSURE( bInUserView, "ImportExcel8::Read - not in user view settings" );
963 bInUserView = false;
964 break;
965 }
966
967 if( !bInUserView ) switch( eCurrent )
968 {
969
970 // before workbook globals: wait for initial workbook globals BOF
971 case EXC_STATE_BEFORE_GLOBALS:
972 {
973 if( nRecId == EXC_ID5_BOF )
974 {
975 OSL_ENSURE( GetBiff() == EXC_BIFF8, "ImportExcel8::Read - wrong BIFF version" );
976 Bof5();
977 if( pExcRoot->eDateiTyp == Biff8W )
978 {
979 eCurrent = EXC_STATE_GLOBALS_PRE;
981 nBdshtTab = 0;
982 }
983 else if( pExcRoot->eDateiTyp == Biff8 )
984 {
985 // #i62752# possible to have BIFF8 sheet without globals
986 NewTable();
987 eCurrent = EXC_STATE_SHEET_PRE; // Shrfmla Prefetch, Row-Prefetch
988 bSheetHasCodeName = false; // reset
990 }
991 }
992 }
993 break;
994
995 // prefetch for workbook globals
996 case EXC_STATE_GLOBALS_PRE:
997 {
998 switch( nRecId )
999 {
1000 case EXC_ID_EOF:
1001 case EXC_ID_EXTSST:
1002 /* #i56376# evil hack: if EOF for globals is missing,
1003 simulate it. This hack works only for the bugdoc
1004 given in the issue, where the sheet substreams
1005 start directly after the EXTSST record. A future
1006 implementation should be more robust against
1007 missing EOFs. */
1008 if( (nRecId == EXC_ID_EOF) ||
1009 ((nRecId == EXC_ID_EXTSST) && (maStrm.GetNextRecId() == EXC_ID5_BOF)) )
1010 {
1011 eCurrent = EXC_STATE_GLOBALS;
1013 }
1014 break;
1015 case 0x12: DocProtect(); break; // PROTECT [ 5678]
1016 case 0x13: DocPassword(); break;
1017 case 0x19: WinProtection(); break;
1018 case 0x2F: // FILEPASS [ 2345 ]
1020 if( eLastErr != ERRCODE_NONE )
1021 eCurrent = EXC_STATE_END;
1022 break;
1023 case EXC_ID_FILESHARING: ReadFileSharing(); break;
1024 case 0x3D: Window1(); break;
1025 case 0x42: Codepage(); break; // CODEPAGE [ 2345 ]
1026 case 0x85: Boundsheet(); break; // BOUNDSHEET [ 5 ]
1027 case 0x8C: Country(); break; // COUNTRY [ 345 ]
1028
1029 // PALETTE follows XFs, but already needed while reading the XFs
1030 case EXC_ID_PALETTE: rPal.ReadPalette( maStrm ); break;
1031 }
1032 }
1033 break;
1034
1035 // workbook globals
1036 case EXC_STATE_GLOBALS:
1037 {
1038 switch( nRecId )
1039 {
1040 case EXC_ID_EOF:
1041 case EXC_ID_EXTSST:
1042 /* #i56376# evil hack: if EOF for globals is missing,
1043 simulate it. This hack works only for the bugdoc
1044 given in the issue, where the sheet substreams
1045 start directly after the EXTSST record. A future
1046 implementation should be more robust against
1047 missing EOFs. */
1048 if( (nRecId == EXC_ID_EOF) ||
1049 ((nRecId == EXC_ID_EXTSST) && (maStrm.GetNextRecId() == EXC_ID5_BOF)) )
1050 {
1051 rNumFmtBfr.CreateScFormats();
1052 rXFBfr.CreateUserStyles();
1053 rPTableMgr.ReadPivotCaches( maStrm );
1054 rNameMgr.ConvertAllTokens();
1055 eCurrent = EXC_STATE_BEFORE_SHEET;
1056 }
1057 break;
1058 case 0x0E: Precision(); break; // PRECISION
1059 case 0x22: Rec1904(); break; // 1904 [ 2345 ]
1060 case 0x56: break; // BUILTINFMTCNT[ 34 ]
1061 case 0x8D: Hideobj(); break; // HIDEOBJ [ 345 ]
1062 case 0xD3: SetHasBasic(); break;
1063 case 0xDE: Olesize(); break;
1064
1065 case EXC_ID_CODENAME: ReadCodeName( aIn, true ); break;
1066 case EXC_ID_USESELFS: ReadUsesElfs(); break;
1067
1068 case EXC_ID2_FONT: rFontBfr.ReadFont( maStrm ); break;
1069 case EXC_ID4_FORMAT: rNumFmtBfr.ReadFormat( maStrm ); break;
1070 case EXC_ID5_XF: rXFBfr.ReadXF( maStrm ); break;
1071 case EXC_ID_STYLE: rXFBfr.ReadStyle( maStrm ); break;
1072
1073 case EXC_ID_SST: rSst.ReadSst( maStrm ); break;
1074 case EXC_ID_TABID: rTabInfo.ReadTabid( maStrm ); break;
1075 case EXC_ID_NAME: rNameMgr.ReadName( maStrm ); break;
1076
1077 case EXC_ID_EXTERNSHEET: rLinkMgr.ReadExternsheet( maStrm ); break;
1078 case EXC_ID_SUPBOOK: rLinkMgr.ReadSupbook( maStrm ); break;
1079 case EXC_ID_XCT: rLinkMgr.ReadXct( maStrm ); break;
1080 case EXC_ID_CRN: rLinkMgr.ReadCrn( maStrm ); break;
1081 case EXC_ID_EXTERNNAME: rLinkMgr.ReadExternname( maStrm, pFormConv.get() ); break;
1082
1083 case EXC_ID_MSODRAWINGGROUP:rObjMgr.ReadMsoDrawingGroup( maStrm ); break;
1084
1085 case EXC_ID_SXIDSTM: rPTableMgr.ReadSxidstm( maStrm ); break;
1086 case EXC_ID_SXVS: rPTableMgr.ReadSxvs( maStrm ); break;
1087 case EXC_ID_DCONREF: rPTableMgr.ReadDconref( maStrm ); break;
1088 case EXC_ID_DCONNAME: rPTableMgr.ReadDConName( maStrm ); break;
1089 }
1090
1091 }
1092 break;
1093
1094 // prefetch for worksheet
1095 case EXC_STATE_SHEET_PRE:
1096 {
1097 switch( nRecId )
1098 {
1099 // skip chart substream
1100 case EXC_ID2_BOF:
1101 case EXC_ID3_BOF:
1102 case EXC_ID4_BOF:
1104
1105 case EXC_ID_WINDOW2: rTabViewSett.ReadWindow2( maStrm, false );break;
1106 case EXC_ID_SCL: rTabViewSett.ReadScl( maStrm ); break;
1107 case EXC_ID_PANE: rTabViewSett.ReadPane( maStrm ); break;
1108 case EXC_ID_SELECTION: rTabViewSett.ReadSelection( maStrm ); break;
1109
1110 case EXC_ID2_DIMENSIONS:
1111 case EXC_ID3_DIMENSIONS: ReadDimensions(); break;
1112
1113 case EXC_ID_CODENAME: ReadCodeName( aIn, false ); bSheetHasCodeName = true; break;
1114
1115 case 0x0A: // EOF [ 2345 ]
1116 {
1117 eCurrent = EXC_STATE_SHEET;
1118 OUString sName;
1120 if ( !bSheetHasCodeName )
1121 {
1122 nTabsWithNoCodeName.push_back( GetCurrScTab() );
1123 }
1124 else
1125 {
1126 OUString sCodeName;
1127 GetDoc().GetCodeName( GetCurrScTab(), sCodeName );
1128 aCodeNames.push_back( sCodeName );
1129 }
1130
1131 bSheetHasCodeName = false; // reset
1132
1133 aIn.SeekGlobalPosition(); // and back to old position
1134 break;
1135 }
1136 case 0x12: SheetProtect(); break;
1137 case 0x13: SheetPassword(); break;
1138 case 0x42: Codepage(); break; // CODEPAGE [ 2345 ]
1139 case 0x55: DefColWidth(); break;
1140 case 0x7D: Colinfo(); break; // COLINFO [ 345 ]
1141 case 0x81: Wsbool(); break; // WSBOOL [ 2345 ]
1142 case 0x8C: Country(); break; // COUNTRY [ 345 ]
1143 case 0x99: Standardwidth(); break; // STANDARDWIDTH[ 45 ]
1144 case 0x9B: FilterMode(); break; // FILTERMODE
1145 case EXC_ID_AUTOFILTERINFO: AutoFilterInfo(); break;// AUTOFILTERINFO
1146 case EXC_ID_AUTOFILTER: AutoFilter(); break; // AUTOFILTER
1147 case 0x0208: Row34(); break; // ROW [ 34 ]
1148 case EXC_ID2_ARRAY:
1149 case EXC_ID3_ARRAY: Array34(); break; // ARRAY [ 34 ]
1150 case 0x0225: Defrowheight345();break;//DEFAULTROWHEI[ 345 ]
1151 case 0x0867: FeatHdr(); break; // FEATHDR
1152 case 0x0868: Feat(); break; // FEAT
1153 }
1154 }
1155 break;
1156
1157 // worksheet
1158 case EXC_STATE_SHEET:
1159 {
1160 switch( nRecId )
1161 {
1162 // skip unknown substreams
1163 case EXC_ID2_BOF:
1164 case EXC_ID3_BOF:
1165 case EXC_ID4_BOF:
1167
1168 case EXC_ID_EOF: Eof(); eCurrent = EXC_STATE_BEFORE_SHEET; break;
1169
1170 case EXC_ID2_BLANK:
1171 case EXC_ID3_BLANK: ReadBlank(); break;
1172 case EXC_ID2_INTEGER: ReadInteger(); break;
1173 case EXC_ID2_NUMBER:
1174 case EXC_ID3_NUMBER: ReadNumber(); break;
1175 case EXC_ID2_LABEL:
1176 case EXC_ID3_LABEL: ReadLabel(); break;
1177 case EXC_ID2_BOOLERR:
1178 case EXC_ID3_BOOLERR: ReadBoolErr(); break;
1179 case EXC_ID_RK: ReadRk(); break;
1180
1181 case EXC_ID2_FORMULA:
1182 case EXC_ID3_FORMULA:
1183 case EXC_ID4_FORMULA: Formula25(); break;
1184 case EXC_ID_SHRFMLA: Shrfmla(); break;
1185 case 0x000C: Calccount(); break; // CALCCOUNT
1186 case 0x0010: Delta(); break; // DELTA
1187 case 0x0011: Iteration(); break; // ITERATION
1188 case 0x007E:
1189 case 0x00AE: Scenman(); break; // SCENMAN
1190 case 0x00AF: Scenario(); break; // SCENARIO
1191 case 0x00BD: Mulrk(); break; // MULRK [ 5 ]
1192 case 0x00BE: Mulblank(); break; // MULBLANK [ 5 ]
1193 case 0x00D6: Rstring(); break; // RSTRING [ 5 ]
1194 case 0x00E5: Cellmerging(); break; // CELLMERGING
1195 case 0x00FD: Labelsst(); break; // LABELSST [ 8 ]
1196 case 0x0236: TableOp(); break; // TABLE
1197
1199 case EXC_ID_VERPAGEBREAKS: rPageSett.ReadPageBreaks( maStrm ); break;
1200 case EXC_ID_HEADER:
1201 case EXC_ID_FOOTER: rPageSett.ReadHeaderFooter( maStrm ); break;
1202 case EXC_ID_LEFTMARGIN:
1203 case EXC_ID_RIGHTMARGIN:
1204 case EXC_ID_TOPMARGIN:
1205 case EXC_ID_BOTTOMMARGIN: rPageSett.ReadMargin( maStrm ); break;
1206 case EXC_ID_PRINTHEADERS: rPageSett.ReadPrintHeaders( maStrm ); break;
1207 case EXC_ID_PRINTGRIDLINES: rPageSett.ReadPrintGridLines( maStrm ); break;
1208 case EXC_ID_HCENTER:
1209 case EXC_ID_VCENTER: rPageSett.ReadCenter( maStrm ); break;
1210 case EXC_ID_SETUP: rPageSett.ReadSetup( maStrm ); break;
1211 case EXC_ID8_IMGDATA: rPageSett.ReadImgData( maStrm ); break;
1212
1214 // #i61786# weird documents: OBJ without MSODRAWING -> read in BIFF5 format
1215 case EXC_ID_OBJ: GetCurrSheetDrawing().ReadObj( maStrm ); break;
1217
1220
1221 case EXC_ID_CONDFMT: rCondFmtMgr.ReadCondfmt( maStrm ); break;
1222 case EXC_ID_CF: rCondFmtMgr.ReadCF( maStrm ); break;
1223
1225 case EXC_ID_DV: rValidMgr.ReadDV( maStrm ); break;
1226
1227 case EXC_ID_QSI: rWQBfr.ReadQsi( maStrm ); break;
1228 case EXC_ID_WQSTRING: rWQBfr.ReadWqstring( maStrm ); break;
1229 case EXC_ID_PQRY: rWQBfr.ReadParamqry( maStrm ); break;
1230 case EXC_ID_WQSETT: rWQBfr.ReadWqsettings( maStrm ); break;
1231 case EXC_ID_WQTABLES: rWQBfr.ReadWqtables( maStrm ); break;
1232
1233 case EXC_ID_SXVIEW: rPTableMgr.ReadSxview( maStrm ); break;
1234 case EXC_ID_SXVD: rPTableMgr.ReadSxvd( maStrm ); break;
1235 case EXC_ID_SXVI: rPTableMgr.ReadSxvi( maStrm ); break;
1236 case EXC_ID_SXIVD: rPTableMgr.ReadSxivd( maStrm ); break;
1237 case EXC_ID_SXPI: rPTableMgr.ReadSxpi( maStrm ); break;
1238 case EXC_ID_SXDI: rPTableMgr.ReadSxdi( maStrm ); break;
1239 case EXC_ID_SXVDEX: rPTableMgr.ReadSxvdex( maStrm ); break;
1240 case EXC_ID_SXEX: rPTableMgr.ReadSxex( maStrm ); break;
1241 case EXC_ID_SHEETEXT: rTabViewSett.ReadTabBgColor( maStrm, rPal ); break;
1242 case EXC_ID_SXVIEWEX9: rPTableMgr.ReadSxViewEx9( maStrm ); break;
1243 case EXC_ID_SXADDL: rPTableMgr.ReadSxAddl( maStrm ); break;
1244 }
1245 }
1246 break;
1247
1248 default:;
1249 }
1250 }
1251
1252 if( eLastErr == ERRCODE_NONE )
1253 {
1254 // In some strange circumstances the codename might be missing
1255 // # Create any missing Sheet CodeNames
1256 for ( const auto& rTab : nTabsWithNoCodeName )
1257 {
1258 SCTAB nTab = 1;
1259 while ( true )
1260 {
1261 OUString sTmpName = "Sheet" + OUString::number(static_cast<sal_Int32>(nTab++));
1262
1263 if ( std::find(aCodeNames.begin(), aCodeNames.end(), sTmpName) == aCodeNames.end() ) // generated codename not found
1264 {
1265 // Set new codename
1266 GetDoc().SetCodeName( rTab, sTmpName );
1267 // Record newly used codename
1268 aCodeNames.push_back(sTmpName);
1269 break;
1270 }
1271 }
1272 }
1273 // #i45843# Convert pivot tables before calculation, so they are available
1274 // for the GETPIVOTDATA function.
1275 if( GetBiff() == EXC_BIFF8 )
1277
1279 rDoc.finalize();
1280 pProgress.reset();
1281#if 0
1282 // Excel documents look much better without this call; better in the
1283 // sense that the row heights are identical to the original heights in
1284 // Excel.
1285 if ( !rD.IsAdjustHeightLocked())
1287#endif
1288 PostDocLoad();
1289
1290 rD.CalcAfterLoad(false);
1291
1292 // import change tracking data
1293 XclImpChangeTrack aImpChTr( GetRoot(), maStrm );
1294 aImpChTr.Apply();
1295
1296 const XclImpAddressConverter& rAddrConv = GetAddressConverter();
1297 if( rAddrConv.IsTabTruncated() )
1299 else if( bTabTruncated || rAddrConv.IsRowTruncated() )
1300 eLastErr = SCWARN_IMPORT_ROW_OVERFLOW;
1301 else if( rAddrConv.IsColTruncated() )
1303
1304 if( GetBiff() == EXC_BIFF8 )
1306 }
1307
1308 return eLastErr;
1309}
1310
1311/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void FeatHdr()
Definition: excimp8.cxx:256
void AutoFilter()
Definition: excimp8.cxx:457
virtual void PostDocLoad() override
Definition: excimp8.cxx:384
void Iteration()
Definition: excimp8.cxx:181
void FilterMode()
Definition: excimp8.cxx:432
void Precision()
Definition: excimp8.cxx:167
virtual ErrCode Read() override
Definition: read.cxx:796
void Delta()
Definition: excimp8.cxx:174
void Scenario()
Definition: excimp8.cxx:231
void Feat()
Definition: excimp8.cxx:273
void Labelsst()
Definition: excimp8.cxx:236
void Calccount()
Definition: excimp8.cxx:160
void AutoFilterInfo()
Definition: excimp8.cxx:445
void Scenman()
Definition: excimp8.cxx:221
void Boundsheet()
Definition: excimp8.cxx:188
void Formula4()
Definition: excform.cxx:82
void ReadUsesElfs()
Definition: impop.cxx:745
void ReadFileSharing()
Definition: impop.cxx:161
void Shrfmla()
Definition: impop.cxx:801
void Boundsheet()
Definition: impop.cxx:695
void ReadBoolErr()
Definition: impop.cxx:344
void DocPassword()
Definition: impop.cxx:617
void ReadBlank()
Definition: impop.cxx:266
void ReadNumber()
Definition: impop.cxx:297
void DefColWidth()
Definition: impop.cxx:635
void SheetPassword()
Definition: impop.cxx:446
void Row25()
Definition: impop.cxx:394
void ReadRk()
Definition: impop.cxx:372
void Formula25()
Definition: excform.cxx:43
sal_uInt16 mnLastRecId
Current XF identifier from IXFE record.
Definition: imp_op.hxx:109
void Defrowheight2()
Definition: impop.cxx:593
void Formula3()
Definition: excform.cxx:77
void Hideobj()
Definition: impop.cxx:755
void Colinfo()
Definition: impop.cxx:654
bool bTabTruncated
Definition: imp_op.hxx:113
void Columndefault()
Definition: impop.cxx:471
void Ixfe()
Definition: impop.cxx:630
void Standardwidth()
Definition: impop.cxx:790
void Mulblank()
Definition: impop.cxx:902
SCTAB nBdshtTab
Definition: imp_op.hxx:111
void Country()
Definition: impop.cxx:728
void Bof4()
Definition: impop.cxx:1180
void Row34()
Definition: impop.cxx:1001
void ReadLabel()
Definition: impop.cxx:314
void WinProtection()
Definition: impop.cxx:463
void Wsbool()
Definition: impop.cxx:684
void ReadInteger()
Definition: impop.cxx:280
XclImpStream maStrm
Definition: imp_op.hxx:89
void Rec1904()
Definition: impop.cxx:537
RootData * pExcRoot
Definition: imp_op.hxx:87
void Bof2()
Definition: impop.cxx:424
void Cellmerging()
Definition: impop.cxx:965
ScfUInt32Vec maSheetOffsets
Definition: imp_op.hxx:92
void Defrowheight345()
Definition: impop.cxx:1082
void Array34()
Definition: impop.cxx:1049
std::unique_ptr< ExcelToSc > pFormConv
Visible range if embedded.
Definition: imp_op.hxx:95
void Codepage()
Definition: impop.cxx:625
void Bof5()
Definition: impop.cxx:1197
void AdjustRowHeight()
Definition: impop.cxx:1268
void DocProtect()
Definition: impop.cxx:609
void Olesize()
Definition: impop.cxx:991
void Colwidth()
Definition: impop.cxx:576
void Externsheet()
Definition: impop.cxx:454
virtual void PostDocLoad()
Definition: impop.cxx:1278
void NewTable()
Definition: impop.cxx:1236
void Window1()
Definition: impop.cxx:389
XclImpStream & aIn
Definition: imp_op.hxx:90
virtual ErrCode Read()
Definition: read.cxx:70
void Mulrk()
Definition: impop.cxx:859
void ReadDimensions()
Definition: impop.cxx:223
void Array25()
Definition: impop.cxx:497
void TableOp()
Definition: impop.cxx:1097
void Bof3()
Definition: impop.cxx:1031
void Eof()
Definition: impop.cxx:439
void Externname25()
Definition: impop.cxx:552
void SheetProtect()
Definition: impop.cxx:601
void Rstring()
Definition: impop.cxx:942
ScDocument & rD
Definition: imp_op.hxx:46
Accessor class to ScDocument.
bool IsAdjustHeightLocked() const
Definition: document.hxx:1599
SC_DLLPUBLIC void CalcAfterLoad(bool bStartListening=true)
Definition: document.cxx:4029
void SetCodeName(const OUString &r)
Definition: document.hxx:610
const OUString & GetCodeName() const
Definition: document.hxx:609
SC_DLLPUBLIC bool GetName(SCTAB nTab, OUString &rName) const
Definition: document.cxx:204
SC_DLLPUBLIC void SetVisible(SCTAB nTab, bool bVisible)
Definition: document.cxx:884
A simplified progress bar with only one segment.
bool IsRowTruncated() const
Returns whether the "some rows have been cut" warning box should be shown.
Definition: xladdress.hxx:148
bool IsColTruncated() const
Returns whether the "some columns have been cut" warning box should be shown.
Definition: xladdress.hxx:146
void CheckScTab(SCTAB nScTab)
Checks if the passed sheet index is valid.
Definition: xladdress.cxx:151
bool IsTabTruncated() const
Returns whether the "some sheets have been cut" warning box should be shown.
Definition: xladdress.hxx:150
Provides functions to convert Excel cell addresses to Calc cell addresses.
Definition: xihelper.hxx:42
Imports and collects all conditional formatting of a sheet.
Definition: xicontent.hxx:148
void ReadCondfmt(XclImpStream &rStrm)
Reads a CONDFMT record and starts a new conditional format to be filled from CF records.
Definition: xicontent.cxx:719
void ReadCF(XclImpStream &rStrm)
Reads a CF record and inserts the formatting data to the current conditional format.
Definition: xicontent.cxx:726
static const ErrCode & ReadFilepass(XclImpStream &rStrm)
Reads the FILEPASS record, queries a password and sets decryption algorithm.
Definition: xicontent.cxx:1248
void ReadObj(XclImpStream &rStrm)
Reads a plain OBJ record (without leading DFF data).
Definition: xiescher.cxx:3989
void ReadMsoDrawing(XclImpStream &rStrm)
Reads the MSODRAWING or MSODRAWINGSELECTION record.
Definition: xiescher.cxx:4022
Stores the data of all fonts occurred in an Excel file.
Definition: xistyle.hxx:153
void ReadFont(XclImpStream &rStrm)
Reads a FONT record.
Definition: xistyle.cxx:578
void ReadEfont(XclImpStream &rStrm)
Reads an EFONT record (BIFF2 font color).
Definition: xistyle.cxx:590
static void ReadLabelranges(XclImpStream &rStrm)
Reads a LABELRANGES record and inserts the label ranges into the document.
Definition: xicontent.cxx:442
This is the central class for the import of all internal/external links.
Definition: xilink.hxx:185
void ReadSupbook(XclImpStream &rStrm)
Reads a SUPBOOK record.
Definition: xilink.cxx:907
void ReadExternname(XclImpStream &rStrm, ExcelToSc *pFormulaConv)
Reads an EXTERNNAME record and appends it to the current SUPBOOK.
Definition: xilink.cxx:922
void ReadXct(XclImpStream &rStrm)
Reads an XCT record and appends it to the current SUPBOOK.
Definition: xilink.cxx:912
void ReadCrn(XclImpStream &rStrm)
Reads a CRN record and appends it to the current SUPBOOK.
Definition: xilink.cxx:917
void ReadExternsheet(XclImpStream &rStrm)
Reads the EXTERNSHEET record.
Definition: xilink.cxx:902
This buffer contains all internal defined names of the document.
Definition: xiname.hxx:82
void ConvertAllTokens()
Definition: xiname.cxx:323
void ReadName(XclImpStream &rStrm)
Reads a NAME record and creates an entry in this buffer.
Definition: xiname.cxx:283
Stores all user defined number formats occurred in the file.
Definition: xistyle.hxx:205
void CreateScFormats()
Creates the number formats in the Calc document.
Definition: xistyle.cxx:700
void ReadFormat(XclImpStream &rStrm)
Reads a FORMAT record.
Definition: xistyle.cxx:644
Stores all drawing and OLE objects and additional data related to these objects.
Definition: xiescher.hxx:1151
void ReadMsoDrawingGroup(XclImpStream &rStrm)
Reads the MSODRAWINGGROUP record.
Definition: xiescher.cxx:4417
Contains all page (print) settings for a single sheet.
Definition: xipage.hxx:30
void ReadPrintHeaders(XclImpStream &rStrm)
Reads a PRINTHEADERS record.
Definition: xipage.cxx:171
void ReadSetup(XclImpStream &rStrm)
Reads a SETUP record and inserts contained data.
Definition: xipage.cxx:53
void ReadCenter(XclImpStream &rStrm)
Reads a HCENTER or VCENTER record.
Definition: xipage.cxx:101
void ReadPrintGridLines(XclImpStream &rStrm)
Reads a PRINTGRIDLINES record.
Definition: xipage.cxx:176
void ReadMargin(XclImpStream &rStrm)
Reads a ***MARGIN record (reads all 4 margin records).
Definition: xipage.cxx:89
void ReadImgData(XclImpStream &rStrm)
Reads an IMGDATA record and creates the SvxBrushItem.
Definition: xipage.cxx:181
void ReadPageBreaks(XclImpStream &rStrm)
Reads a HORIZONTALPAGEBREAKS or VERTICALPAGEBREAKS record.
Definition: xipage.cxx:141
void ReadHeaderFooter(XclImpStream &rStrm)
Reads a HEADER or FOOTER record.
Definition: xipage.cxx:113
Stores the default colors for the current BIFF version and the contents of a PALETTE record.
Definition: xistyle.hxx:45
void ReadPalette(XclImpStream &rStrm)
Reads a PALETTE record.
Definition: xistyle.cxx:168
The main class for pivot table import.
Definition: xipivot.hxx:372
void ReadSxvdex(XclImpStream &rStrm)
Reads an SXVDEX record describing extended options of a field.
Definition: xipivot.cxx:1670
void ReadSxvi(XclImpStream &rStrm)
Reads an SXVI record describing a new item of the current field.
Definition: xipivot.cxx:1694
void ReadSxpi(XclImpStream &rStrm)
Reads an SXPI record containing page field data.
Definition: xipivot.cxx:1682
void ReadSxViewEx9(XclImpStream &rStrm)
Reads an SXVIEWEX9 record that specifies the pivot tables autoformat.
Definition: xipivot.cxx:1706
void ReadPivotCaches(const XclImpStream &rStrm)
Reads all used pivot caches and creates additional sheets for external data sources.
Definition: xipivot.cxx:1718
void ReadSxview(XclImpStream &rStrm)
Reads an SXVIEW record describing a new pivot table.
Definition: xipivot.cxx:1657
void ReadDconref(XclImpStream &rStrm)
Reads a DCONREF record containing the source range of a pivot cache.
Definition: xipivot.cxx:1643
void ReadSxivd(XclImpStream &rStrm)
Reads an SXIVD record containing the row field or column field order.
Definition: xipivot.cxx:1676
void ReadSxdi(XclImpStream &rStrm)
Reads an SXDI record containing data field data.
Definition: xipivot.cxx:1688
void ReadSxidstm(XclImpStream &rStrm)
Reads an SXIDSTM record containing a pivot cache stream identifier and the pivot cache.
Definition: xipivot.cxx:1630
void ReadSxAddl(XclImpStream &rStrm)
Reads an SXADDL record that specifies additional info for pivot table.
Definition: xipivot.cxx:1712
void ReadSxvd(XclImpStream &rStrm)
Reads an SXVD record describing a new field.
Definition: xipivot.cxx:1664
void ReadDConName(XclImpStream &rStrm)
Definition: xipivot.cxx:1649
void ConvertPivotTables()
Inserts all pivot tables into the Calc document.
Definition: xipivot.cxx:1724
void ReadSxex(XclImpStream &rStrm)
Reads an SXEX record containing additional settings for a pivot table.
Definition: xipivot.cxx:1700
void ReadSxvs(XclImpStream &rStrm)
Reads an SXVS record containing the source type of a pivot cache.
Definition: xipivot.cxx:1637
XclImpAddressConverter & GetAddressConverter() const
Returns the address converter.
Definition: xiroot.cxx:123
XclImpXFBuffer & GetXFBuffer() const
Returns the cell formatting attributes buffer.
Definition: xiroot.cxx:160
XclImpWebQueryBuffer & GetWebQueryBuffer() const
Returns the web query buffer.
Definition: xiroot.cxx:226
void ReadCodeName(XclImpStream &rStrm, bool bGlobals)
Reads the CODENAME record and inserts the codename into the document.
Definition: xiroot.cxx:273
XclImpLinkManager & GetLinkManager() const
Returns the link manager.
Definition: xiroot.cxx:190
ScDocumentImport & GetDocImport()
Definition: xiroot.cxx:294
XclImpCondFormatManager & GetCondFormatManager() const
Returns the conditional formatting manager.
Definition: xiroot.cxx:207
XclImpFontBuffer & GetFontBuffer() const
Returns the font buffer.
Definition: xiroot.cxx:150
XclImpNameManager & GetNameManager() const
Returns the buffer that contains internal defined names.
Definition: xiroot.cxx:185
XclImpValidationManager & GetValidationManager() const
Definition: xiroot.cxx:213
void SetHasBasic()
Called to indicate that the document contains a VB project.
Definition: xiroot.hxx:209
XclImpPalette & GetPalette() const
Returns the color buffer.
Definition: xiroot.cxx:145
XclImpSst & GetSst() const
Returns the shared string table.
Definition: xiroot.cxx:139
const XclImpRoot & GetRoot() const
Returns this root instance - for code readability in derived classes.
Definition: xiroot.hxx:134
XclImpPageSettings & GetPageSettings() const
Returns the page settings of the current sheet.
Definition: xiroot.cxx:250
XclImpSheetDrawing & GetCurrSheetDrawing() const
Returns the drawing container of the current sheet.
Definition: xiroot.cxx:201
XclImpTabInfo & GetTabInfo() const
Returns the buffer that contains the sheet creation order.
Definition: xiroot.cxx:180
XclImpObjectManager & GetObjectManager() const
Returns the drawing object manager.
Definition: xiroot.cxx:196
XclImpTabViewSettings & GetTabViewSettings() const
Returns the view settings of the current sheet.
Definition: xiroot.cxx:260
XclImpPivotTableManager & GetPivotTableManager() const
Returns the pivot table manager.
Definition: xiroot.cxx:232
XclImpNumFmtBuffer & GetNumFmtBuffer() const
Returns the number format buffer.
Definition: xiroot.cxx:155
void ReadNote(XclImpStream &rStrm)
Reads the NOTE record.
Definition: xiescher.cxx:4280
void ReadTabChart(XclImpStream &rStrm)
Inserts a new chart object and reads the chart substream (BOF/EOF block).
Definition: xiescher.cxx:4298
The SST (shared string table) contains all strings used in a BIFF8 file.
Definition: xicontent.hxx:56
void ReadSst(XclImpStream &rStrm)
Reads the entire SST record.
Definition: xicontent.cxx:74
This class is used to import record oriented streams.
Definition: xistream.hxx:278
bool IsValid() const
Returns record reading state: false = record overread.
Definition: xistream.hxx:351
std::size_t GetSvStreamSize() const
Returns the stream size.
Definition: xistream.hxx:461
sal_uInt16 GetNextRecId()
Returns the record ID of the following record.
Definition: xistream.cxx:587
sal_uInt16 GetRecId() const
Returns the current record ID.
Definition: xistream.hxx:353
void StoreGlobalPosition()
Stores current position.
Definition: xistream.cxx:543
void SeekGlobalPosition()
Seeks to the stored global user position.
Definition: xistream.cxx:551
std::size_t GetSvStreamPos() const
Returns the absolute stream position.
Definition: xistream.hxx:459
sal_uInt16 PeekRecId(std::size_t nPos)
Definition: xistream.cxx:604
bool StartNextRecord()
Sets stream pointer to the start of the next record content.
Definition: xistream.cxx:456
A buffer containing information about names and creation order of sheets.
Definition: xilink.hxx:62
void ReadTabid(XclImpStream &rStrm)
Reads the TABID record.
Definition: xilink.cxx:247
Contains all view settings for a single sheet.
Definition: xiview.hxx:59
void ReadSelection(XclImpStream &rStrm)
Reads a SELECTION record.
Definition: xiview.cxx:200
void ReadWindow2(XclImpStream &rStrm, bool bChart)
Reads a WINDOW2 record.
Definition: xiview.cxx:117
void ReadScl(XclImpStream &rStrm)
Reads an SCL record.
Definition: xiview.cxx:181
void ReadPane(XclImpStream &rStrm)
Reads a PANE record.
Definition: xiview.cxx:191
void ReadTabBgColor(XclImpStream &rStrm, const XclImpPalette &rPal)
Reads a SHEETEXT record (Tab Color).
Definition: xiview.cxx:101
Imports validation data.
Definition: xicontent.hxx:169
static void ReadDval(XclImpStream &rStrm)
Reads a DVAL record and sets marks the dropdown arrow control to be ignored.
Definition: xicontent.cxx:750
void ReadDV(XclImpStream &rStrm)
Reads a DV record and inserts validation data into the document.
Definition: xicontent.cxx:765
void ReadWqsettings(XclImpStream &rStrm)
Reads a WEBQRYSETTINGS record and sets refresh rate to the current web query.
Definition: xicontent.cxx:1088
void ReadWqtables(XclImpStream &rStrm)
Reads a WEBQRYTABLES record and sets source range list to the current web query.
Definition: xicontent.cxx:1094
void ReadWqstring(XclImpStream &rStrm)
Reads a WQSTRING record and sets URL to the current web query.
Definition: xicontent.cxx:1082
void ReadQsi(XclImpStream &rStrm)
Reads the QSI record and creates a new web query in the buffer.
Definition: xicontent.cxx:1049
void ReadParamqry(XclImpStream &rStrm)
Reads a PARAMQRY record and sets data to the current web query.
Definition: xicontent.cxx:1076
Contains all XF records occurred in the file.
Definition: xistyle.hxx:479
void ReadStyle(XclImpStream &rStrm)
Reads a STYLE record.
Definition: xistyle.cxx:1580
void CreateUserStyles()
Creates all user defined style sheets.
Definition: xistyle.cxx:1613
void ReadXF(XclImpStream &rStrm)
Reads an XF record.
Definition: xistyle.cxx:1573
SfxObjectShell * GetDocShell() const
Returns the object shell of the Calc document.
Definition: xlroot.cxx:290
const ScAddress & GetScMaxPos() const
Returns the highest possible cell address in a Calc document.
Definition: xlroot.hxx:244
XclTracer & GetTracer() const
Returns the filter tracer.
Definition: xlroot.cxx:434
SCTAB GetCurrScTab() const
Returns the current Calc sheet index.
Definition: xlroot.hxx:162
XclBiff GetBiff() const
Returns the current BIFF version of the importer/exporter.
Definition: xlroot.hxx:141
void IncCurrScTab()
Increases the current Calc sheet index by 1.
Definition: xlroot.hxx:263
ScDocument & GetDoc() const
Returns reference to the destination document (import) or source document (export).
Definition: xlroot.cxx:285
static void SkipSubStream(XclImpStream &rStrm)
Skips a substream (BOF/EOF record block).
Definition: xltools.cxx:688
void TraceChartOnlySheet()
Definition: xltracer.cxx:100
static bool IsFuzzing()
#define ERRCODE_ABORT
#define ERRCODE_NONE
@ Biff8C
Definition: flttypes.hxx:29
@ Biff5C
Definition: flttypes.hxx:28
@ Biff5
Definition: flttypes.hxx:28
@ Biff4
Definition: flttypes.hxx:27
@ Biff5M4
Definition: flttypes.hxx:28
@ Biff4W
Definition: flttypes.hxx:27
@ Biff8
Definition: flttypes.hxx:29
@ Biff8W
Definition: flttypes.hxx:29
@ Biff5V
Definition: flttypes.hxx:28
@ Biff2
Definition: flttypes.hxx:25
@ Biff5W
Definition: flttypes.hxx:28
@ Biff3
Definition: flttypes.hxx:26
@ Biff8V
Definition: flttypes.hxx:29
@ Biff8M4
Definition: flttypes.hxx:29
OUString sName
STATE
#define SCWARN_IMPORT_ROW_OVERFLOW
Definition: scerrors.hxx:62
#define SCWARN_IMPORT_COLUMN_OVERFLOW
Definition: scerrors.hxx:63
#define SCWARN_IMPORT_SHEET_OVERFLOW
Definition: scerrors.hxx:64
BiffTyp eDateiTyp
Definition: root.hxx:45
#define sal_True
sal_Int16 SCTAB
Definition: types.hxx:22
const sal_uInt16 EXC_ID2_BOF
Text rotation: vertically stacked.
Definition: xlconst.hxx:147
const sal_uInt16 EXC_ID_AUTOFILTER
Definition: xlconst.hxx:206
const sal_uInt16 EXC_ID_AUTOFILTERINFO
Definition: xlconst.hxx:203
const sal_uInt16 EXC_ID_USERSVIEWEND
Definition: xlconst.hxx:225
const sal_uInt16 EXC_ID_USESELFS
Definition: xlconst.hxx:218
const sal_uInt16 EXC_ID4_BOF
Definition: xlconst.hxx:149
@ EXC_BIFF5
MS Excel 4.0.
Definition: xlconst.hxx:34
@ EXC_BIFF4
MS Excel 3.0.
Definition: xlconst.hxx:33
@ EXC_BIFF2
Definition: xlconst.hxx:31
@ EXC_BIFF8
MS Excel 5.0, MS Excel 7.0 (95)
Definition: xlconst.hxx:35
@ EXC_BIFF3
MS Excel 2.1.
Definition: xlconst.hxx:32
const sal_uInt16 EXC_ID_CODENAME
Definition: xlconst.hxx:228
const sal_uInt16 EXC_ID_USERSVIEWBEGIN
Definition: xlconst.hxx:224
const sal_uInt16 EXC_ID5_BOF
Definition: xlconst.hxx:150
const sal_uInt16 EXC_ID3_BOF
Definition: xlconst.hxx:148
const sal_uInt16 EXC_ID_EOF
Internal use only.
Definition: xlconst.hxx:167
const sal_uInt16 EXC_ID_DV
Definition: xlcontent.hxx:103
const sal_uInt16 EXC_ID_LABELRANGES
Definition: xlcontent.hxx:50
const sal_uInt16 EXC_ID_CF
Definition: xlcontent.hxx:55
const sal_uInt16 EXC_ID_FILESHARING
Definition: xlcontent.hxx:29
const sal_uInt16 EXC_ID_QSI
All tables.
Definition: xlcontent.hxx:167
const sal_uInt16 EXC_ID_WQSTRING
Definition: xlcontent.hxx:156
const sal_uInt16 EXC_ID_HLINK
Definition: xlcontent.hxx:142
const sal_uInt16 EXC_ID_SST
Definition: xlcontent.hxx:45
const sal_uInt16 EXC_ID_WQTABLES
Definition: xlcontent.hxx:183
const sal_uInt16 EXC_ID_EXTSST
Definition: xlcontent.hxx:46
const sal_uInt16 EXC_ID_PQRY
Definition: xlcontent.hxx:159
const sal_uInt16 EXC_ID_CONDFMT
Definition: xlcontent.hxx:54
const sal_uInt16 EXC_ID_DVAL
Font escapement type modified?
Definition: xlcontent.hxx:98
const sal_uInt16 EXC_ID_WQSETT
Definition: xlcontent.hxx:174
const sal_uInt16 EXC_ID8_IMGDATA
Definition: xlescher.hxx:242
const sal_uInt16 EXC_ID_OBJ
Definition: xlescher.hxx:44
const sal_uInt16 EXC_ID_MSODRAWING
Definition: xlescher.hxx:263
const sal_uInt16 EXC_ID_NOTE
Definition: xlescher.hxx:38
const sal_uInt16 EXC_ID_MSODRAWINGGROUP
Definition: xlescher.hxx:259
const sal_uInt16 EXC_ID_NAME
Definition: xlname.hxx:28
const sal_uInt16 EXC_ID_FOOTER
Definition: xlpage.hxx:31
const sal_uInt16 EXC_ID_PRINTHEADERS
Left/right footer default margin in 1/100mm.
Definition: xlpage.hxx:63
const sal_uInt16 EXC_ID_VCENTER
Definition: xlpage.hxx:78
const sal_uInt16 EXC_ID_RIGHTMARGIN
Definition: xlpage.hxx:51
const sal_uInt16 EXC_ID_LEFTMARGIN
Definition: xlpage.hxx:50
const sal_uInt16 EXC_ID_SETUP
Definition: xlpage.hxx:82
const sal_uInt16 EXC_ID_TOPMARGIN
Definition: xlpage.hxx:52
const sal_uInt16 EXC_ID_HEADER
Definition: xlpage.hxx:30
const sal_uInt16 EXC_ID_HORPAGEBREAKS
Definition: xlpage.hxx:46
const sal_uInt16 EXC_ID_VERPAGEBREAKS
Definition: xlpage.hxx:45
const sal_uInt16 EXC_ID_PRINTGRIDLINES
Definition: xlpage.hxx:64
const sal_uInt16 EXC_ID_BOTTOMMARGIN
Definition: xlpage.hxx:53
const sal_uInt16 EXC_ID_HCENTER
Definition: xlpage.hxx:77
const sal_uInt16 EXC_ID_DCONNAME
Definition: xlpivot.hxx:94
const sal_uInt16 EXC_ID_SXPI
Definition: xlpivot.hxx:171
const sal_uInt16 EXC_ID_SXIVD
Definition: xlpivot.hxx:163
const sal_uInt16 EXC_ID_SXVS
Definition: xlpivot.hxx:296
const sal_uInt16 EXC_ID_SXEX
Definition: xlpivot.hxx:309
const sal_uInt16 EXC_ID_SXVDEX
Definition: xlpivot.hxx:330
const sal_uInt16 EXC_ID_SXADDL
Definition: xlpivot.hxx:361
const sal_uInt16 EXC_ID_SXIDSTM
Definition: xlpivot.hxx:272
const sal_uInt16 EXC_ID_SXVD
Definition: xlpivot.hxx:108
const sal_uInt16 EXC_ID_SXVI
Definition: xlpivot.hxx:135
const sal_uInt16 EXC_ID_DCONREF
Definition: xlpivot.hxx:93
const sal_uInt16 EXC_ID_SXVIEWEX9
Definition: xlpivot.hxx:358
const sal_uInt16 EXC_ID_SXDI
Definition: xlpivot.hxx:175
const sal_uInt16 EXC_ID_SXVIEW
Definition: xlpivot.hxx:98
const sal_uInt16 EXC_ID4_FORMAT
Definition: xlstyle.hxx:66
const sal_uInt16 EXC_ID2_FONT
Definition: xlstyle.hxx:74
const sal_uInt16 EXC_ID_PALETTE
Definition: xlstyle.hxx:200
const sal_uInt16 EXC_ID_EFONT
Both.
Definition: xlstyle.hxx:196
const sal_uInt16 EXC_ID_STYLE
Font auto color (system window text color).
Definition: xlstyle.hxx:220
const sal_uInt16 EXC_ID5_XF
Definition: xlstyle.hxx:135
const sal_uInt16 EXC_ID3_LABEL
Definition: xltable.hxx:48
const sal_uInt16 EXC_ID3_DIMENSIONS
Definition: xltable.hxx:33
const sal_uInt16 EXC_ID3_NUMBER
Definition: xltable.hxx:44
const sal_uInt16 EXC_ID2_LABEL
Definition: xltable.hxx:47
const sal_uInt16 EXC_ID4_FORMULA
Definition: xltable.hxx:62
const sal_uInt16 EXC_ID_SHRFMLA
Definition: xltable.hxx:165
const sal_uInt16 EXC_ID3_ARRAY
Definition: xltable.hxx:101
const sal_uInt16 EXC_ID2_FORMULA
Definition: xltable.hxx:60
const sal_uInt16 EXC_ID_RK
Definition: xltable.hxx:162
const sal_uInt16 EXC_ID3_BOOLERR
Definition: xltable.hxx:54
const sal_uInt16 EXC_ID2_DIMENSIONS
Definition: xltable.hxx:32
const sal_uInt16 EXC_ID3_BLANK
Definition: xltable.hxx:37
const sal_uInt16 EXC_ID3_FORMULA
Definition: xltable.hxx:61
const sal_uInt16 EXC_ID2_NUMBER
Definition: xltable.hxx:43
const sal_uInt16 EXC_ID2_ARRAY
Definition: xltable.hxx:100
const sal_uInt16 EXC_ID2_BOOLERR
Definition: xltable.hxx:53
const sal_uInt16 EXC_ID2_INTEGER
Definition: xltable.hxx:40
const sal_uInt16 EXC_ID2_BLANK
Definition: xltable.hxx:36
#define DBG_ERROR_BIFF()
Definition: xltools.hxx:33
const sal_uInt16 EXC_ID_SCL
Single, top, left, or top-left pane.
Definition: xlview.hxx:78
const sal_uInt16 EXC_ID_WINDOW2
Definition: xlview.hxx:49
const sal_uInt16 EXC_ID_PANE
Default zoom for pagebreak preview.
Definition: xlview.hxx:69
const sal_uInt16 EXC_ID_SELECTION
Definition: xlview.hxx:34
const sal_uInt16 EXC_ID_SHEETEXT
Definition: xlview.hxx:82