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 $
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 ************************************************************************/
34 #include <tools/solar.h>
35 #include "excrecds.hxx"
39 //------------------------------------------------------------------ Forwards -
43 class ScHorizontalCellIterator
;
49 class XclExpChangeTrack
;
52 //------------------------------------------------------------ class ExcTable -
54 class XclExpCellTable
;
56 class ExcTable
: public XclExpRecordBase
, public XclExpRoot
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
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
);
78 ExcTable( const XclExpRoot
& rRoot
);
79 ExcTable( const XclExpRoot
& rRoot
, SCTAB nScTab
);
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
;
98 typedef XclExpRecordList
< ExcTable
> ExcTableList
;
99 typedef ExcTableList::RecordRefType ExcTableRef
;
100 typedef XclExpRecordList
< ExcBundlesheetBase
> ExcBoundsheetList
;
101 typedef ExcBoundsheetList::RecordRefType ExcBoundsheetRef
;
105 ExcTableList maTableList
;
106 ExcBoundsheetList maBoundsheetList
;
108 XclExpChangeTrack
* pExpChangeTrack
;
111 explicit ExcDocument( const XclExpRoot
& rRoot
);
112 virtual ~ExcDocument();
114 void ReadDoc( void );
115 void Write( SvStream
& rSvStrm
);
116 void WriteXml( SvStream
& rSvStrm
);