1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: read.cxx,v $
10 * $Revision: 1.70.88.4 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_sc.hxx"
36 //------------------------------------------------------------------------
41 #include "document.hxx"
42 #include "scerrors.hxx"
43 #include "fprogressbar.hxx"
44 #include "xltracer.hxx"
45 #include "xltable.hxx"
46 #include "xihelper.hxx"
51 #include "xicontent.hxx"
52 #include "xiescher.hxx"
53 #include "xipivot.hxx"
54 #include "XclImpChangeTrack.hxx"
58 #include "excimp8.hxx"
60 FltError
ImportExcel::Read( void )
62 XclImpPageSettings
& rPageSett
= GetPageSettings();
63 XclImpTabViewSettings
& rTabViewSett
= GetTabViewSettings();
64 XclImpPalette
& rPal
= GetPalette();
65 XclImpFontBuffer
& rFontBfr
= GetFontBuffer();
66 XclImpNumFmtBuffer
& rNumFmtBfr
= GetNumFmtBuffer();
67 XclImpXFBuffer
& rXFBfr
= GetXFBuffer();
68 XclImpNameManager
& rNameMgr
= GetNameManager();
69 XclImpObjectManager
& rObjMgr
= GetObjectManager();
72 Z_BiffNull
, // Nicht in gueltigem Biff-Format
73 Z_Biff2
, // Biff2: nur eine Tabelle
75 Z_Biff3
, // Biff3: nur eine Tabelle
77 Z_Biff4
, // Biff4: nur eine Tabelle
78 Z_Biff4W
, // Biff4 Workbook: Globals
79 Z_Biff4T
, // Biff4 Workbook: eine Tabelle selbst
80 Z_Biff4E
, // Biff4 Workbook: zwischen den Tabellen
82 Z_Biff5WPre
,// Biff5: Prefetch Workbook
83 Z_Biff5W
, // Biff5: Globals
84 Z_Biff5TPre
,// Biff5: Prefetch fuer Shrfmla/Array Formula
85 Z_Biff5T
, // Biff5: eine Tabelle selbst
86 Z_Biff5E
, // Biff5: zwischen den Tabellen
87 Z_Biffn0
, // Alle Biffs: Tabelle bis naechstesss EOF ueberlesen
90 Zustand eAkt
= Z_BiffNull
, ePrev
= Z_BiffNull
;
92 FltError eLastErr
= eERR_OK
;
95 BOOL bBiff4Workbook
= FALSE
;
97 DBG_ASSERT( &aIn
!= NULL
, "-ImportExcel::Read(): Kein Stream - wie dass?!" );
99 ::std::auto_ptr
< ScfSimpleProgressBar
> pProgress( new ScfSimpleProgressBar(
100 aIn
.GetSvStreamSize(), GetDocShell(), STR_LOAD_DOC
) );
102 while( eAkt
!= Z_Ende
)
104 aIn
.StartNextRecord();
105 nOpcode
= aIn
.GetRecId();
109 // #124240# finalize table if EOF is missing
118 rNumFmtBfr
.CreateScFormats();
127 if( eAkt
!= Z_Biff5TPre
&& eAkt
!= Z_Biff5WPre
)
128 pProgress
->ProgressAbs( aIn
.GetSvStreamPos() );
132 // ----------------------------------------------------------------
133 case Z_BiffNull
: // ------------------------------- Z_BiffNull -
142 // #i23425# don't rely on the record ID, but on the detected BIFF version
147 if( pExcRoot
->eDateiTyp
== Biff2
)
155 if( pExcRoot
->eDateiTyp
== Biff3
)
163 if( pExcRoot
->eDateiTyp
== Biff4
)
168 else if( pExcRoot
->eDateiTyp
== Biff4W
)
171 bBiff4Workbook
= TRUE
;
176 if( pExcRoot
->eDateiTyp
== Biff5W
)
182 aIn
.StoreGlobalPosition(); // und Position merken
184 else if( pExcRoot
->eDateiTyp
== Biff5
)
186 // #i62752# possible to have BIFF5 sheet without globals
188 eAkt
= Z_Biff5TPre
; // Shrfmla Prefetch, Row-Prefetch
190 aIn
.StoreGlobalPosition(); // und Position merken
201 // ----------------------------------------------------------------
202 case Z_Biff2
: // ---------------------------------- Z_Biff2 -
206 case EXC_ID2_DIMENSIONS
:
207 case EXC_ID3_DIMENSIONS
: ReadDimensions(); break;
209 case EXC_ID3_BLANK
: ReadBlank(); break;
210 case EXC_ID2_INTEGER
: ReadInteger(); break;
212 case EXC_ID3_NUMBER
: ReadNumber(); break;
214 case EXC_ID3_LABEL
: ReadLabel(); break;
215 case EXC_ID2_BOOLERR
:
216 case EXC_ID3_BOOLERR
: ReadBoolErr(); break;
217 case EXC_ID_RK
: ReadRk(); break;
219 case 0x06: Formula25(); break; // FORMULA [ 2 5]
220 case 0x08: Row25(); break; // ROW [ 2 5]
221 case 0x0A: // EOF [ 2345]
222 rNumFmtBfr
.CreateScFormats();
227 case 0x15: rPageSett
.ReadHeaderFooter( maStrm
); break;
228 case 0x17: Externsheet(); break; // EXTERNSHEET [ 2345]
229 case 0x18: rNameMgr
.ReadName( maStrm
); break;
230 case 0x1C: rObjMgr
.ReadNote( maStrm
); break;
231 case 0x1D: rTabViewSett
.ReadSelection( maStrm
); break;
232 case 0x1E: rNumFmtBfr
.ReadFormat( maStrm
); break;
233 case 0x20: Columndefault(); break; // COLUMNDEFAULT[ 2 ]
234 case 0x21: Array25(); break; // ARRAY [ 2 5]
235 case 0x23: Externname25(); break; // EXTERNNAME [ 2 5]
236 case 0x24: Colwidth(); break; // COLWIDTH [ 2 ]
237 case 0x25: Defrowheight2(); break; // DEFAULTROWHEI[ 2 ]
241 case 0x29: rPageSett
.ReadMargin( maStrm
); break;
242 case 0x2A: rPageSett
.ReadPrintHeaders( maStrm
); break;
243 case 0x2B: rPageSett
.ReadPrintGridLines( maStrm
); break;
244 case 0x2F: // FILEPASS [ 2345]
245 eLastErr
= XclImpDecryptHelper::ReadFilepass( maStrm
);
246 if( eLastErr
!= ERRCODE_NONE
)
249 case EXC_ID2_FONT
: rFontBfr
.ReadFont( maStrm
); break;
250 case EXC_ID_EFONT
: rFontBfr
.ReadEfont( maStrm
); break;
251 case 0x3E: rTabViewSett
.ReadWindow2( maStrm
, false );break;
252 case 0x41: rTabViewSett
.ReadPane( maStrm
); break;
253 case 0x42: Codepage(); break; // CODEPAGE [ 2345]
254 case 0x43: rXFBfr
.ReadXF( maStrm
); break;
255 case 0x44: Ixfe(); break; // IXFE [ 2 ]
259 // ----------------------------------------------------------------
260 case Z_Biff3
: // ---------------------------------- Z_Biff3 -
264 // skip chart substream
268 case EXC_ID5_BOF
: XclTools::SkipSubStream( maStrm
); break;
270 case EXC_ID2_DIMENSIONS
:
271 case EXC_ID3_DIMENSIONS
: ReadDimensions(); break;
273 case EXC_ID3_BLANK
: ReadBlank(); break;
274 case EXC_ID2_INTEGER
: ReadInteger(); break;
276 case EXC_ID3_NUMBER
: ReadNumber(); break;
278 case EXC_ID3_LABEL
: ReadLabel(); break;
279 case EXC_ID2_BOOLERR
:
280 case EXC_ID3_BOOLERR
: ReadBoolErr(); break;
281 case EXC_ID_RK
: ReadRk(); break;
283 case 0x0A: // EOF [ 2345]
284 rNumFmtBfr
.CreateScFormats();
289 case 0x15: rPageSett
.ReadHeaderFooter( maStrm
); break;
290 case 0x17: Externsheet(); break; // EXTERNSHEET [ 2345]
292 case 0x1B: rPageSett
.ReadPageBreaks( maStrm
); break;
293 case 0x1C: rObjMgr
.ReadNote( maStrm
); break;
294 case 0x1D: rTabViewSett
.ReadSelection( maStrm
); break;
295 case 0x1E: rNumFmtBfr
.ReadFormat( maStrm
); break;
296 case 0x22: Rec1904(); break; // 1904 [ 2345]
300 case 0x29: rPageSett
.ReadMargin( maStrm
); break;
301 case 0x2A: rPageSett
.ReadPrintHeaders( maStrm
); break;
302 case 0x2B: rPageSett
.ReadPrintGridLines( maStrm
); break;
303 case 0x2F: // FILEPASS [ 2345]
304 eLastErr
= XclImpDecryptHelper::ReadFilepass( maStrm
);
305 if( eLastErr
!= ERRCODE_NONE
)
308 case EXC_ID_FILESHARING
: ReadFileSharing(); break;
309 case 0x41: rTabViewSett
.ReadPane( maStrm
); break;
310 case 0x42: Codepage(); break; // CODEPAGE [ 2345]
311 case 0x56: Builtinfmtcnt(); break; // BUILTINFMTCNT[ 34 ]
312 case 0x5D: rObjMgr
.ReadObj( maStrm
); break;
313 case 0x7D: Colinfo(); break; // COLINFO [ 345]
314 case 0x8C: Country(); break; // COUNTRY [ 345]
315 case 0x92: rPal
.ReadPalette( maStrm
); break;
316 case 0x0206: Formula3(); break; // FORMULA [ 3 ]
317 case 0x0208: Row34(); break; // ROW [ 34 ]
318 case 0x0218: rNameMgr
.ReadName( maStrm
); break;
319 case 0x0221: Array34(); break; // ARRAY [ 34 ]
320 case 0x0223: Externname34(); break; // EXTERNNAME [ 34 ]
321 case 0x0225: Defrowheight345();break;//DEFAULTROWHEI[ 345]
322 case 0x0231: rFontBfr
.ReadFont( maStrm
); break;
323 case 0x023E: rTabViewSett
.ReadWindow2( maStrm
, false );break;
324 case 0x0243: rXFBfr
.ReadXF( maStrm
); break;
325 case 0x0293: rXFBfr
.ReadStyle( maStrm
); break;
329 // ----------------------------------------------------------------
330 case Z_Biff4
: // ---------------------------------- Z_Biff4 -
334 // skip chart substream
338 case EXC_ID5_BOF
: XclTools::SkipSubStream( maStrm
); break;
340 case EXC_ID2_DIMENSIONS
:
341 case EXC_ID3_DIMENSIONS
: ReadDimensions(); break;
343 case EXC_ID3_BLANK
: ReadBlank(); break;
344 case EXC_ID2_INTEGER
: ReadInteger(); break;
346 case EXC_ID3_NUMBER
: ReadNumber(); break;
348 case EXC_ID3_LABEL
: ReadLabel(); break;
349 case EXC_ID2_BOOLERR
:
350 case EXC_ID3_BOOLERR
: ReadBoolErr(); break;
351 case EXC_ID_RK
: ReadRk(); break;
353 case 0x0A: // EOF [ 2345]
354 rNumFmtBfr
.CreateScFormats();
358 case 0x12: SheetProtect(); break; // SHEET PROTECTION
360 case 0x15: rPageSett
.ReadHeaderFooter( maStrm
); break;
361 case 0x17: Externsheet(); break; // EXTERNSHEET [ 2345]
363 case 0x1B: rPageSett
.ReadPageBreaks( maStrm
); break;
364 case 0x1C: rObjMgr
.ReadNote( maStrm
); break;
365 case 0x1D: rTabViewSett
.ReadSelection( maStrm
); break;
366 case 0x22: Rec1904(); break; // 1904 [ 2345]
370 case 0x29: rPageSett
.ReadMargin( maStrm
); break;
371 case 0x2A: rPageSett
.ReadPrintHeaders( maStrm
); break;
372 case 0x2B: rPageSett
.ReadPrintGridLines( maStrm
); break;
373 case 0x2F: // FILEPASS [ 2345]
374 eLastErr
= XclImpDecryptHelper::ReadFilepass( maStrm
);
375 if( eLastErr
!= ERRCODE_NONE
)
378 case EXC_ID_FILESHARING
: ReadFileSharing(); break;
379 case 0x41: rTabViewSett
.ReadPane( maStrm
); break;
380 case 0x42: Codepage(); break; // CODEPAGE [ 2345]
381 case 0x55: DefColWidth(); break;
382 case 0x56: Builtinfmtcnt(); break; // BUILTINFMTCNT[ 34 ]
383 case 0x5D: rObjMgr
.ReadObj( maStrm
); break;
384 case 0x7D: Colinfo(); break; // COLINFO [ 345]
385 case 0x8C: Country(); break; // COUNTRY [ 345]
386 case 0x92: rPal
.ReadPalette( maStrm
); break;
387 case 0x99: Standardwidth(); break; // STANDARDWIDTH[ 45]
388 case 0xA1: rPageSett
.ReadSetup( maStrm
); break;
389 case 0x0208: Row34(); break; // ROW [ 34 ]
390 case 0x0218: rNameMgr
.ReadName( maStrm
); break;
391 case 0x0221: Array34(); break; // ARRAY [ 34 ]
392 case 0x0223: Externname34(); break; // EXTERNNAME [ 34 ]
393 case 0x0225: Defrowheight345();break;//DEFAULTROWHEI[ 345]
394 case 0x0231: rFontBfr
.ReadFont( maStrm
); break;
395 case 0x023E: rTabViewSett
.ReadWindow2( maStrm
, false );break;
396 case 0x0406: Formula4(); break; // FORMULA [ 4 ]
397 case 0x041E: rNumFmtBfr
.ReadFormat( maStrm
); break;
398 case 0x0443: rXFBfr
.ReadXF( maStrm
); break;
399 case 0x0293: rXFBfr
.ReadStyle( maStrm
); break;
403 // ----------------------------------------------------------------
404 case Z_Biff4W
: // --------------------------------- Z_Biff4W -
408 case 0x0A: // EOF [ 2345]
411 case 0x12: DocProtect(); break; // PROTECT [ 5]
412 case 0x2F: // FILEPASS [ 2345]
413 eLastErr
= XclImpDecryptHelper::ReadFilepass( maStrm
);
414 if( eLastErr
!= ERRCODE_NONE
)
417 case EXC_ID_FILESHARING
: ReadFileSharing(); break;
418 case 0x17: Externsheet(); break; // EXTERNSHEET [ 2345]
419 case 0x42: Codepage(); break; // CODEPAGE [ 2345]
420 case 0x55: DefColWidth(); break;
421 case 0x56: Builtinfmtcnt(); break; // BUILTINFMTCNT[ 34 ]
422 case 0x8C: Country(); break; // COUNTRY [ 345]
423 case 0x8F: Bundleheader(); break; // BUNDLEHEADER [ 4 ]
424 case 0x92: rPal
.ReadPalette( maStrm
); break;
425 case 0x99: Standardwidth(); break; // STANDARDWIDTH[ 45]
426 case 0x0218: rNameMgr
.ReadName( maStrm
); break;
427 case 0x0223: Externname34(); break; // EXTERNNAME [ 34 ]
428 case 0x0225: Defrowheight345();break;//DEFAULTROWHEI[ 345]
429 case 0x0231: rFontBfr
.ReadFont( maStrm
); break;
430 case 0x0409: // BOF [ 4 ]
432 if( pExcRoot
->eDateiTyp
== Biff4
)
440 case 0x041E: rNumFmtBfr
.ReadFormat( maStrm
); break;
441 case 0x0443: rXFBfr
.ReadXF( maStrm
); break;
442 case 0x0293: rXFBfr
.ReadStyle( maStrm
); break;
447 // ----------------------------------------------------------------
448 case Z_Biff4T
: // --------------------------------- Z_Biff4T -
452 // skip chart substream
456 case EXC_ID5_BOF
: XclTools::SkipSubStream( maStrm
); break;
458 case EXC_ID2_DIMENSIONS
:
459 case EXC_ID3_DIMENSIONS
: ReadDimensions(); break;
461 case EXC_ID3_BLANK
: ReadBlank(); break;
462 case EXC_ID2_INTEGER
: ReadInteger(); break;
464 case EXC_ID3_NUMBER
: ReadNumber(); break;
466 case EXC_ID3_LABEL
: ReadLabel(); break;
467 case EXC_ID2_BOOLERR
:
468 case EXC_ID3_BOOLERR
: ReadBoolErr(); break;
469 case EXC_ID_RK
: ReadRk(); break;
471 case 0x0A: // EOF [ 2345]
475 case 0x12: SheetProtect(); break; // SHEET PROTECTION
477 case 0x15: rPageSett
.ReadHeaderFooter( maStrm
); break;
479 case 0x1B: rPageSett
.ReadPageBreaks( maStrm
); break;
480 case 0x1C: rObjMgr
.ReadNote( maStrm
); break;
481 case 0x1D: rTabViewSett
.ReadSelection( maStrm
); break;
482 case 0x2F: // FILEPASS [ 2345]
483 eLastErr
= XclImpDecryptHelper::ReadFilepass( maStrm
);
484 if( eLastErr
!= ERRCODE_NONE
)
487 case 0x41: rTabViewSett
.ReadPane( maStrm
); break;
488 case 0x42: Codepage(); break; // CODEPAGE [ 2345]
489 case 0x55: DefColWidth(); break;
490 case 0x56: Builtinfmtcnt(); break; // BUILTINFMTCNT[ 34 ]
491 case 0x5D: rObjMgr
.ReadObj( maStrm
); break;
492 case 0x7D: Colinfo(); break; // COLINFO [ 345]
493 case 0x8C: Country(); break; // COUNTRY [ 345]
494 case 0x8F: Bundleheader(); break; // BUNDLEHEADER [ 4 ]
495 case 0x92: rPal
.ReadPalette( maStrm
); break;
496 case 0x99: Standardwidth(); break; // STANDARDWIDTH[ 45]
497 case 0xA1: rPageSett
.ReadSetup( maStrm
); break;
498 case 0x0208: Row34(); break; // ROW [ 34 ]
499 case 0x0218: rNameMgr
.ReadName( maStrm
); break;
500 case 0x0221: Array34(); break;
501 case 0x0225: Defrowheight345();break;//DEFAULTROWHEI[ 345]
502 case 0x0231: rFontBfr
.ReadFont( maStrm
); break;
503 case 0x023E: rTabViewSett
.ReadWindow2( maStrm
, false );break;
504 case 0x0406: Formula4(); break;
505 case 0x041E: rNumFmtBfr
.ReadFormat( maStrm
); break;
506 case 0x0443: rXFBfr
.ReadXF( maStrm
); break;
507 case 0x0293: rXFBfr
.ReadStyle( maStrm
); break;
512 // ----------------------------------------------------------------
513 case Z_Biff4E
: // --------------------------------- Z_Biff4E -
517 case 0x0A: // EOF [ 2345]
520 case 0x8F: break; // BUNDLEHEADER [ 4 ]
521 case 0x0409: // BOF [ 4 ]
524 if( pExcRoot
->eDateiTyp
== Biff4
)
538 case Z_Biff5WPre
: // ------------------------------ Z_Biff5WPre -
542 case 0x0A: // EOF [ 2345]
544 aIn
.SeekGlobalPosition(); // und zurueck an alte Position
546 case 0x12: DocProtect(); break; // PROTECT [ 5]
547 case 0x2F: // FILEPASS [ 2345]
548 eLastErr
= XclImpDecryptHelper::ReadFilepass( maStrm
);
549 if( eLastErr
!= ERRCODE_NONE
)
552 case EXC_ID_FILESHARING
: ReadFileSharing(); break;
553 case 0x3D: Window1(); break;
554 case 0x42: Codepage(); break; // CODEPAGE [ 2345]
555 case 0x85: Boundsheet(); break; // BOUNDSHEET [ 5]
556 case 0x8C: Country(); break; // COUNTRY [ 345]
557 // PALETTE follows XFs, but already needed while reading the XFs
558 case 0x92: rPal
.ReadPalette( maStrm
); break;
562 case Z_Biff5W
: // --------------------------------- Z_Biff5W -
566 case 0x0A: // EOF [ 2345]
567 rNumFmtBfr
.CreateScFormats();
568 rXFBfr
.CreateUserStyles();
571 case 0x18: rNameMgr
.ReadName( maStrm
); break;
572 case 0x1E: rNumFmtBfr
.ReadFormat( maStrm
); break;
573 case 0x22: Rec1904(); break; // 1904 [ 2345]
574 case 0x31: rFontBfr
.ReadFont( maStrm
); break;
575 case 0x56: Builtinfmtcnt(); break; // BUILTINFMTCNT[ 34 ]
576 case 0x8D: Hideobj(); break; // HIDEOBJ [ 345]
577 case 0xDE: Olesize(); break;
578 case 0xE0: rXFBfr
.ReadXF( maStrm
); break;
579 case 0x0293: rXFBfr
.ReadStyle( maStrm
); break;
580 case 0x041E: rNumFmtBfr
.ReadFormat( maStrm
); break;
585 // ----------------------------------------------------------------
586 case Z_Biff5TPre
: // ------------------------------- Z_Biff5Pre -
588 if( nOpcode
== 0x0809 )
590 else if( (nOpcode
== 0x000A) && nBofLevel
)
592 else if( !nBofLevel
) // don't read chart records
596 case EXC_ID2_DIMENSIONS
:
597 case EXC_ID3_DIMENSIONS
: ReadDimensions(); break;
598 case 0x08: Row25(); break; // ROW [ 2 5]
599 case 0x0A: // EOF [ 2345]
601 aIn
.SeekGlobalPosition(); // und zurueck an alte Position
603 case 0x12: SheetProtect(); break; // SHEET PROTECTION
605 case 0x1B: rPageSett
.ReadPageBreaks( maStrm
); break;
606 case 0x1D: rTabViewSett
.ReadSelection( maStrm
); break;
607 case 0x17: Externsheet(); break; // EXTERNSHEET [ 2345]
608 case 0x21: Array25(); break; // ARRAY [ 2 5]
609 case 0x23: Externname25(); break; // EXTERNNAME [ 2 5]
610 case 0x41: rTabViewSett
.ReadPane( maStrm
); break;
611 case 0x42: Codepage(); break; // CODEPAGE [ 2345]
612 case 0x55: DefColWidth(); break;
613 case 0x7D: Colinfo(); break; // COLINFO [ 345]
614 case 0x81: Wsbool(); break; // WSBOOL [ 2345]
615 case 0x8C: Country(); break; // COUNTRY [ 345]
616 case 0x99: Standardwidth(); break; // STANDARDWIDTH[ 45]
617 case 0x0208: Row34(); break; // ROW [ 34 ]
618 case 0x0221: Array34(); break; // ARRAY [ 34 ]
619 case 0x0223: Externname34(); break; // EXTERNNAME [ 34 ]
620 case 0x0225: Defrowheight345();break;//DEFAULTROWHEI[ 345]
621 case 0x023E: rTabViewSett
.ReadWindow2( maStrm
, false );break;
622 case 0x04BC: Shrfmla(); break; // SHRFMLA [ 5]
627 // ----------------------------------------------------------------
628 case Z_Biff5T
: // --------------------------------- Z_Biff5T -
633 case EXC_ID3_BLANK
: ReadBlank(); break;
634 case EXC_ID2_INTEGER
: ReadInteger(); break;
636 case EXC_ID3_NUMBER
: ReadNumber(); break;
638 case EXC_ID3_LABEL
: ReadLabel(); break;
639 case EXC_ID2_BOOLERR
:
640 case EXC_ID3_BOOLERR
: ReadBoolErr(); break;
641 case EXC_ID_RK
: ReadRk(); break;
645 case 0x0406: Formula25(); break;
646 case 0x0A: Eof(); eAkt
= Z_Biff5E
; break;
648 case 0x15: rPageSett
.ReadHeaderFooter( maStrm
); break;
649 case 0x17: Externsheet(); break; // EXTERNSHEET [ 2345]
650 case 0x1C: rObjMgr
.ReadNote( maStrm
); break;
651 case 0x1D: rTabViewSett
.ReadSelection( maStrm
); break;
652 case 0x23: Externname25(); break; // EXTERNNAME [ 2 5]
656 case 0x29: rPageSett
.ReadMargin( maStrm
); break;
657 case 0x2A: rPageSett
.ReadPrintHeaders( maStrm
); break;
658 case 0x2B: rPageSett
.ReadPrintGridLines( maStrm
); break;
659 case 0x2F: // FILEPASS [ 2345]
660 eLastErr
= XclImpDecryptHelper::ReadFilepass( maStrm
);
661 if( eLastErr
!= ERRCODE_NONE
)
664 case 0x5D: rObjMgr
.ReadObj( maStrm
); break;
666 case 0x84: rPageSett
.ReadCenter( maStrm
); break;
667 case 0xA0: rTabViewSett
.ReadScl( maStrm
); break;
668 case 0xA1: rPageSett
.ReadSetup( maStrm
); break;
669 case 0xBD: Mulrk(); break; // MULRK [ 5]
670 case 0xBE: Mulblank(); break; // MULBLANK [ 5]
671 case 0xD6: Rstring(); break; // RSTRING [ 5]
672 case 0x00E5: Cellmerging(); break; // #i62300#
673 case 0x0236: TableOp(); break; // TABLE [ 5]
674 case 0x0809: // BOF [ 5]
675 XclTools::SkipSubStream( maStrm
);
681 // ----------------------------------------------------------------
682 case Z_Biff5E
: // --------------------------------- Z_Biff5E -
686 case 0x0809: // BOF [ 5]
689 switch( pExcRoot
->eDateiTyp
)
693 eAkt
= Z_Biff5TPre
; // Shrfmla Prefetch, Row-Prefetch
695 aIn
.StoreGlobalPosition(); // und Position merken
697 case Biff5C
: // chart sheet
698 GetObjectManager().ReadTabChart( maStrm
);
700 GetTracer().TraceChartOnlySheet();
704 pD
->SetVisible( GetCurrScTab(), FALSE
);
708 DBG_ASSERT( pExcRoot
->eDateiTyp
!= Biff5W
,
709 "+ImportExcel::Read(): Doppel-Whopper-Workbook!" );
716 case Z_Biffn0
: // --------------------------------- Z_Biffn0 -
720 case 0x0A: // EOF [ 2345]
728 // ----------------------------------------------------------------
729 case Z_Ende
: // ----------------------------------- Z_Ende -
730 DBG_ERROR( "*ImportExcel::Read(): Not possible state!" );
732 default: DBG_ERROR( "-ImportExcel::Read(): Zustand vergessen!" );
736 if( eLastErr
== eERR_OK
)
745 const XclImpAddressConverter
& rAddrConv
= GetAddressConverter();
746 if( rAddrConv
.IsTabTruncated() )
747 eLastErr
= SCWARN_IMPORT_SHEET_OVERFLOW
;
748 else if( bTabTruncated
|| rAddrConv
.IsRowTruncated() )
749 eLastErr
= SCWARN_IMPORT_ROW_OVERFLOW
;
750 else if( rAddrConv
.IsColTruncated() )
751 eLastErr
= SCWARN_IMPORT_COLUMN_OVERFLOW
;
758 //___________________________________________________________________
760 FltError
ImportExcel8::Read( void )
764 Biff8RecDumper
aDumper( GetRoot(), TRUE
);
765 if( aDumper
.Dump( aIn
) )
766 return ERRCODE_ABORT
;
769 // read the entire BIFF8 stream
770 // don't look too close - this stuff seriously needs to be reworked
772 XclImpPageSettings
& rPageSett
= GetPageSettings();
773 XclImpTabViewSettings
& rTabViewSett
= GetTabViewSettings();
774 XclImpPalette
& rPal
= GetPalette();
775 XclImpFontBuffer
& rFontBfr
= GetFontBuffer();
776 XclImpNumFmtBuffer
& rNumFmtBfr
= GetNumFmtBuffer();
777 XclImpXFBuffer
& rXFBfr
= GetXFBuffer();
778 XclImpSst
& rSst
= GetSst();
779 XclImpTabInfo
& rTabInfo
= GetTabInfo();
780 XclImpNameManager
& rNameMgr
= GetNameManager();
781 XclImpLinkManager
& rLinkMgr
= GetLinkManager();
782 XclImpObjectManager
& rObjMgr
= GetObjectManager();
783 XclImpCondFormatManager
& rCondFmtMgr
= GetCondFormatManager();
784 XclImpPivotTableManager
& rPTableMgr
= GetPivotTableManager();
785 XclImpWebQueryBuffer
& rWQBfr
= GetWebQueryBuffer();
787 bool bInUserView
= false; // true = In USERSVIEW(BEGIN|END) record block.
791 EXC_STATE_BEFORE_GLOBALS
, /// Before workbook globals (wait for initial BOF).
792 EXC_STATE_GLOBALS_PRE
, /// Prefetch for workbook globals.
793 EXC_STATE_GLOBALS
, /// Workbook globals.
794 EXC_STATE_BEFORE_SHEET
, /// Before worksheet (wait for new worksheet BOF).
795 EXC_STATE_SHEET_PRE
, /// Prefetch for worksheet.
796 EXC_STATE_SHEET
, /// Worksheet.
797 EXC_STATE_END
/// Stop reading.
800 XclImpReadState eAkt
= EXC_STATE_BEFORE_GLOBALS
;
802 FltError eLastErr
= eERR_OK
;
804 ::std::auto_ptr
< ScfSimpleProgressBar
> pProgress( new ScfSimpleProgressBar(
805 aIn
.GetSvStreamSize(), GetDocShell(), STR_LOAD_DOC
) );
807 bool bSheetHasCodeName
= false;
809 std::vector
< String
> CodeNames
;
811 std::vector
< SCTAB
> nTabsWithNoCodeName
;
813 while( eAkt
!= EXC_STATE_END
)
815 aIn
.StartNextRecord();
818 // #124240# #i63591# finalize table if EOF is missing
821 case EXC_STATE_SHEET_PRE
:
822 eAkt
= EXC_STATE_SHEET
;
823 aIn
.SeekGlobalPosition();
824 continue; // next iteration in while loop
825 // break; // unxsols warning: statement unreachable
826 case EXC_STATE_SHEET
:
828 eAkt
= EXC_STATE_END
;
831 eAkt
= EXC_STATE_END
;
835 if( eAkt
== EXC_STATE_END
)
838 if( eAkt
!= EXC_STATE_SHEET_PRE
&& eAkt
!= EXC_STATE_GLOBALS_PRE
)
839 pProgress
->ProgressAbs( aIn
.GetSvStreamPos() );
841 sal_uInt16 nRecId
= aIn
.GetRecId();
843 /* #i39464# Ignore records between USERSVIEWBEGIN and USERSVIEWEND
844 completely (user specific view settings). Otherwise view settings
845 and filters are loaded multiple times, which at least causes
846 problems in auto-filters. */
849 case EXC_ID_USERSVIEWBEGIN
:
850 DBG_ASSERT( !bInUserView
, "ImportExcel8::Read - nested user view settings" );
853 case EXC_ID_USERSVIEWEND
:
854 DBG_ASSERT( bInUserView
, "ImportExcel8::Read - not in user view settings" );
859 if( !bInUserView
) switch( eAkt
)
861 // ----------------------------------------------------------------
862 // before workbook globals: wait for initial workbook globals BOF
863 case EXC_STATE_BEFORE_GLOBALS
:
865 if( nRecId
== EXC_ID5_BOF
)
867 DBG_ASSERT( GetBiff() == EXC_BIFF8
, "ImportExcel8::Read - wrong BIFF version" );
869 if( pExcRoot
->eDateiTyp
== Biff8W
)
871 eAkt
= EXC_STATE_GLOBALS_PRE
;
872 maStrm
.StoreGlobalPosition();
875 else if( pExcRoot
->eDateiTyp
== Biff8
)
877 // #i62752# possible to have BIFF8 sheet without globals
879 eAkt
= EXC_STATE_SHEET_PRE
; // Shrfmla Prefetch, Row-Prefetch
880 bSheetHasCodeName
= false; // reset
881 aIn
.StoreGlobalPosition();
887 // ----------------------------------------------------------------
888 // prefetch for workbook globals
889 case EXC_STATE_GLOBALS_PRE
:
895 /* #i56376# evil hack: if EOF for globals is missing,
896 simulate it. This hack works only for the bugdoc
897 given in the issue, where the sheet substreams
898 start directly after the EXTSST record. A future
899 implementation should be more robust against
901 if( (nRecId
== EXC_ID_EOF
) ||
902 ((nRecId
== EXC_ID_EXTSST
) && (maStrm
.GetNextRecId() == EXC_ID5_BOF
)) )
904 eAkt
= EXC_STATE_GLOBALS
;
905 aIn
.SeekGlobalPosition();
908 case 0x12: DocProtect(); break; // PROTECT [ 5678]
909 case 0x13: DocPasssword(); break;
910 case 0x19: WinProtection(); break;
911 case 0x2F: // FILEPASS [ 2345 ]
912 eLastErr
= XclImpDecryptHelper::ReadFilepass( maStrm
);
913 if( eLastErr
!= ERRCODE_NONE
)
914 eAkt
= EXC_STATE_END
;
916 case EXC_ID_FILESHARING
: ReadFileSharing(); break;
917 case 0x3D: Window1(); break;
918 case 0x42: Codepage(); break; // CODEPAGE [ 2345 ]
919 case 0x85: Boundsheet(); break; // BOUNDSHEET [ 5 ]
920 case 0x8C: Country(); break; // COUNTRY [ 345 ]
922 // PALETTE follows XFs, but already needed while reading the XFs
923 case EXC_ID_PALETTE
: rPal
.ReadPalette( maStrm
); break;
928 // ----------------------------------------------------------------
930 case EXC_STATE_GLOBALS
:
936 /* #i56376# evil hack: if EOF for globals is missing,
937 simulate it. This hack works only for the bugdoc
938 given in the issue, where the sheet substreams
939 start directly after the EXTSST record. A future
940 implementation should be more robust against
942 if( (nRecId
== EXC_ID_EOF
) ||
943 ((nRecId
== EXC_ID_EXTSST
) && (maStrm
.GetNextRecId() == EXC_ID5_BOF
)) )
945 rNumFmtBfr
.CreateScFormats();
946 rXFBfr
.CreateUserStyles();
947 rPTableMgr
.ReadPivotCaches( maStrm
);
948 eAkt
= EXC_STATE_BEFORE_SHEET
;
951 case 0x0E: Precision(); break; // PRECISION
952 case 0x22: Rec1904(); break; // 1904 [ 2345 ]
953 case 0x56: Builtinfmtcnt(); break; // BUILTINFMTCNT[ 34 ]
954 case 0x8D: Hideobj(); break; // HIDEOBJ [ 345 ]
955 case 0xD3: /*ReadBasic()*/bHasBasic
= true; break;
956 // case 0xD3: ReadBasic(); break;
957 case 0xDE: Olesize(); break;
958 case 0x01BA: Codename( TRUE
); break;
960 case EXC_ID_USESELFS
: ReadUsesElfs(); break;
962 case EXC_ID2_FONT
: rFontBfr
.ReadFont( maStrm
); break;
963 case EXC_ID4_FORMAT
: rNumFmtBfr
.ReadFormat( maStrm
); break;
964 case EXC_ID5_XF
: rXFBfr
.ReadXF( maStrm
); break;
965 case EXC_ID_STYLE
: rXFBfr
.ReadStyle( maStrm
); break;
967 case EXC_ID_SST
: rSst
.ReadSst( maStrm
); break;
968 case EXC_ID_TABID
: rTabInfo
.ReadTabid( maStrm
); break;
969 case EXC_ID_NAME
: rNameMgr
.ReadName( maStrm
); break;
971 case EXC_ID_EXTERNSHEET
: rLinkMgr
.ReadExternsheet( maStrm
); break;
972 case EXC_ID_SUPBOOK
: rLinkMgr
.ReadSupbook( maStrm
); break;
973 case EXC_ID_XCT
: rLinkMgr
.ReadXct( maStrm
); break;
974 case EXC_ID_CRN
: rLinkMgr
.ReadCrn( maStrm
); break;
975 case EXC_ID_EXTERNNAME
: rLinkMgr
.ReadExternname( maStrm
, pFormConv
); break;
977 case EXC_ID_MSODRAWINGGROUP
:rObjMgr
.ReadMsoDrawingGroup( maStrm
); break;
979 case EXC_ID_SXIDSTM
: rPTableMgr
.ReadSxidstm( maStrm
); break;
980 case EXC_ID_SXVS
: rPTableMgr
.ReadSxvs( maStrm
); break;
981 case EXC_ID_DCONREF
: rPTableMgr
.ReadDconref( maStrm
); break;
987 // ----------------------------------------------------------------
988 // before worksheet: wait for new worksheet BOF
989 case EXC_STATE_BEFORE_SHEET
:
991 if( nRecId
== EXC_ID5_BOF
)
993 // #94191# import only 256 sheets
994 if( GetCurrScTab() > GetScMaxPos().Tab() )
996 XclTools::SkipSubStream( maStrm
);
997 // #i29930# show warning box
998 GetAddressConverter().CheckScTab( GetCurrScTab(), true );
999 eAkt
= EXC_STATE_END
;
1005 switch( pExcRoot
->eDateiTyp
)
1007 case Biff8
: // worksheet
1008 case Biff8M4
: // macro sheet
1009 eAkt
= EXC_STATE_SHEET_PRE
; // Shrfmla Prefetch, Row-Prefetch
1010 aIn
.StoreGlobalPosition();
1012 case Biff8C
: // chart sheet
1013 rObjMgr
.ReadTabChart( maStrm
);
1015 GetTracer().TraceChartOnlySheet();
1017 case Biff8W
: // workbook
1018 DBG_ERRORFILE( "ImportExcel8::Read - double workbook globals" );
1020 case Biff8V
: // VB module
1022 // TODO: do not create a sheet in the Calc document
1023 pD
->SetVisible( GetCurrScTab(), FALSE
);
1024 XclTools::SkipSubStream( maStrm
);
1032 // ----------------------------------------------------------------
1033 // prefetch for worksheet
1034 case EXC_STATE_SHEET_PRE
:
1038 // skip chart substream
1042 case EXC_ID5_BOF
: XclTools::SkipSubStream( maStrm
); break;
1044 case EXC_ID_WINDOW2
: rTabViewSett
.ReadWindow2( maStrm
, false );break;
1045 case EXC_ID_SCL
: rTabViewSett
.ReadScl( maStrm
); break;
1046 case EXC_ID_PANE
: rTabViewSett
.ReadPane( maStrm
); break;
1047 case EXC_ID_SELECTION
: rTabViewSett
.ReadSelection( maStrm
); break;
1049 case EXC_ID2_DIMENSIONS
:
1050 case EXC_ID3_DIMENSIONS
: ReadDimensions(); break;
1052 case 0x0A: // EOF [ 2345 ]
1054 eAkt
= EXC_STATE_SHEET
;
1056 GetDoc().GetName( GetCurrScTab(), sName
);
1057 if ( !bSheetHasCodeName
)
1059 nTabsWithNoCodeName
.push_back( GetCurrScTab() );
1060 OSL_TRACE("No Codename for %d", GetCurrScTab() );
1065 GetDoc().GetCodeName( GetCurrScTab(), sCodeName
);
1066 OSL_TRACE("Have CodeName %s for SheetName %s",
1067 rtl::OUStringToOString( sCodeName
, RTL_TEXTENCODING_UTF8
).getStr(), rtl::OUStringToOString( sName
, RTL_TEXTENCODING_UTF8
).getStr() );
1068 CodeNames
.push_back( sCodeName
);
1071 bSheetHasCodeName
= false; // reset
1074 aIn
.SeekGlobalPosition(); // und zurueck an alte Position
1077 case 0x12: SheetProtect(); break;
1078 case 0x13: SheetPassword(); break;
1079 case 0x42: Codepage(); break; // CODEPAGE [ 2345 ]
1080 case 0x55: DefColWidth(); break;
1081 case 0x7D: Colinfo(); break; // COLINFO [ 345 ]
1082 case 0x81: Wsbool(); break; // WSBOOL [ 2345 ]
1083 case 0x8C: Country(); break; // COUNTRY [ 345 ]
1084 case 0x99: Standardwidth(); break; // STANDARDWIDTH[ 45 ]
1085 case 0x9B: FilterMode(); break; // FILTERMODE
1086 case 0x9D: AutoFilterInfo(); break;// AUTOFILTERINFO
1087 case 0x9E: AutoFilter(); break; // AUTOFILTER
1088 case 0x01BA: Codename( FALSE
); bSheetHasCodeName
= true; break;
1089 case 0x0208: Row34(); break; // ROW [ 34 ]
1091 case 0x0221: Array34(); break; // ARRAY [ 34 ]
1092 case 0x0225: Defrowheight345();break;//DEFAULTROWHEI[ 345 ]
1093 case 0x04BC: Shrfmla(); break; // SHRFMLA [ 5 ]
1094 case 0x0867: SheetProtection(); break; // SHEETPROTECTION
1099 // ----------------------------------------------------------------
1101 case EXC_STATE_SHEET
:
1105 // skip unknown substreams
1109 case EXC_ID5_BOF
: XclTools::SkipSubStream( maStrm
); break;
1111 case EXC_ID_EOF
: Eof(); eAkt
= EXC_STATE_BEFORE_SHEET
; break;
1114 case EXC_ID3_BLANK
: ReadBlank(); break;
1115 case EXC_ID2_INTEGER
: ReadInteger(); break;
1116 case EXC_ID2_NUMBER
:
1117 case EXC_ID3_NUMBER
: ReadNumber(); break;
1119 case EXC_ID3_LABEL
: ReadLabel(); break;
1120 case EXC_ID2_BOOLERR
:
1121 case EXC_ID3_BOOLERR
: ReadBoolErr(); break;
1122 case EXC_ID_RK
: ReadRk(); break;
1126 case 0x0406: Formula25(); break; // FORMULA [ 2 5 ]
1127 case 0x000C: Calccount(); break; // CALCCOUNT
1128 case 0x0010: Delta(); break; // DELTA
1129 case 0x0011: Iteration(); break; // ITERATION
1131 case 0x00AE: Scenman(); break; // SCENMAN
1132 case 0x00AF: Scenario(); break; // SCENARIO
1133 case 0x00BD: Mulrk(); break; // MULRK [ 5 ]
1134 case 0x00BE: Mulblank(); break; // MULBLANK [ 5 ]
1135 case 0x00D6: Rstring(); break; // RSTRING [ 5 ]
1136 case 0x00E5: Cellmerging(); break; // CELLMERGING
1137 case 0x00FD: Labelsst(); break; // LABELSST [ 8 ]
1138 case 0x0236: TableOp(); break; // TABLE
1140 case EXC_ID_HORPAGEBREAKS
:
1141 case EXC_ID_VERPAGEBREAKS
: rPageSett
.ReadPageBreaks( maStrm
); break;
1143 case EXC_ID_FOOTER
: rPageSett
.ReadHeaderFooter( maStrm
); break;
1144 case EXC_ID_LEFTMARGIN
:
1145 case EXC_ID_RIGHTMARGIN
:
1146 case EXC_ID_TOPMARGIN
:
1147 case EXC_ID_BOTTOMMARGIN
: rPageSett
.ReadMargin( maStrm
); break;
1148 case EXC_ID_PRINTHEADERS
: rPageSett
.ReadPrintHeaders( maStrm
); break;
1149 case EXC_ID_PRINTGRIDLINES
: rPageSett
.ReadPrintGridLines( maStrm
); break;
1150 case EXC_ID_HCENTER
:
1151 case EXC_ID_VCENTER
: rPageSett
.ReadCenter( maStrm
); break;
1152 case EXC_ID_SETUP
: rPageSett
.ReadSetup( maStrm
); break;
1153 case EXC_ID8_IMGDATA
: rPageSett
.ReadImgData( maStrm
); break;
1155 case EXC_ID_MSODRAWING
: rObjMgr
.ReadMsoDrawing( maStrm
); break;
1156 // #i61786# weird documents: OBJ without MSODRAWING -> read in BIFF5 format
1157 case EXC_ID_OBJ
: rObjMgr
.ReadObj( maStrm
); break;
1158 case EXC_ID_NOTE
: rObjMgr
.ReadNote( maStrm
); break;
1160 case EXC_ID_HLINK
: XclImpHyperlink::ReadHlink( maStrm
); break;
1161 case EXC_ID_LABELRANGES
: XclImpLabelranges::ReadLabelranges( maStrm
); break;
1163 case EXC_ID_CONDFMT
: rCondFmtMgr
.ReadCondfmt( maStrm
); break;
1164 case EXC_ID_CF
: rCondFmtMgr
.ReadCF( maStrm
); break;
1166 case EXC_ID_DVAL
: XclImpValidation::ReadDval( maStrm
); break;
1167 case EXC_ID_DV
: XclImpValidation::ReadDV( maStrm
); break;
1169 case EXC_ID_QSI
: rWQBfr
.ReadQsi( maStrm
); break;
1170 case EXC_ID_WQSTRING
: rWQBfr
.ReadWqstring( maStrm
); break;
1171 case EXC_ID_PQRY
: rWQBfr
.ReadParamqry( maStrm
); break;
1172 case EXC_ID_WQSETT
: rWQBfr
.ReadWqsettings( maStrm
); break;
1173 case EXC_ID_WQTABLES
: rWQBfr
.ReadWqtables( maStrm
); break;
1175 case EXC_ID_SXVIEW
: rPTableMgr
.ReadSxview( maStrm
); break;
1176 case EXC_ID_SXVD
: rPTableMgr
.ReadSxvd( maStrm
); break;
1177 case EXC_ID_SXVI
: rPTableMgr
.ReadSxvi( maStrm
); break;
1178 case EXC_ID_SXIVD
: rPTableMgr
.ReadSxivd( maStrm
); break;
1179 case EXC_ID_SXPI
: rPTableMgr
.ReadSxpi( maStrm
); break;
1180 case EXC_ID_SXDI
: rPTableMgr
.ReadSxdi( maStrm
); break;
1181 case EXC_ID_SXVDEX
: rPTableMgr
.ReadSxvdex( maStrm
); break;
1182 case EXC_ID_SXEX
: rPTableMgr
.ReadSxex( maStrm
); break;
1183 case EXC_ID_SXVIEWEX9
: rPTableMgr
.ReadSxViewEx9( maStrm
); break;
1185 // 0x0862 (SHEETEXT)
1186 case EXC_ID_SHEETEXT
: rTabViewSett
.ReadTabBgColor( maStrm
, rPal
); break;
1191 // ----------------------------------------------------------------
1196 if( eLastErr
== eERR_OK
)
1198 // In some strange circumstances a the codename might be missing
1199 // # Create any missing Sheet CodeNames
1200 std::vector
< SCTAB
>::iterator it_end
= nTabsWithNoCodeName
.end();
1201 for ( std::vector
< SCTAB
>::iterator it
= nTabsWithNoCodeName
.begin(); it
!= it_end
; ++it
)
1203 bool bGotCodeName
= false;
1205 OSL_TRACE("Trying to find suitable codename for %d", *it
);
1208 String
sTmpName( RTL_CONSTASCII_USTRINGPARAM("Sheet" ) );
1209 sTmpName
+= String::CreateFromInt32( sal_Int32(nTab
++) );
1210 std::vector
< String
>::iterator codeName_It
= CodeNames
.begin();
1211 std::vector
< String
>::iterator codeName_It_end
= CodeNames
.end();
1212 // search for codename
1213 for ( ; codeName_It
!= codeName_It_end
; ++codeName_It
)
1215 if ( *codeName_It
== sTmpName
)
1219 if ( codeName_It
== codeName_It_end
) // generated codename not found
1221 OSL_TRACE("Using generated codename %s", rtl::OUStringToOString( sTmpName
, RTL_TEXTENCODING_UTF8
).getStr() );
1223 GetDoc().SetCodeName( *it
, sTmpName
);
1224 // Record newly used codename
1225 CodeNames
.push_back( sTmpName
);
1226 // Record those we have created so they can be created in
1228 AutoGeneratedCodeNames
.push_back( sTmpName
);
1234 // #i45843# Convert pivot tables before calculation, so they are available
1235 // for the GETPIVOTDATA function.
1236 if( GetBiff() == EXC_BIFF8
)
1237 GetPivotTableManager().ConvertPivotTables();
1242 // Excel documents look much better without this call; better in the
1243 // sense that the row heights are identical to the original heights in
1249 pD
->CalcAfterLoad();
1251 // import change tracking data
1252 XclImpChangeTrack
aImpChTr( GetRoot(), maStrm
);
1255 const XclImpAddressConverter
& rAddrConv
= GetAddressConverter();
1256 if( rAddrConv
.IsTabTruncated() )
1257 eLastErr
= SCWARN_IMPORT_SHEET_OVERFLOW
;
1258 else if( bTabTruncated
|| rAddrConv
.IsRowTruncated() )
1259 eLastErr
= SCWARN_IMPORT_ROW_OVERFLOW
;
1260 else if( rAddrConv
.IsColTruncated() )
1261 eLastErr
= SCWARN_IMPORT_COLUMN_OVERFLOW
;
1263 if( GetBiff() == EXC_BIFF8
)
1264 GetPivotTableManager().MaybeRefreshPivotTables();
1270 //___________________________________________________________________