LibreOffice Module sc (master)  1
excdoc.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 <sfx2/objsh.hxx>
21 #include <rtl/ustring.hxx>
22 
23 #include <document.hxx>
24 #include <scextopt.hxx>
25 #include <docoptio.hxx>
26 #include <tabprotection.hxx>
27 #include <postit.hxx>
28 #include <root.hxx>
29 
30 #include <excdoc.hxx>
31 #include <xeextlst.hxx>
32 #include <biffhelper.hxx>
33 
34 #include <xcl97rec.hxx>
35 #include <xetable.hxx>
36 #include <xelink.hxx>
37 #include <xepage.hxx>
38 #include <xeview.hxx>
39 #include <xecontent.hxx>
40 #include <xeescher.hxx>
41 #include <xepivot.hxx>
42 #include <XclExpChangeTrack.hxx>
43 #include <xepivotxml.hxx>
44 #include <xedbdata.hxx>
45 #include <xlcontent.hxx>
46 #include <xlname.hxx>
47 #include <xllink.hxx>
48 #include <xltools.hxx>
49 
50 #include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
51 #include <com/sun/star/frame/XModel.hpp>
52 #include <o3tl/safeint.hxx>
53 #include <oox/token/tokens.hxx>
54 #include <oox/token/namespaces.hxx>
55 #include <memory>
56 
57 using namespace oox;
58 
59 static OUString lcl_GetVbaTabName( SCTAB n )
60 {
61  OUString aRet = "__VBA__" + OUString::number( static_cast<sal_uInt16>(n) );
62  return aRet;
63 }
64 
65 static void lcl_AddBookviews( XclExpRecordList<>& aRecList, const ExcTable& self )
66 {
67  aRecList.AppendNewRecord( new XclExpXmlStartElementRecord( XML_bookViews ) );
68  aRecList.AppendNewRecord( new XclExpWindow1( self.GetRoot() ) );
69  aRecList.AppendNewRecord( new XclExpXmlEndElementRecord( XML_bookViews ) );
70 }
71 
72 static void lcl_AddCalcPr( XclExpRecordList<>& aRecList, const ExcTable& self )
73 {
74  ScDocument& rDoc = self.GetDoc();
75 
76  aRecList.AppendNewRecord( new XclExpXmlStartSingleElementRecord( XML_calcPr ) );
77  // OOXTODO: calcCompleted, calcId, calcMode, calcOnSave,
78  // concurrentCalc, concurrentManualCount,
79  // forceFullCalc, fullCalcOnLoad, fullPrecision
80  aRecList.AppendNewRecord( new XclCalccount( rDoc ) );
81  aRecList.AppendNewRecord( new XclRefmode( rDoc ) );
82  aRecList.AppendNewRecord( new XclIteration( rDoc ) );
83  aRecList.AppendNewRecord( new XclDelta( rDoc ) );
85  aRecList.AppendNewRecord( new XclExpXmlEndSingleElementRecord() ); // XML_calcPr
86 }
87 
88 static void lcl_AddWorkbookProtection( XclExpRecordList<>& aRecList, const ExcTable& self )
89 {
90  aRecList.AppendNewRecord( new XclExpXmlStartSingleElementRecord( XML_workbookProtection ) );
91 
92  const ScDocProtection* pProtect = self.GetDoc().GetDocProtection();
93  if (pProtect && pProtect->isProtected())
94  {
97  aRecList.AppendNewRecord( new XclExpPassHash(pProtect->getPasswordHash(PASSHASH_XL)) );
98  }
99 
100  aRecList.AppendNewRecord( new XclExpXmlEndSingleElementRecord() ); // XML_workbookProtection
101 }
102 
103 static void lcl_AddScenariosAndFilters( XclExpRecordList<>& aRecList, const XclExpRoot& rRoot, SCTAB nScTab )
104 {
105  // Scenarios
106  aRecList.AppendNewRecord( new ExcEScenarioManager( rRoot, nScTab ) );
107  // filter
108  aRecList.AppendRecord( rRoot.GetFilterManager().CreateRecord( nScTab ) );
109 }
110 
112  XclExpRoot( rRoot ),
113  mnScTab( SCTAB_GLOBAL ),
114  nExcTab( EXC_NOTAB ),
115  mxNoteList( new XclExpNoteList )
116 {
117 }
118 
119 ExcTable::ExcTable( const XclExpRoot& rRoot, SCTAB nScTab ) :
120  XclExpRoot( rRoot ),
121  mnScTab( nScTab ),
122  nExcTab( rRoot.GetTabInfo().GetXclTab( nScTab ) ),
123  mxNoteList( new XclExpNoteList )
124 {
125 }
126 
128 {
129 }
130 
132 {
133  OSL_ENSURE( pRec, "-ExcTable::Add(): pRec is NULL!" );
134  aRecList.AppendNewRecord( pRec );
135 }
136 
138 {
140 
141  RootData& rR = GetOldRoot();
142  ScDocument& rDoc = GetDoc();
143  XclExpTabInfo& rTabInfo = GetTabInfo();
144 
145  if ( GetBiff() <= EXC_BIFF5 )
146  Add( new ExcBofW );
147  else
148  Add( new ExcBofW8 );
149 
150  sal_uInt16 nExcTabCount = rTabInfo.GetXclTabCount();
151  sal_uInt16 nCodenames = static_cast< sal_uInt16 >( GetExtDocOptions().GetCodeNameCount() );
152 
153  SfxObjectShell* pShell = GetDocShell();
154  sal_uInt16 nWriteProtHash = pShell ? pShell->GetModifyPasswordHash() : 0;
155  bool bRecommendReadOnly = pShell && pShell->IsLoadReadonly();
156 
157  if( (nWriteProtHash > 0) || bRecommendReadOnly )
159 
160  // TODO: correct codepage for BIFF5?
161  sal_uInt16 nCodePage = XclTools::GetXclCodePage( (GetBiff() <= EXC_BIFF5) ? RTL_TEXTENCODING_MS_1252 : RTL_TEXTENCODING_UNICODE );
162 
163  if( GetBiff() <= EXC_BIFF5 )
164  {
166  Add( new XclExpUInt16Record( EXC_ID_MMS, 0 ) );
170  Add( new ExcDummy_00 );
171  }
172  else
173  {
174  if( IsDocumentEncrypted() )
175  Add( new XclExpFileEncryption( GetRoot() ) );
176  Add( new XclExpInterfaceHdr( nCodePage ) );
177  Add( new XclExpUInt16Record( EXC_ID_MMS, 0 ) );
178  Add( new XclExpInterfaceEnd );
179  Add( new XclExpWriteAccess );
180  }
181 
182  Add( new XclExpFileSharing( GetRoot(), nWriteProtHash, bRecommendReadOnly ) );
183  Add( new XclExpUInt16Record( EXC_ID_CODEPAGE, nCodePage ) );
184 
185  if( GetBiff() == EXC_BIFF8 )
186  {
187  Add( new XclExpBoolRecord( EXC_ID_DSF, false ) );
189  rR.pTabId = new XclExpChTrTabId( std::max( nExcTabCount, nCodenames ) );
190  Add( rR.pTabId );
191  if( HasVbaStorage() )
192  {
193  Add( new XclObproj );
194  const OUString& rCodeName = GetExtDocOptions().GetDocSettings().maGlobCodeName;
195  if( !rCodeName.isEmpty() )
196  Add( new XclCodename( rCodeName ) );
197  }
198  }
199 
201 
202  if ( GetBiff() <= EXC_BIFF5 )
203  {
204  // global link table: EXTERNCOUNT, EXTERNSHEET, NAME
207  }
208 
209  // document protection options
211 
212  if( GetBiff() == EXC_BIFF8 )
213  {
214  Add( new XclExpProt4Rev );
215  Add( new XclExpProt4RevPass );
216  }
217 
218  lcl_AddBookviews( aRecList, *this );
219 
220  Add( new XclExpXmlStartSingleElementRecord( XML_workbookPr ) );
221  if ( GetBiff() == EXC_BIFF8 && GetOutput() != EXC_OUTPUT_BINARY )
222  {
223  Add( new XclExpBoolRecord(0x0040, false, XML_backupFile ) ); // BACKUP
224  Add( new XclExpBoolRecord(0x008D, false, XML_showObjects ) ); // HIDEOBJ
225  }
226 
227  if ( GetBiff() == EXC_BIFF8 )
228  {
229  Add( new XclExpBoolRecord(0x0040, false) ); // BACKUP
230  Add( new XclExpBoolRecord(0x008D, false) ); // HIDEOBJ
231  }
232 
233  if( GetBiff() <= EXC_BIFF5 )
234  {
235  Add( new ExcDummy_040 );
236  Add( new Exc1904( rDoc ) );
237  Add( new ExcDummy_041 );
238  }
239  else
240  {
241  // BIFF8
242  Add( new Exc1904( rDoc ) );
243  Add( new XclExpBoolRecord( 0x000E, !rDoc.GetDocOptions().IsCalcAsShown() ) );
244  Add( new XclExpBoolRecord(0x01B7, false) ); // REFRESHALL
245  Add( new XclExpBoolRecord(0x00DA, false) ); // BOOKBOOL
246  }
247 
248  // Formatting: FONT, FORMAT, XF, STYLE, PALETTE
253 
254  SCTAB nC;
255  SCTAB nScTabCount = rTabInfo.GetScTabCount();
256  if( GetBiff() <= EXC_BIFF5 )
257  {
258  // Bundlesheet
259  for( nC = 0 ; nC < nScTabCount ; nC++ )
260  if( rTabInfo.IsExportTab( nC ) )
261  {
262  ExcBoundsheetList::RecordRefType xBoundsheet = new ExcBundlesheet( rR, nC );
263  aRecList.AppendRecord( xBoundsheet );
264  rBoundsheetList.AppendRecord( xBoundsheet );
265  }
266  }
267  else
268  {
269  // Pivot Cache
271  aRecList.AppendRecord( GetPivotTableManager().CreatePivotCachesRecord() );
272 
273  // Change tracking
274  if( rDoc.GetChangeTrack() )
275  {
277  Add( rR.pUserBViewList );
278  }
279 
280  // Natural Language Formulas Flag
281  aRecList.AppendNewRecord( new XclExpBoolRecord( EXC_ID_USESELFS, GetDoc().GetDocOptions().IsLookUpColRowNames() ) );
282 
283  // Bundlesheet
284  for( nC = 0 ; nC < nScTabCount ; nC++ )
285  if( rTabInfo.IsExportTab( nC ) )
286  {
287  ExcBoundsheetList::RecordRefType xBoundsheet = new ExcBundlesheet8( rR, nC );
288  aRecList.AppendRecord( xBoundsheet );
289  rBoundsheetList.AppendRecord( xBoundsheet );
290  }
291 
292  OUString aTmpString;
293  for( SCTAB nAdd = 0; nC < static_cast<SCTAB>(nCodenames) ; nC++, nAdd++ )
294  {
295  aTmpString = lcl_GetVbaTabName( nAdd );
296  ExcBoundsheetList::RecordRefType xBoundsheet = new ExcBundlesheet8( aTmpString );
297  aRecList.AppendRecord( xBoundsheet );
298  rBoundsheetList.AppendRecord( xBoundsheet );
299  }
300 
301  // COUNTRY - in BIFF8 in workbook globals
302  Add( new XclExpCountry( GetRoot() ) );
303 
304  // link table: SUPBOOK, XCT, CRN, EXTERNNAME, EXTERNSHEET, NAME
307 
308  Add( new XclExpRecalcId );
309 
310  // MSODRAWINGGROUP per-document data
311  aRecList.AppendRecord( GetObjectManager().CreateDrawingGroup() );
312  // Shared string table: SST, EXTSST
314 
315  Add( new XclExpBookExt );
316  }
317 
318  Add( new ExcEof );
319 }
320 
322 {
324 
325  RootData& rR = GetOldRoot();
326  ScDocument& rDoc = GetDoc();
327  XclExpTabInfo& rTabInfo = GetTabInfo();
328 
329  sal_uInt16 nExcTabCount = rTabInfo.GetXclTabCount();
330  sal_uInt16 nCodenames = static_cast< sal_uInt16 >( GetExtDocOptions().GetCodeNameCount() );
331 
332  rR.pTabId = new XclExpChTrTabId( std::max( nExcTabCount, nCodenames ) );
333  Add( rR.pTabId );
334 
335  Add( new XclExpXmlStartSingleElementRecord( XML_workbookPr ) );
336  Add( new XclExpBoolRecord(0x0040, false, XML_backupFile ) ); // BACKUP
337  Add( new XclExpBoolRecord(0x008D, false, XML_showObjects ) ); // HIDEOBJ
338 
339  Add( new Exc1904( rDoc ) );
340  // OOXTODO: The following /workbook/workbookPr attributes are mapped
341  // to various BIFF records that are not currently supported:
342  //
343  // XML_allowRefreshQuery: QSISTAG 802h: fEnableRefresh
344  // XML_autoCompressPictures: COMPRESSPICTURES 89Bh: fAutoCompressPictures
345  // XML_checkCompatibility: COMPAT12 88Ch: fNoCompatChk
346  // XML_codeName: "Calc"
347  // XML_defaultThemeVersion: ???
348  // XML_filterPrivacy: BOOKEXT 863h: fFilterPrivacy
349  // XML_hidePivotFieldList: BOOKBOOL DAh: fHidePivotTableFList
350  // XML_promptedSolutions: BOOKEXT 863h: fBuggedUserAboutSolution
351  // XML_publishItems: NAMEPUBLISH 893h: fPublished
352  // XML_saveExternalLinkValues: BOOKBOOL DAh: fNoSavSupp
353  // XML_showBorderUnselectedTables: BOOKBOOL DAh: fHideBorderUnsels
354  // XML_showInkAnnotation: BOOKEXT 863h: fShowInkAnnotation
355  // XML_showPivotChart: PIVOTCHARTBITS 859h: fGXHide??
356  // XML_updateLinks: BOOKBOOL DAh: grbitUpdateLinks
357  Add( new XclExpXmlEndSingleElementRecord() ); // XML_workbookPr
358 
359  // Formatting: FONT, FORMAT, XF, STYLE, PALETTE
361 
362  // Change tracking
363  if( rDoc.GetChangeTrack() )
364  {
366  Add( rR.pUserBViewList );
367  }
368 
370  lcl_AddBookviews( aRecList, *this );
371 
372  // Bundlesheet
373  SCTAB nC;
374  SCTAB nScTabCount = rTabInfo.GetScTabCount();
376  for( nC = 0 ; nC < nScTabCount ; nC++ )
377  if( rTabInfo.IsExportTab( nC ) )
378  {
379  ExcBoundsheetList::RecordRefType xBoundsheet = new ExcBundlesheet8( rR, nC );
380  aRecList.AppendRecord( xBoundsheet );
381  rBoundsheetList.AppendRecord( xBoundsheet );
382  }
384 
385  OUString aTmpString;
386  for( SCTAB nAdd = 0; nC < static_cast<SCTAB>(nCodenames) ; nC++, nAdd++ )
387  {
388  aTmpString = lcl_GetVbaTabName( nAdd );
389  ExcBoundsheetList::RecordRefType xBoundsheet = new ExcBundlesheet8( aTmpString );
390  aRecList.AppendRecord( xBoundsheet );
391  rBoundsheetList.AppendRecord( xBoundsheet );
392  }
393 
394  // link table: SUPBOOK, XCT, CRN, EXTERNNAME, EXTERNSHEET, NAME
397 
398  lcl_AddCalcPr( aRecList, *this );
399 
400  // MSODRAWINGGROUP per-document data
401  aRecList.AppendRecord( GetObjectManager().CreateDrawingGroup() );
402  // Shared string table: SST, EXTSST
404 }
405 
406 void ExcTable::FillAsTableBinary( SCTAB nCodeNameIdx )
407 {
409 
410  RootData& rR = GetOldRoot();
411  XclBiff eBiff = GetBiff();
412  ScDocument& rDoc = GetDoc();
413 
414  OSL_ENSURE( (mnScTab >= 0) && (mnScTab <= MAXTAB), "-ExcTable::Table(): mnScTab - no ordinary table!" );
415  OSL_ENSURE( nExcTab <= o3tl::make_unsigned(MAXTAB), "-ExcTable::Table(): nExcTab - no ordinary table!" );
416 
417  // create a new OBJ list for this sheet (may be used by notes, autofilter, data validation)
418  if( eBiff == EXC_BIFF8 )
420 
421  // cell table: DEFROWHEIGHT, DEFCOLWIDTH, COLINFO, DIMENSIONS, ROW, cell records
423 
424  //export cell notes
425  std::vector<sc::NoteEntry> aNotes;
426  rDoc.GetAllNoteEntries(aNotes);
427  for (const auto& rNote : aNotes)
428  {
429  if (rNote.maPos.Tab() != mnScTab)
430  continue;
431 
432  mxNoteList->AppendNewRecord(new XclExpNote(GetRoot(), rNote.maPos, rNote.mpNote, OUString()));
433  }
434 
435  // WSBOOL needs data from page settings, create it here, add it later
437  bool bFitToPages = xPageSett->GetPageData().mbFitToPages;
438 
439  if( eBiff <= EXC_BIFF5 )
440  {
441  Add( new ExcBof );
442  Add( new ExcDummy_02a );
443  }
444  else
445  {
446  Add( new ExcBof8 );
447  lcl_AddCalcPr( aRecList, *this );
448  }
449 
450  // GUTS (count & size of outline icons)
451  aRecList.AppendRecord( mxCellTable->CreateRecord( EXC_ID_GUTS ) );
452  // DEFROWHEIGHT, created by the cell table
454 
455  // COUNTRY - in BIFF5/7 in every worksheet
456  if( eBiff <= EXC_BIFF5 )
457  Add( new XclExpCountry( GetRoot() ) );
458 
459  Add( new XclExpWsbool( bFitToPages ) );
460 
461  // page settings (SETUP and various other records)
462  aRecList.AppendRecord( xPageSett );
463 
464  const ScTableProtection* pTabProtect = rDoc.GetTabProtection(mnScTab);
465  if (pTabProtect && pTabProtect->isProtected())
466  {
467  Add( new XclExpProtection(true) );
471  Add( new XclExpPassHash(pTabProtect->getPasswordHash(PASSHASH_XL)) );
472  }
473 
474  // local link table: EXTERNCOUNT, EXTERNSHEET
475  if( eBiff <= EXC_BIFF5 )
477 
478  if ( eBiff == EXC_BIFF8 )
480 
481  // cell table: DEFCOLWIDTH, COLINFO, DIMENSIONS, ROW, cell records
483 
484  // MERGEDCELLS record, generated by the cell table
486  // label ranges
487  if( eBiff == EXC_BIFF8 )
488  Add( new XclExpLabelranges( GetRoot() ) );
489  // data validation (DVAL and list of DV records), generated by the cell table
490  aRecList.AppendRecord( mxCellTable->CreateRecord( EXC_ID_DVAL ) );
491 
492  if( eBiff == EXC_BIFF8 )
493  {
494  // all MSODRAWING and OBJ stuff of this sheet goes here
495  aRecList.AppendRecord( GetObjectManager().ProcessDrawing( GetSdrPage( mnScTab ) ) );
496  // pivot tables
497  aRecList.AppendRecord( GetPivotTableManager().CreatePivotTablesRecord( mnScTab ) );
498  }
499 
500  // list of NOTE records, generated by the cell table
502 
503  // sheet view settings: WINDOW2, SCL, PANE, SELECTION
505 
506  if( eBiff == EXC_BIFF8 )
507  {
508  // sheet protection options
510 
511  // enhanced protections if there are
512  if (pTabProtect)
513  {
514  const ::std::vector<ScEnhancedProtection>& rProts( pTabProtect->getEnhancedProtection());
515  for (const auto& rProt : rProts)
516  {
517  Add( new XclExpSheetEnhancedProtection( GetRoot(), rProt));
518  }
519  }
520 
521  // web queries
522  Add( new XclExpWebQueryBuffer( GetRoot() ) );
523 
524  // conditional formats
526 
527  if( HasVbaStorage() )
528  if( nCodeNameIdx < GetExtDocOptions().GetCodeNameCount() )
529  Add( new XclCodename( GetExtDocOptions().GetCodeName( nCodeNameIdx ) ) );
530  }
531 
532  // list of HLINK records, generated by the cell table
533  aRecList.AppendRecord( mxCellTable->CreateRecord( EXC_ID_HLINK ) );
534 
535  // change tracking
536  if( rR.pUserBViewList )
537  {
539  for ( iter = rR.pUserBViewList->cbegin(); iter != rR.pUserBViewList->cend(); ++iter)
540  {
541  Add( new XclExpUsersViewBegin( (*iter).GetGUID(), nExcTab ) );
542  Add( new XclExpUsersViewEnd );
543  }
544  }
545 
546  // EOF
547  Add( new ExcEof );
548 }
549 
551 {
553 
554  ScDocument& rDoc = GetDoc();
555 
556  OSL_ENSURE( (mnScTab >= 0) && (mnScTab <= MAXTAB), "-ExcTable::Table(): mnScTab - no ordinary table!" );
557  OSL_ENSURE( nExcTab <= o3tl::make_unsigned(MAXTAB), "-ExcTable::Table(): nExcTab - no ordinary table!" );
558 
559  // create a new OBJ list for this sheet (may be used by notes, autofilter, data validation)
561 
562  // cell table: DEFROWHEIGHT, DEFCOLWIDTH, COLINFO, DIMENSIONS, ROW, cell records
564 
565  //export cell notes
566  std::vector<sc::NoteEntry> aNotes;
567  rDoc.GetAllNoteEntries(aNotes);
568  for (const auto& rNote : aNotes)
569  {
570  if (rNote.maPos.Tab() != mnScTab)
571  continue;
572 
573  mxNoteList->AppendNewRecord(new XclExpNote(GetRoot(), rNote.maPos, rNote.mpNote, OUString()));
574  }
575 
576  // WSBOOL needs data from page settings, create it here, add it later
578  XclExtLstRef xExtLst = new XclExtLst( GetRoot() );
579  bool bFitToPages = xPageSett->GetPageData().mbFitToPages;
580 
581  Color aTabColor = GetRoot().GetDoc().GetTabBgColor(mnScTab);
582  Add(new XclExpXmlSheetPr(bFitToPages, mnScTab, aTabColor, &GetFilterManager()));
583 
584  // GUTS (count & size of outline icons)
585  aRecList.AppendRecord( mxCellTable->CreateRecord( EXC_ID_GUTS ) );
586  // DEFROWHEIGHT, created by the cell table
588 
590 
591  // sheet view settings: WINDOW2, SCL, PANE, SELECTION
593 
594  // cell table: DEFCOLWIDTH, COLINFO, DIMENSIONS, ROW, cell records
596 
597  // list of NOTE records, generated by the cell table
598  // not in the worksheet file
599  if( mxNoteList != nullptr && !mxNoteList->IsEmpty() )
601 
602  const ScTableProtection* pTabProtect = rDoc.GetTabProtection(mnScTab);
603  if (pTabProtect && pTabProtect->isProtected())
604  Add( new XclExpSheetProtection(true, mnScTab) );
605 
607 
608  // MERGEDCELLS record, generated by the cell table
610 
611  // conditional formats
612  Add( new XclExpCondFormatBuffer( GetRoot(), xExtLst ) );
613 
614  // data validation (DVAL and list of DV records), generated by the cell table
615  aRecList.AppendRecord( mxCellTable->CreateRecord( EXC_ID_DVAL ) );
616 
617  // list of HLINK records, generated by the cell table
618  XclExpRecordRef xHyperlinks = mxCellTable->CreateRecord( EXC_ID_HLINK );
619  XclExpHyperlinkList* pHyperlinkList = dynamic_cast<XclExpHyperlinkList*>(xHyperlinks.get());
620  if( pHyperlinkList != nullptr && !pHyperlinkList->IsEmpty() )
621  {
622  aRecList.AppendNewRecord( new XclExpXmlStartElementRecord( XML_hyperlinks ) );
623  aRecList.AppendRecord( xHyperlinks );
624  aRecList.AppendNewRecord( new XclExpXmlEndElementRecord( XML_hyperlinks ) );
625  }
626 
627  aRecList.AppendRecord( xPageSett );
628 
629  // all MSODRAWING and OBJ stuff of this sheet goes here
630  aRecList.AppendRecord( GetObjectManager().ProcessDrawing( GetSdrPage( mnScTab ) ) );
631 
632  XclExpImgData* pImgData = xPageSett->getGraphicExport();
633  if (pImgData)
634  aRecList.AppendRecord(pImgData);
635 
636  // <tableParts> after <drawing> and before <extLst>
637  aRecList.AppendRecord( GetTablesManager().GetTablesBySheet( mnScTab));
638 
639  aRecList.AppendRecord( xExtLst );
640 }
641 
642 void ExcTable::FillAsEmptyTable( SCTAB nCodeNameIdx )
643 {
645 
646  if( !(HasVbaStorage() && (nCodeNameIdx < GetExtDocOptions().GetCodeNameCount())) )
647  return;
648 
649  if( GetBiff() <= EXC_BIFF5 )
650  {
651  Add( new ExcBof );
652  }
653  else
654  {
655  Add( new ExcBof8 );
656  Add( new XclCodename( GetExtDocOptions().GetCodeName( nCodeNameIdx ) ) );
657  }
658  // sheet view settings: WINDOW2, SCL, PANE, SELECTION
660  Add( new ExcEof );
661 }
662 
664 {
666  if( mxCellTable )
667  mxCellTable->Finalize(true);
668  aRecList.Save( rStrm );
669 }
670 
672 {
673  if (!GetTabInfo().IsExportTab(mnScTab))
674  {
675  // header export.
677  if (mxCellTable)
678  mxCellTable->Finalize(false);
679  aRecList.SaveXml(rStrm);
680 
681  return;
682  }
683 
684  // worksheet export
685  OUString sSheetName = XclXmlUtils::GetStreamName( "xl/", "worksheets/sheet", mnScTab+1 );
686 
687  sax_fastparser::FSHelperPtr pWorksheet = rStrm.GetStreamForPath( sSheetName );
688 
689  rStrm.PushStream( pWorksheet );
690 
691  pWorksheet->startElement( XML_worksheet,
692  XML_xmlns, rStrm.getNamespaceURL(OOX_NS(xls)).toUtf8(),
693  FSNS(XML_xmlns, XML_r), rStrm.getNamespaceURL(OOX_NS(officeRel)).toUtf8(),
694  FSNS(XML_xmlns, XML_xdr), "http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing", // rStrm.getNamespaceURL(OOX_NS(xm)).toUtf8() -> "http://schemas.microsoft.com/office/excel/2006/main",
695  FSNS(XML_xmlns, XML_x14), rStrm.getNamespaceURL(OOX_NS(xls14Lst)).toUtf8(),
696  FSNS(XML_xmlns, XML_mc), rStrm.getNamespaceURL(OOX_NS(mce)).toUtf8());
697 
699  if (mxCellTable)
700  mxCellTable->Finalize(false);
701  aRecList.SaveXml( rStrm );
702 
704  if (pPT)
705  pPT->SaveXml(rStrm);
706 
707  rStrm.GetCurrentStream()->endElement( XML_worksheet );
708  rStrm.PopStream();
709 }
710 
712  XclExpRoot( rRoot ),
713  aHeader( rRoot )
714 {
715 }
716 
718 {
719  maTableList.RemoveAllRecords(); // for the following assertion!
720 }
721 
723 {
725 
726  if (GetOutput() == EXC_OUTPUT_BINARY)
728  else
729  {
732  GetTablesManager().Initialize(); // Move outside conditions if we wanted to support BIFF.
733  }
734 
735  SCTAB nScTab = 0, nScTabCount = GetTabInfo().GetScTabCount();
736  SCTAB nCodeNameIdx = 0, nCodeNameCount = GetExtDocOptions().GetCodeNameCount();
737 
738  for( ; nScTab < nScTabCount; ++nScTab )
739  {
740  if( GetTabInfo().IsExportTab( nScTab ) )
741  {
742  ExcTableList::RecordRefType xTab = new ExcTable( GetRoot(), nScTab );
743  maTableList.AppendRecord( xTab );
744  if (GetOutput() == EXC_OUTPUT_BINARY)
745  xTab->FillAsTableBinary(nCodeNameIdx);
746  else
747  xTab->FillAsTableXml();
748 
749  ++nCodeNameIdx;
750  }
751  }
752  for( ; nCodeNameIdx < nCodeNameCount; ++nScTab, ++nCodeNameIdx )
753  {
754  ExcTableList::RecordRefType xTab = new ExcTable( GetRoot(), nScTab );
755  maTableList.AppendRecord( xTab );
756  xTab->FillAsEmptyTable( nCodeNameIdx );
757  }
758 
759  if ( GetBiff() == EXC_BIFF8 )
760  {
761  // complete temporary Escher stream
763 
764  // change tracking
765  if ( GetDoc().GetChangeTrack() )
767  }
768 }
769 
770 void ExcDocument::Write( SvStream& rSvStrm )
771 {
772  if( !maTableList.IsEmpty() )
773  {
774  InitializeSave();
775 
776  XclExpStream aXclStrm( rSvStrm, GetRoot() );
777 
778  aHeader.Write( aXclStrm );
779 
780  OSL_ENSURE( maTableList.GetSize() == maBoundsheetList.GetSize(),
781  "ExcDocument::Write - different number of sheets and BOUNDSHEET records" );
782 
783  for( size_t nTab = 0, nTabCount = maTableList.GetSize(); nTab < nTabCount; ++nTab )
784  {
785  // set current stream position in BOUNDSHEET record
786  ExcBoundsheetRef xBoundsheet = maBoundsheetList.GetRecord( nTab );
787  if( xBoundsheet )
788  xBoundsheet->SetStreamPos( aXclStrm.GetSvStreamPos() );
789  // write the table
790  maTableList.GetRecord( nTab )->Write( aXclStrm );
791  }
792 
793  // write the table stream positions into the BOUNDSHEET records
794  for( size_t nBSheet = 0, nBSheetCount = maBoundsheetList.GetSize(); nBSheet < nBSheetCount; ++nBSheet )
795  maBoundsheetList.GetRecord( nBSheet )->UpdateStreamPos( aXclStrm );
796  }
797  if( m_xExpChangeTrack )
798  m_xExpChangeTrack->Write();
799 }
800 
802 {
803  SfxObjectShell* pDocShell = GetDocShell();
804 
805  using namespace ::com::sun::star;
806  uno::Reference<document::XDocumentPropertiesSupplier> xDPS( pDocShell->GetModel(), uno::UNO_QUERY_THROW );
807  uno::Reference<document::XDocumentProperties> xDocProps = xDPS->getDocumentProperties();
808 
809  rStrm.exportDocumentProperties(xDocProps, pDocShell->IsSecurityOptOpenReadOnly());
810  rStrm.exportCustomFragments();
811 
812  sax_fastparser::FSHelperPtr& rWorkbook = rStrm.GetCurrentStream();
813  rWorkbook->startElement( XML_workbook,
814  XML_xmlns, rStrm.getNamespaceURL(OOX_NS(xls)).toUtf8(),
815  FSNS(XML_xmlns, XML_r), rStrm.getNamespaceURL(OOX_NS(officeRel)).toUtf8() );
816  rWorkbook->singleElement( XML_fileVersion,
817  XML_appName, "Calc"
818  // OOXTODO: XML_codeName
819  // OOXTODO: XML_lastEdited
820  // OOXTODO: XML_lowestEdited
821  // OOXTODO: XML_rupBuild
822  );
823 
824  if( !maTableList.IsEmpty() )
825  {
826  InitializeSave();
827 
828  aHeader.WriteXml( rStrm );
829 
830  for( size_t nTab = 0, nTabCount = maTableList.GetSize(); nTab < nTabCount; ++nTab )
831  {
832  // write the table
833  maTableList.GetRecord( nTab )->WriteXml( rStrm );
834  }
835  }
836 
837  if( m_xExpChangeTrack )
838  m_xExpChangeTrack->WriteXml( rStrm );
839 
841  if (rCaches.HasCaches())
842  rCaches.SaveXml(rStrm);
843 
844  const ScCalcConfig& rCalcConfig = GetDoc().GetCalcConfig();
846 
847  // don't save "unspecified" string ref syntax ... query formula grammar
848  // and save that instead
850  {
851  eConv = GetDoc().GetAddressConvention();
852  }
853 
854  // write if it has been read|imported or explicitly changed
855  // or if ref syntax isn't what would be native for our file format
856  // i.e. ExcelA1 in this case
857  if ( rCalcConfig.mbHasStringRefSyntax ||
859  {
860  XclExtLstRef xExtLst = new XclExtLst( GetRoot() );
861  xExtLst->AddRecord( new XclExpExtCalcPr( GetRoot(), eConv ) );
862  xExtLst->SaveXml(rStrm);
863  }
864 
865  rWorkbook->endElement( XML_workbook );
866  rWorkbook.reset();
867 }
868 
869 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
const sal_uInt16 EXC_ID_FNGROUPCOUNT
Definition: xlconst.hxx:206
XclExpFilterManager & GetFilterManager() const
Returns the filter manager.
Definition: xeroot.cxx:153
virtual void Save(XclExpStream &rStrm) override
Writes the complete record list.
Definition: xerecord.hxx:376
ExcTableList maTableList
Definition: excdoc.hxx:86
XclBiff
An enumeration for all Excel file format types (BIFF types).
Definition: xlconst.hxx:30
const sal_uInt16 EXC_ID_INTERFACEHDR
Definition: xlconst.hxx:220
void InitializeGlobals()
Is called when export filter starts to create the workbook global data (>=BIFF5). ...
Definition: xeroot.cxx:193
bool IsExportTab(SCTAB nScTab) const
Returns true, if the specified Calc sheet will be exported.
Definition: xelink.cxx:771
const sal_uInt16 EXC_ID_DSF
Definition: xlconst.hxx:227
This class is used to export Excel record streams.
Definition: xestream.hxx:71
const ::std::vector< ScEnhancedProtection > & getEnhancedProtection() const
SCTAB GetCodeNameCount() const
Definition: scextopt.cxx:195
static void lcl_AddWorkbookProtection(XclExpRecordList<> &aRecList, const ExcTable &self)
Definition: excdoc.cxx:88
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xerecord.hxx:383
friend class ExcTable
Definition: excdoc.hxx:77
bool HasCaches() const
Definition: xepivotxml.cxx:167
void InitializeConvert()
Is called when export filter starts to create the Excel document (all BIFF versions).
Definition: xeroot.cxx:183
Provides export of the row/column label range list of a sheet.
Definition: xecontent.hxx:141
void AppendRecord(RecType *pRec)
Appends a record to the list.
Definition: xerecord.hxx:349
sheet protection state container
const_iterator cbegin()
const sal_uInt16 EXC_ID_NAME
Definition: xlname.hxx:29
XclExpPivotTableManager & GetPivotTableManager() const
Returns the pivot table manager.
Definition: xeroot.cxx:165
std::unique_ptr< XclExpChangeTrack > m_xExpChangeTrack
Definition: excdoc.hxx:89
void CreatePivotTables()
Creates all pivot tables and caches from the Calc DataPilot objects.
Definition: xepivot.cxx:1628
bool IsSecurityOptOpenReadOnly() const
This record contains the Windows country IDs for the UI and document language.
Definition: excrecds.hxx:280
virtual bool isProtected() const override
void EndDocument()
Finalizes the object manager after conversion of all sheets.
Definition: xeescher.cxx:1828
Represents a NOTE record containing the relevant data of a cell note.
Definition: xeescher.hxx:339
Contains all web query records for this document.
Definition: xecontent.hxx:410
XclExpNoteListRef mxNoteList
Definition: excdoc.hxx:53
const ScExtDocSettings & GetDocSettings() const
Definition: scextopt.cxx:170
const sal_uInt16 EXC_ID2_DEFROWHEIGHT
Definition: xltable.hxx:112
css::uno::Reference< css::frame::XModel > GetModel() const
XclExpRecordList aRecList
Definition: excdoc.hxx:47
ScDocument & GetDoc() const
Returns reference to the destination document (import) or source document (export).
Definition: xlroot.cxx:278
SCTAB mnScTab
Definition: excdoc.hxx:50
RootData & GetOldRoot() const
Returns old RootData struct.
Definition: xlroot.hxx:137
const sal_uInt16 BIFF_ID_OBJECTPROTECT
Definition: biffhelper.hxx:458
Beginning of User Interface Records.
Definition: xcl97rec.hxx:526
SC_DLLPUBLIC formula::FormulaGrammar::AddressConvention GetAddressConvention() const
Definition: documen3.cxx:475
Save sheetPr element and its children for xlsx export.
Definition: excrecds.hxx:304
void StartSheet()
Initializes the object manager for a new sheet.
Definition: xeescher.cxx:1799
const sal_uInt16 EXC_ID3_DIMENSIONS
Definition: xltable.hxx:34
const sal_uInt16 EXC_ID_TOOLBAREND
Definition: xlconst.hxx:216
sax_fastparser::FSHelperPtr GetStreamForPath(const OUString &rPath)
Definition: xestream.cxx:927
Access to global data from other classes.
Definition: xeroot.hxx:113
bool isOptionEnabled(Option eOption) const
XclExpChTrTabId * pTabId
Definition: root.hxx:62
OUString getNamespaceURL(sal_Int32 nNSID) const
MS Excel 4.0.
Definition: xlconst.hxx:35
const sal_uInt16 EXC_ID_MERGEDCELLS
Definition: xlcontent.hxx:33
void PushStream(sax_fastparser::FSHelperPtr const &aStream)
Definition: xestream.cxx:916
Contains all view settings records for a single sheet.
Definition: xeview.hxx:138
const sal_uInt16 EXC_ID_WRITEPROT
Definition: xlconst.hxx:197
Base class for all Excel records.
Definition: xerecord.hxx:39
XclExpUserBViewList * pUserBViewList
Definition: root.hxx:63
OUString maGlobCodeName
Global codename (VBA module name).
Definition: scextopt.hxx:30
sax_fastparser::FSHelperPtr & GetCurrentStream()
Definition: xestream.cxx:910
const SCTAB SCTAB_GLOBAL
An invalid Calc sheet index, for common use.
Definition: xlconst.hxx:75
static void lcl_AddScenariosAndFilters(XclExpRecordList<> &aRecList, const XclExpRoot &rRoot, SCTAB nScTab)
Definition: excdoc.cxx:103
static void lcl_AddCalcPr(XclExpRecordList<> &aRecList, const ExcTable &self)
Definition: excdoc.cxx:72
void PopStream()
Definition: xestream.cxx:921
ScChangeTrack * GetChangeTrack() const
Definition: document.hxx:2392
sal_uInt16 nExcTab
Definition: excdoc.hxx:51
const sal_uInt16 EXC_ID_DVAL
Font escapement type modified?
Definition: xlcontent.hxx:98
SC_DLLPUBLIC const ScDocOptions & GetDocOptions() const
Definition: documen3.cxx:1904
End of User Interface Records.
Definition: xcl97rec.hxx:536
MS Excel 5.0, MS Excel 7.0 (95)
Definition: xlconst.hxx:36
XclOutput GetOutput() const
Returns the current output format of the importer/exporter.
Definition: xlroot.hxx:142
sal_uInt64 GetSvStreamPos() const
Returns the absolute position of the system stream.
Definition: xestream.hxx:139
const sal_uInt16 EXC_ID_FONTLIST
Definition: xestyle.hxx:39
ScExtDocOptions & GetExtDocOptions() const
Returns the extended document options.
Definition: xlroot.cxx:421
XclExpXmlPivotTableManager & GetXmlPivotTableManager()
Definition: xeroot.cxx:171
void WriteXml(XclExpXmlStream &)
Definition: excdoc.cxx:671
rtl::Reference< XclExtLst > XclExtLstRef
Definition: xeextlst.hxx:206
bool HasVbaStorage() const
Returns true, if the document contains a VBA storage.
Definition: xlroot.cxx:248
const sal_uInt16 BIFF_ID_SAVERECALC
Definition: biffhelper.hxx:497
static void lcl_AddBookviews(XclExpRecordList<> &aRecList, const ExcTable &self)
Definition: excdoc.cxx:65
constexpr std::enable_if_t< std::is_signed_v< T >, std::make_unsigned_t< T > > make_unsigned(T value)
void FillAsHeaderXml(ExcBoundsheetList &rBoundsheetList)
Definition: excdoc.cxx:321
const sal_uInt16 EXC_ID_USESELFS
Definition: xlconst.hxx:224
void Write(SvStream &rSvStrm)
Definition: excdoc.cxx:770
Stores the correct Excel sheet index for each Calc sheet.
Definition: xelink.hxx:62
Represents a FEATHDR (SHEETPROTECTION) record that stores sheet protection options.
Definition: xcl97rec.hxx:432
ExcDocument(const XclExpRoot &rRoot)
Definition: excdoc.cxx:711
This class contains the cell contents and more of an entire sheet.
Definition: xetable.hxx:974
sal_uInt32 GetModifyPasswordHash() const
XclExpTablesManager & GetTablesManager()
Definition: xeroot.cxx:177
XclExpTabInfo & GetTabInfo() const
Returns the buffer for Calc->Excel sheet index conversion.
Definition: xeroot.cxx:75
const SCTAB MAXTAB
Definition: address.hxx:71
static sal_uInt16 GetXclCodePage(rtl_TextEncoding eTextEnc)
Returns an Excel code page from a text encoding.
Definition: xltools.cxx:437
std::shared_ptr< FastSerializerHelper > FSHelperPtr
XclExpXmlPivotCaches & GetCaches()
Definition: xepivotxml.cxx:621
const sal_uInt16 BIFF_ID_SCENPROTECT
Definition: biffhelper.hxx:501
formula::FormulaGrammar::AddressConvention meStringRefAddressSyntax
Definition: calcconfig.hxx:53
void AppendNewRecord(RecType *pRec)
Appends a newly created record to the list.
Definition: xerecord.hxx:362
XclExpRecordRef CreateRecord(sal_uInt16 nRecId) const
Returns the reference to a record (or record list) representing a root object.
Definition: xeroot.cxx:280
void InitializeSave()
Is called before export filter starts to write the records to the stream.
Definition: xeroot.cxx:274
void ReadDoc()
Definition: excdoc.cxx:722
virtual bool isProtected() const override
ExcTable aHeader
Definition: excdoc.hxx:84
Contains all conditional formats of a specific sheet.
Definition: xecontent.hxx:294
const XclExpRoot & GetRoot() const
Returns this root instance - for code readability in derived classes.
Definition: xeroot.hxx:119
const sal_uInt16 EXC_ID_XFLIST
For internal use only.
Definition: xestyle.hxx:41
XclExpValueRecord< sal_uInt16 > XclExpUInt16Record
A record containing an unsigned 16-bit value.
Definition: xerecord.hxx:248
virtual css::uno::Sequence< sal_Int8 > getPasswordHash(ScPasswordHash eHash, ScPasswordHash eHash2=PASSHASH_UNSPECIFIED) const override
const sal_uInt16 EXC_ID_SST
Definition: xlcontent.hxx:45
Configuration options for formula interpreter.
Definition: calcconfig.hxx:43
const sal_uInt16 EXC_ID_MMS
Definition: xlconst.hxx:217
void SetCurrScTab(SCTAB nScTab)
Sets the current Calc sheet index.
Definition: xlroot.hxx:258
static OUString GetStreamName(const char *sStreamDir, const char *sStream, sal_Int32 nId)
Definition: xestream.cxx:683
SCTAB GetScTabCount() const
Returns the number of Calc sheets.
Definition: xelink.hxx:90
const sal_uInt16 EXC_ID_GUTS
Definition: xltable.hxx:148
RecType * GetRecord(size_t nPos) const
Returns reference to an existing record or empty reference on error.
Definition: xerecord.hxx:334
SC_DLLPUBLIC Color GetTabBgColor(SCTAB nTab) const
Definition: documen3.cxx:429
void FillAsHeaderBinary(ExcBoundsheetList &rBoundsheetList)
Definition: excdoc.cxx:137
const sal_uInt16 EXC_ID_PALETTE
Definition: xlstyle.hxx:200
Contains all page (print) settings records for a single sheet.
Definition: xepage.hxx:92
void UpdateStreamPos(XclExpStream &rStrm)
Definition: excrecds.cxx:295
bool mbHasStringRefSyntax
Definition: calcconfig.hxx:56
const_iterator cend()
sal_uInt16 GetXclTabCount() const
Returns the number of Excel sheets to be exported.
Definition: xelink.hxx:93
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xepivotxml.cxx:638
Represents the WINDOW1 record containing global workbook view settings.
Definition: xeview.hxx:30
Write Access User Name - This record contains the user name, which is the name you type when you inst...
Definition: xcl97rec.hxx:548
const ScCalcConfig & GetCalcConfig() const
Definition: document.hxx:2523
Provides export of bitmap data to an IMGDATA record.
Definition: xeescher.hxx:149
bool IsCalcAsShown() const
Definition: docoptio.hxx:82
A record without body.
Definition: xerecord.hxx:184
void RemoveAllRecords()
Removes all records from the list.
Definition: xerecord.hxx:373
void Add(XclExpRecordBase *pRec)
Definition: excdoc.cxx:131
void FillAsTableXml()
Definition: excdoc.cxx:550
const sal_uInt16 EXC_ID_TOOLBARHDR
Definition: xlconst.hxx:215
void InitializeTable(SCTAB nScTab)
Is called when export filter starts to create data for a single sheet (all BIFF versions).
Definition: xeroot.cxx:264
const sal_uInt16 EXC_ID_INTERFACEEND
Definition: xlconst.hxx:221
XclExpObjectManager & GetObjectManager() const
Returns the drawing object manager.
Definition: xeroot.cxx:147
const sal_uInt16 EXC_NOTAB
Definition: xlconst.hxx:73
XclBiff GetBiff() const
Returns the current BIFF version of the importer/exporter.
Definition: xlroot.hxx:140
const sal_uInt16 EXC_ID_HLINK
Definition: xlcontent.hxx:142
void Write(XclExpStream &)
Definition: excdoc.cxx:663
void FillAsTableBinary(SCTAB nCodeNameIdx)
Definition: excdoc.cxx:406
constexpr sal_Int32 FSNS(sal_Int32 namespc, sal_Int32 element)
size_t GetSize() const
Definition: xerecord.hxx:328
SC_DLLPUBLIC ScTableProtection * GetTabProtection(SCTAB nTab) const
Definition: documen3.cxx:1880
ExcBoundsheetList maBoundsheetList
Definition: excdoc.hxx:87
virtual ~ExcTable() override
Definition: excdoc.cxx:127
const sal_uInt16 EXC_ID_FORMATLIST
For internal use only.
Definition: xestyle.hxx:40
bool IsDocumentEncrypted() const
Definition: xeroot.cxx:298
void WriteXml(XclExpXmlStream &)
Definition: excdoc.cxx:801
XclExpRecordRef CreateRecord(SCTAB nScTab)
Returns a record object containing all filter records for the specified sheet.
Definition: excrecds.cxx:1011
void exportDocumentProperties(const css::uno::Reference< css::document::XDocumentProperties > &xProperties, bool bSecurityOptOpenReadOnly)
std::vector< XclExpUserBView >::const_iterator const_iterator
static OUString lcl_GetVbaTabName(SCTAB n)
Definition: excdoc.cxx:59
void FillAsEmptyTable(SCTAB nCodeNameIdx)
Definition: excdoc.cxx:642
Represents one EnhancedProtection feature in a FEAT record.
Definition: xcl97rec.hxx:446
const sal_uInt16 EXC_ID_CODEPAGE
Definition: xlconst.hxx:185
SfxObjectShell * GetDocShell() const
Returns the object shell of the Calc document.
Definition: xlroot.cxx:283
bool IsLoadReadonly() const
bool isOptionEnabled(Option eOption) const
XclExpCellTableRef mxCellTable
Definition: excdoc.hxx:48
XclExpXmlPivotTables * GetTablesBySheet(SCTAB nTab)
Definition: xepivotxml.cxx:626
bool IsEmpty() const
Definition: xerecord.hxx:327
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xepivotxml.cxx:131
const sal_uInt16 EXC_ID_XL9FILE
Definition: xlconst.hxx:237
ExcTable(const XclExpRoot &rRoot)
Definition: excdoc.cxx:111
SdrPage * GetSdrPage(SCTAB nScTab) const
Returns the drawing layer page of the passed sheet, if present.
Definition: xlroot.cxx:309
sal_Int16 SCTAB
Definition: types.hxx:23
Record which contains a Boolean value.
Definition: xerecord.hxx:255
virtual css::uno::Sequence< sal_Int8 > getPasswordHash(ScPasswordHash eHash, ScPasswordHash eHash2=PASSHASH_UNSPECIFIED) const override
virtual ~ExcDocument() override
Definition: excdoc.cxx:717
SC_DLLPUBLIC void GetAllNoteEntries(std::vector< sc::NoteEntry > &rNotes) const
Definition: document.cxx:6749