1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_SC_SOURCE_FILTER_INC_EXCDOC_HXX
21 #define INCLUDED_SC_SOURCE_FILTER_INC_EXCDOC_HXX
23 #include "excrecds.hxx"
26 #include "xeescher.hxx"
35 class XclExpChangeTrack
;
39 class XclExpCellTable
;
41 class ExcTable
: public XclExpRecordBase
, public XclExpRoot
44 typedef XclExpRecordList
< ExcBundlesheetBase
> ExcBoundsheetList
;
45 typedef std::shared_ptr
< XclExpCellTable
> XclExpCellTableRef
;
46 typedef XclExpRecordList
< XclExpNote
> XclExpNoteList
;
47 typedef std::shared_ptr
< XclExpNoteList
> XclExpNoteListRef
;
49 XclExpRecordList
<> aRecList
;
50 XclExpCellTableRef mxCellTable
;
52 SCTAB mnScTab
; // table number SC document
53 sal_uInt16 nExcTab
; // table number Excel document
55 NameBuffer
* pTabNames
;
57 XclExpNoteListRef mxNoteList
;
59 // re-create and forget pRec; delete is done by ExcTable itself!
60 void Add( XclExpRecordBase
* pRec
);
63 ExcTable( const XclExpRoot
& rRoot
);
64 ExcTable( const XclExpRoot
& rRoot
, SCTAB nScTab
);
67 void FillAsHeaderBinary( ExcBoundsheetList
& rBoundsheetList
);
68 void FillAsHeaderXml( ExcBoundsheetList
& rBoundsheetList
);
70 void FillAsTableBinary( SCTAB nCodeNameIdx
);
71 void FillAsTableXml();
73 void FillAsEmptyTable( SCTAB nCodeNameIdx
);
75 void Write( XclExpStream
& );
76 void WriteXml( XclExpXmlStream
& );
79 class ExcDocument
: protected XclExpRoot
81 friend class ExcTable
;
84 typedef XclExpRecordList
< ExcTable
> ExcTableList
;
85 typedef ExcTableList::RecordRefType ExcTableRef
;
86 typedef XclExpRecordList
< ExcBundlesheetBase
> ExcBoundsheetList
;
87 typedef ExcBoundsheetList::RecordRefType ExcBoundsheetRef
;
91 ExcTableList maTableList
;
92 ExcBoundsheetList maBoundsheetList
;
94 XclExpChangeTrack
* pExpChangeTrack
;
97 explicit ExcDocument( const XclExpRoot
& rRoot
);
98 virtual ~ExcDocument();
101 void Write( SvStream
& rSvStrm
);
102 void WriteXml( XclExpXmlStream
& );
107 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */