merge the formfield patch from ooo-build
[ooovba.git] / sc / source / filter / inc / excdoc.hxx
blob3330335094ece8ab8db3c1612b09e828c1aa8d6b
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: excdoc.hxx,v $
10 * $Revision: 1.19 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef SC_EXCDOC_HXX
32 #define SC_EXCDOC_HXX
34 #include <tools/solar.h>
35 #include "excrecds.hxx"
36 #include "xeroot.hxx"
37 #include "root.hxx"
39 //------------------------------------------------------------------ Forwards -
41 class SvStream;
42 class ScBaseCell;
43 class ScHorizontalCellIterator;
44 class ScDocument;
45 class ScProgress;
47 class NameBuffer;
49 class XclExpChangeTrack;
52 //------------------------------------------------------------ class ExcTable -
54 class XclExpCellTable;
56 class ExcTable : public XclExpRecordBase, public XclExpRoot
58 private:
59 typedef XclExpRecordList< ExcBundlesheetBase > ExcBoundsheetList;
60 typedef ScfRef< XclExpCellTable > XclExpCellTableRef;
62 XclExpRecordList<> aRecList;
63 XclExpCellTableRef mxCellTable;
65 SCTAB mnScTab; // table number SC document
66 UINT16 nExcTab; // table number Excel document
67 UINT16 nAktRow; // fuer'n Iterator
68 UINT16 nAktCol;
70 NameBuffer* pTabNames;
72 // pRec mit new anlegen und vergessen, delete macht ExcTable selber!
73 void Add( XclExpRecordBase* pRec );
75 void FillAsXmlTable( size_t nCodeNameIdx );
77 public:
78 ExcTable( const XclExpRoot& rRoot );
79 ExcTable( const XclExpRoot& rRoot, SCTAB nScTab );
80 ~ExcTable();
82 void FillAsHeader( ExcBoundsheetList& rBoundsheetList );
83 void FillAsTable( size_t nCodeNameIdx );
84 void FillAsEmptyTable( size_t nCodeNameIdx );
86 void Write( XclExpStream& );
87 void WriteXml( XclExpXmlStream& );
91 //--------------------------------------------------------- class ExcDocument -
93 class ExcDocument : protected XclExpRoot
95 friend class ExcTable;
97 private:
98 typedef XclExpRecordList< ExcTable > ExcTableList;
99 typedef ExcTableList::RecordRefType ExcTableRef;
100 typedef XclExpRecordList< ExcBundlesheetBase > ExcBoundsheetList;
101 typedef ExcBoundsheetList::RecordRefType ExcBoundsheetRef;
103 ExcTable aHeader;
105 ExcTableList maTableList;
106 ExcBoundsheetList maBoundsheetList;
108 XclExpChangeTrack* pExpChangeTrack;
110 public:
111 explicit ExcDocument( const XclExpRoot& rRoot );
112 virtual ~ExcDocument();
114 void ReadDoc( void );
115 void Write( SvStream& rSvStrm );
116 void WriteXml( SvStream& rSvStrm );
122 #endif