LibreOffice Module sc (master) 1
xiroot.hxx
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#pragma once
21
22#include "xlroot.hxx"
23#include <memory>
24
25// Forward declarations of objects in public use ==============================
26
27class XclImpStream;
28class XclImpString;
29
30typedef std::shared_ptr< XclImpString > XclImpStringRef;
31
32// Global data ================================================================
33
36class XclImpSst;
37class XclImpPalette;
40class XclImpXFBuffer;
42class XclImpTabInfo;
57
58class ScRangeListTabs;
59class ExcelToSc;
61
64{
65 typedef std::shared_ptr< XclImpAddressConverter > XclImpAddrConvRef;
66 typedef std::shared_ptr< XclImpFormulaCompiler > XclImpFmlaCompRef;
67
68 typedef std::shared_ptr< XclImpSst > XclImpSstRef;
69 typedef std::shared_ptr< XclImpPalette > XclImpPaletteRef;
70 typedef std::shared_ptr< XclImpFontBuffer > XclImpFontBfrRef;
71 typedef std::shared_ptr< XclImpNumFmtBuffer > XclImpNumFmtBfrRef;
72 typedef std::shared_ptr< XclImpXFBuffer > XclImpXFBfrRef;
73 typedef std::shared_ptr< XclImpXFRangeBuffer > XclImpXFRangeBfrRef;
74 typedef std::shared_ptr< XclImpTabInfo > XclImpTabInfoRef;
75 typedef std::shared_ptr< XclImpNameManager > XclImpNameMgrRef;
76 typedef std::shared_ptr< XclImpLinkManager > XclImpLinkMgrRef;
77 typedef std::shared_ptr< XclImpObjectManager > XclImpObjectMgrRef;
78 typedef std::shared_ptr< XclImpCondFormatManager > XclImpCondFmtMgrRef;
79 typedef std::shared_ptr< XclImpValidationManager > XclImpValidationMgrRef;
80 typedef std::shared_ptr< XclImpWebQueryBuffer > XclImpWebQueryBfrRef;
81 typedef std::shared_ptr< XclImpPivotTableManager > XclImpPTableMgrRef;
82 typedef std::shared_ptr< XclImpPageSettings > XclImpPageSettRef;
83 typedef std::shared_ptr< XclImpDocViewSettings > XclImpDocViewSettRef;
84 typedef std::shared_ptr< XclImpTabViewSettings > XclImpTabViewSettRef;
85 typedef std::shared_ptr< XclImpSheetProtectBuffer > XclImpTabProtectRef;
86 typedef std::shared_ptr< XclImpDocProtectBuffer > XclImpDocProtectRef;
87
90
97
101
107
113
114 std::shared_ptr<ScDocumentImport> mxDocImport;
115
116 std::unique_ptr<ScRangeListTabs> mpPrintRanges;
117 std::unique_ptr<ScRangeListTabs> mpPrintTitles;
118
121
122 explicit XclImpRootData( XclBiff eBiff, SfxMedium& rMedium,
123 const tools::SvRef<SotStorage>& xRootStrg, ScDocument& rDoc, rtl_TextEncoding eTextEnc );
124 virtual ~XclImpRootData() override;
125};
126
128class XclImpRoot : public XclRoot
129{
130public:
131 explicit XclImpRoot( XclImpRootData& rImpRootData );
132
134 const XclImpRoot& GetRoot() const { return *this; }
135 XclImpRoot& GetRoot() { return *this; }
136
138 void SetCodePage( sal_uInt16 nCodePage );
139
141 void InitializeTable( SCTAB nScTab );
143 void FinalizeTable();
144
151
153 XclImpSst& GetSst() const;
155 XclImpPalette& GetPalette() const;
164
169
171 XclImpTabInfo& GetTabInfo() const;
176
183
195
202
204 static OUString GetScAddInName( const OUString& rXclName );
205
207 bool HasBasic() const { return mrImpData.mbHasBasic; }
211 void ReadCodeName( XclImpStream& rStrm, bool bGlobals );
212
214
215private:
217};
218
219/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Accessor class to ScDocument.
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
Contains document view settings (WINDOW1 record).
Definition: xiview.hxx:29
Stores the data of all fonts occurred in an Excel file.
Definition: xistyle.hxx:153
The formula compiler to create Calc token arrays from Excel token arrays.
Definition: xiformula.hxx:33
This is the central class for the import of all internal/external links.
Definition: xilink.hxx:185
This buffer contains all internal defined names of the document.
Definition: xiname.hxx:82
Stores all user defined number formats occurred in the file.
Definition: xistyle.hxx:205
Stores all drawing and OLE objects and additional data related to these objects.
Definition: xiescher.hxx:1151
Contains all page (print) settings for a single sheet.
Definition: xipage.hxx:30
Stores the default colors for the current BIFF version and the contents of a PALETTE record.
Definition: xistyle.hxx:45
The main class for pivot table import.
Definition: xipivot.hxx:372
Access to global data from other classes.
Definition: xiroot.hxx:129
ScRangeListTabs & GetPrintAreaBuffer() const
Returns the buffer that contains all print areas in the document.
Definition: xiroot.cxx:170
ExcelToSc & GetOldFmlaConverter() const
Returns the old formula converter.
Definition: xiroot.cxx:133
XclImpRoot & GetRoot()
Definition: xiroot.hxx:135
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
void FinalizeTable()
Is called when import filter stops importing a single sheet (all BIFF versions).
Definition: xiroot.cxx:115
ScRangeListTabs & GetTitleAreaBuffer() const
Returns the buffer that contains all print titles in the document.
Definition: xiroot.cxx:175
XclImpLinkManager & GetLinkManager() const
Returns the link manager.
Definition: xiroot.cxx:190
XclImpXFRangeBuffer & GetXFRangeBuffer() const
Returns the buffer of XF index ranges for a sheet.
Definition: xiroot.cxx:165
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
XclImpDocProtectBuffer & GetDocProtectBuffer() const
Returns the document protection options.
Definition: xiroot.cxx:244
XclImpNameManager & GetNameManager() const
Returns the buffer that contains internal defined names.
Definition: xiroot.cxx:185
XclImpValidationManager & GetValidationManager() const
Definition: xiroot.cxx:213
static OUString GetScAddInName(const OUString &rXclName)
Returns the Calc add-in function name for an Excel function name.
Definition: xiroot.cxx:265
XclImpAutoFilterBuffer & GetFilterManager() const
Returns the filter manager.
Definition: xiroot.cxx:219
XclImpRoot(XclImpRootData &rImpRootData)
Definition: xiroot.cxx:57
void SetHasBasic()
Called to indicate that the document contains a VB project.
Definition: xiroot.hxx:209
bool HasBasic() const
Returns true, if the document contains a VB project.
Definition: xiroot.hxx:207
XclImpFormulaCompiler & GetFormulaCompiler() const
Returns the formula converter.
Definition: xiroot.cxx:128
XclImpDocViewSettings & GetDocViewSettings() const
Returns the view settings of the entire document.
Definition: xiroot.cxx:255
XclImpPalette & GetPalette() const
Returns the color buffer.
Definition: xiroot.cxx:145
XclImpSst & GetSst() const
Returns the shared string table.
Definition: xiroot.cxx:139
void InitializeTable(SCTAB nScTab)
Is called when import filter starts importing a single sheet (all BIFF versions).
Definition: xiroot.cxx:99
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
XclImpSheetProtectBuffer & GetSheetProtectBuffer() const
Returns the sheet protection options of the current sheet.
Definition: xiroot.cxx:238
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
void SetCodePage(sal_uInt16 nCodePage)
Sets a code page read from a CODEPAGE record for byte string import.
Definition: xiroot.cxx:93
XclImpPivotTableManager & GetPivotTableManager() const
Returns the pivot table manager.
Definition: xiroot.cxx:232
XclImpRootData & mrImpData
Definition: xiroot.hxx:216
XclImpNumFmtBuffer & GetNumFmtBuffer() const
Returns the number format buffer.
Definition: xiroot.cxx:155
Drawing manager of a single sheet.
Definition: xiescher.hxx:1117
The SST (shared string table) contains all strings used in a BIFF8 file.
Definition: xicontent.hxx:56
This class is used to import record oriented streams.
Definition: xistream.hxx:278
This class represents an unformatted or formatted string and provides importing from stream.
Definition: xistring.hxx:31
A buffer containing information about names and creation order of sheets.
Definition: xilink.hxx:62
Contains all view settings for a single sheet.
Definition: xiview.hxx:59
Imports validation data.
Definition: xicontent.hxx:169
Contains all XF records occurred in the file.
Definition: xistyle.hxx:479
Contains the XF indexes for every used cell in a single sheet.
Definition: xistyle.hxx:608
Access to global data for a filter object (imported or exported document) from other classes.
Definition: xlroot.hxx:128
Stores global buffers and data needed for Excel import filter.
Definition: xiroot.hxx:64
std::shared_ptr< XclImpFormulaCompiler > XclImpFmlaCompRef
Definition: xiroot.hxx:66
XclImpDocProtectRef mxDocProtect
Sheet protection options for current sheet.
Definition: xiroot.hxx:112
XclImpXFBfrRef mpXFBfr
All number formats in the file.
Definition: xiroot.hxx:95
XclImpSstRef mxSst
The formula compiler.
Definition: xiroot.hxx:91
XclImpAddrConvRef mxAddrConv
Definition: xiroot.hxx:88
std::shared_ptr< ScDocumentImport > mxDocImport
Document protection options.
Definition: xiroot.hxx:114
std::shared_ptr< XclImpLinkManager > XclImpLinkMgrRef
Definition: xiroot.hxx:76
std::unique_ptr< ScRangeListTabs > mpPrintRanges
Definition: xiroot.hxx:116
XclImpTabProtectRef mxTabProtect
View settings for current sheet.
Definition: xiroot.hxx:111
XclImpLinkMgrRef mxLinkMgr
Internal defined names.
Definition: xiroot.hxx:100
bool mbHasCodePage
Definition: xiroot.hxx:119
XclImpDocViewSettRef mxDocViewSett
Page settings for current sheet.
Definition: xiroot.hxx:109
virtual ~XclImpRootData() override
Definition: xiroot.cxx:53
XclImpRootData(XclBiff eBiff, SfxMedium &rMedium, const tools::SvRef< SotStorage > &xRootStrg, ScDocument &rDoc, rtl_TextEncoding eTextEnc)
true = document contains VB project.
Definition: xiroot.cxx:44
XclImpNameMgrRef mxNameMgr
Sheet creation order list.
Definition: xiroot.hxx:99
XclImpFontBfrRef mxFontBfr
The color buffer.
Definition: xiroot.hxx:93
std::shared_ptr< XclImpTabViewSettings > XclImpTabViewSettRef
Definition: xiroot.hxx:84
std::shared_ptr< XclImpPivotTableManager > XclImpPTableMgrRef
Definition: xiroot.hxx:81
XclImpWebQueryBfrRef mxWebQueryBfr
Data validation.
Definition: xiroot.hxx:105
std::shared_ptr< XclImpNumFmtBuffer > XclImpNumFmtBfrRef
Definition: xiroot.hxx:71
XclImpFmlaCompRef mxFmlaComp
The address converter.
Definition: xiroot.hxx:89
std::shared_ptr< XclImpDocProtectBuffer > XclImpDocProtectRef
Definition: xiroot.hxx:86
std::shared_ptr< XclImpCondFormatManager > XclImpCondFmtMgrRef
Definition: xiroot.hxx:78
std::shared_ptr< XclImpXFRangeBuffer > XclImpXFRangeBfrRef
Definition: xiroot.hxx:73
std::unique_ptr< ScRangeListTabs > mpPrintTitles
Definition: xiroot.hxx:117
XclImpPaletteRef mxPalette
The shared string table.
Definition: xiroot.hxx:92
std::shared_ptr< XclImpWebQueryBuffer > XclImpWebQueryBfrRef
Definition: xiroot.hxx:80
XclImpNumFmtBfrRef mxNumFmtBfr
All fonts in the file.
Definition: xiroot.hxx:94
bool mbHasBasic
true = CODEPAGE record exists.
Definition: xiroot.hxx:120
std::shared_ptr< XclImpAddressConverter > XclImpAddrConvRef
Definition: xiroot.hxx:65
std::shared_ptr< XclImpPalette > XclImpPaletteRef
Definition: xiroot.hxx:69
std::shared_ptr< XclImpTabInfo > XclImpTabInfoRef
Definition: xiroot.hxx:74
XclImpTabInfoRef mxTabInfo
Buffer of XF index ranges in a sheet.
Definition: xiroot.hxx:98
std::shared_ptr< XclImpNameManager > XclImpNameMgrRef
Definition: xiroot.hxx:75
XclImpCondFmtMgrRef mxCondFmtMgr
All drawing objects.
Definition: xiroot.hxx:103
XclImpPTableMgrRef mxPTableMgr
All web queries.
Definition: xiroot.hxx:106
std::shared_ptr< XclImpFontBuffer > XclImpFontBfrRef
Definition: xiroot.hxx:70
std::shared_ptr< XclImpDocViewSettings > XclImpDocViewSettRef
Definition: xiroot.hxx:83
std::shared_ptr< XclImpSst > XclImpSstRef
Definition: xiroot.hxx:68
std::shared_ptr< XclImpObjectManager > XclImpObjectMgrRef
Definition: xiroot.hxx:77
XclImpTabViewSettRef mxTabViewSett
View settings for entire document.
Definition: xiroot.hxx:110
std::shared_ptr< XclImpPageSettings > XclImpPageSettRef
Definition: xiroot.hxx:82
XclImpXFRangeBfrRef mxXFRangeBfr
All XF record data in the file.
Definition: xiroot.hxx:96
std::shared_ptr< XclImpValidationManager > XclImpValidationMgrRef
Definition: xiroot.hxx:79
std::shared_ptr< XclImpXFBuffer > XclImpXFBfrRef
Definition: xiroot.hxx:72
XclImpObjectMgrRef mxObjMgr
Manager for internal/external links.
Definition: xiroot.hxx:102
XclImpValidationMgrRef mxValidMgr
Conditional formatting.
Definition: xiroot.hxx:104
std::shared_ptr< XclImpSheetProtectBuffer > XclImpTabProtectRef
Definition: xiroot.hxx:85
XclImpPageSettRef mxPageSett
All pivot tables and pivot caches.
Definition: xiroot.hxx:108
Stores global buffers and data needed elsewhere in the Excel filters.
Definition: xlroot.hxx:65
sal_Int16 SCTAB
Definition: types.hxx:22
std::shared_ptr< XclImpString > XclImpStringRef
Definition: xiroot.hxx:28
XclBiff
An enumeration for all Excel file format types (BIFF types).
Definition: xlconst.hxx:30