LibreOffice Module sc (master)  1
excdoc.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 #ifndef INCLUDED_SC_SOURCE_FILTER_INC_EXCDOC_HXX
21 #define INCLUDED_SC_SOURCE_FILTER_INC_EXCDOC_HXX
22 
23 #include "xeroot.hxx"
24 #include "xerecord.hxx"
25 #include "excrecds.hxx"
26 #include <memory>
27 
28 // Forwards -
29 
30 class SvStream;
31 class XclExpNote;
32 class XclExpStream;
33 class XclExpXmlStream;
34 class XclExpChangeTrack;
35 
36 
37 class XclExpCellTable;
38 
39 class ExcTable : public XclExpRecordBase, public XclExpRoot
40 {
41 private:
46 
48  XclExpCellTableRef mxCellTable;
49 
50  SCTAB mnScTab; // table number SC document
51  sal_uInt16 nExcTab; // table number Excel document
52 
53  XclExpNoteListRef mxNoteList;
54 
55  // re-create and forget pRec; delete is done by ExcTable itself!
56  void Add( XclExpRecordBase* pRec );
57 
58 public:
59  ExcTable( const XclExpRoot& rRoot );
60  ExcTable( const XclExpRoot& rRoot, SCTAB nScTab );
61  virtual ~ExcTable() override;
62 
63  void FillAsHeaderBinary( ExcBoundsheetList& rBoundsheetList );
64  void FillAsHeaderXml( ExcBoundsheetList& rBoundsheetList );
65 
66  void FillAsTableBinary( SCTAB nCodeNameIdx );
67  void FillAsTableXml();
68 
69  void FillAsEmptyTable( SCTAB nCodeNameIdx );
70 
71  void Write( XclExpStream& );
72  void WriteXml( XclExpXmlStream& );
73 };
74 
75 class ExcDocument : protected XclExpRoot
76 {
77 friend class ExcTable;
78 
79 private:
83 
85 
86  ExcTableList maTableList;
87  ExcBoundsheetList maBoundsheetList;
88 
89  std::unique_ptr<XclExpChangeTrack> m_xExpChangeTrack;
90 
91 public:
92  explicit ExcDocument( const XclExpRoot& rRoot );
93  virtual ~ExcDocument() override;
94 
95  void ReadDoc();
96  void Write( SvStream& rSvStrm );
97  void WriteXml( XclExpXmlStream& );
98 };
99 
100 #endif
101 
102 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
ExcBoundsheetList::RecordRefType ExcBoundsheetRef
Definition: excdoc.hxx:82
ExcTableList maTableList
Definition: excdoc.hxx:86
rtl::Reference< XclExpNoteList > XclExpNoteListRef
Definition: excdoc.hxx:45
This class is used to export Excel record streams.
Definition: xestream.hxx:73
std::unique_ptr< XclExpChangeTrack > m_xExpChangeTrack
Definition: excdoc.hxx:89
XclExpRecordList< ExcBundlesheetBase > ExcBoundsheetList
Definition: excdoc.hxx:42
Represents a NOTE record containing the relevant data of a cell note.
Definition: xeescher.hxx:339
XclExpNoteListRef mxNoteList
Definition: excdoc.hxx:53
XclExpRecordList aRecList
Definition: excdoc.hxx:47
SCTAB mnScTab
Definition: excdoc.hxx:50
XclExpRecordList< ExcBundlesheetBase > ExcBoundsheetList
Definition: excdoc.hxx:81
Access to global data from other classes.
Definition: xeroot.hxx:113
Base class for all Excel records.
Definition: xerecord.hxx:38
sal_uInt16 nExcTab
Definition: excdoc.hxx:51
void WriteXml(XclExpXmlStream &)
Definition: excdoc.cxx:671
void FillAsHeaderXml(ExcBoundsheetList &rBoundsheetList)
Definition: excdoc.cxx:321
rtl::Reference< XclExpCellTable > XclExpCellTableRef
Definition: excdoc.hxx:43
void Write(SvStream &rSvStrm)
Definition: excdoc.cxx:770
ExcDocument(const XclExpRoot &rRoot)
Definition: excdoc.cxx:711
This class contains the cell contents and more of an entire sheet.
Definition: xetable.hxx:975
XclExpRecordList< XclExpNote > XclExpNoteList
Definition: excdoc.hxx:44
void ReadDoc()
Definition: excdoc.cxx:722
ExcTable aHeader
Definition: excdoc.hxx:84
void FillAsHeaderBinary(ExcBoundsheetList &rBoundsheetList)
Definition: excdoc.cxx:137
void Add(XclExpRecordBase *pRec)
Definition: excdoc.cxx:131
XclExpRecordList< ExcTable > ExcTableList
Definition: excdoc.hxx:80
void FillAsTableXml()
Definition: excdoc.cxx:550
void Write(XclExpStream &)
Definition: excdoc.cxx:663
void FillAsTableBinary(SCTAB nCodeNameIdx)
Definition: excdoc.cxx:406
ExcBoundsheetList maBoundsheetList
Definition: excdoc.hxx:87
virtual ~ExcTable() override
Definition: excdoc.cxx:127
void WriteXml(XclExpXmlStream &)
Definition: excdoc.cxx:801
void FillAsEmptyTable(SCTAB nCodeNameIdx)
Definition: excdoc.cxx:642
XclExpCellTableRef mxCellTable
Definition: excdoc.hxx:48
ExcTable(const XclExpRoot &rRoot)
Definition: excdoc.cxx:111
sal_Int16 SCTAB
Definition: types.hxx:23
virtual ~ExcDocument() override
Definition: excdoc.cxx:717