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