update dev300-m58
[ooovba.git] / sc / source / filter / inc / xepage.hxx
blob3e119d3e4c1af7de4785b168a712286ddec56c33
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: xepage.hxx,v $
10 * $Revision: 1.6.90.1 $
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_XEPAGE_HXX
32 #define SC_XEPAGE_HXX
34 #include "xerecord.hxx"
35 #include "xlpage.hxx"
36 #include "xeroot.hxx"
38 // Page settings records ======================================================
40 // Header/footer --------------------------------------------------------------
42 /** Represents a HEADER or FOOTER record. */
43 class XclExpHeaderFooter : public XclExpRecord
45 public:
46 explicit XclExpHeaderFooter( sal_uInt16 nRecId, const String& rHdrString );
48 virtual void SaveXml( XclExpXmlStream& rStrm );
49 private:
50 /** Writes the header or footer string. Writes an empty record, if no header/footer present. */
51 virtual void WriteBody( XclExpStream& rStrm );
53 private:
54 String maHdrString; /// Header or footer contents.
57 // General page settings ------------------------------------------------------
59 /** Represents a SETUP record that contains common page settings. */
60 class XclExpSetup : public XclExpRecord
62 public:
63 explicit XclExpSetup( const XclPageData& rPageData );
65 virtual void SaveXml( XclExpXmlStream& rStrm );
66 private:
67 /** Writes the contents of the SETUP record. */
68 virtual void WriteBody( XclExpStream& rStrm );
70 private:
71 const XclPageData& mrData; /// Page settings data of current sheet.
74 // Manual page breaks ---------------------------------------------------------
76 /** Stores an array of manual page breaks for columns or rows. */
77 class XclExpPageBreaks : public XclExpRecord
79 public:
80 explicit XclExpPageBreaks(
81 sal_uInt16 nRecId,
82 const ScfUInt16Vec& rPageBreaks,
83 sal_uInt16 nMaxPos );
85 /** Writes the record, if the list is not empty. */
86 virtual void Save( XclExpStream& rStrm );
87 virtual void SaveXml( XclExpXmlStream& rStrm );
89 private:
90 /** Writes the page break list. */
91 virtual void WriteBody( XclExpStream& rStrm );
93 private:
94 const ScfUInt16Vec& mrPageBreaks; /// Page settings data of current sheet.
95 sal_uInt16 mnMaxPos; /// Maximum row/column for BIFF8 page breaks.
98 // Page settings ==============================================================
100 /** Contains all page (print) settings records for a single sheet. */
101 class XclExpPageSettings : public XclExpRecordBase, protected XclExpRoot
103 public:
104 /** Creates all records containing the current page settings. */
105 explicit XclExpPageSettings( const XclExpRoot& rRoot );
107 /** Returns read-only access to the page data. */
108 inline const XclPageData& GetPageData() const { return maData; }
110 /** Writes all page settings records to the stream. */
111 virtual void Save( XclExpStream& rStrm );
112 virtual void SaveXml( XclExpXmlStream& rStrm );
114 private:
115 XclPageData maData; /// Page settings data.
118 // ----------------------------------------------------------------------------
120 /** Contains all page (print) settings records for a chart object. */
121 class XclExpChartPageSettings : public XclExpRecordBase, protected XclExpRoot
123 public:
124 /** Creates all records containing the current page settings. */
125 explicit XclExpChartPageSettings( const XclExpRoot& rRoot );
127 /** Returns read-only access to the page data. */
128 inline const XclPageData& GetPageData() const { return maData; }
130 /** Writes all page settings records to the stream. */
131 virtual void Save( XclExpStream& rStrm );
133 private:
134 XclPageData maData; /// Page settings data.
137 // ============================================================================
139 #endif