merged tag ooo/OOO330_m14
[LibreOffice.git] / sc / source / filter / inc / xepage.hxx
blobb9454a3cdb3cda3ceda61801f60115e92dfd2043
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
28 #ifndef SC_XEPAGE_HXX
29 #define SC_XEPAGE_HXX
31 #include "xerecord.hxx"
32 #include "xlpage.hxx"
33 #include "xeroot.hxx"
35 // Page settings records ======================================================
37 // Header/footer --------------------------------------------------------------
39 /** Represents a HEADER or FOOTER record. */
40 class XclExpHeaderFooter : public XclExpRecord
42 public:
43 explicit XclExpHeaderFooter( sal_uInt16 nRecId, const String& rHdrString );
45 virtual void SaveXml( XclExpXmlStream& rStrm );
46 private:
47 /** Writes the header or footer string. Writes an empty record, if no header/footer present. */
48 virtual void WriteBody( XclExpStream& rStrm );
50 private:
51 String maHdrString; /// Header or footer contents.
54 // General page settings ------------------------------------------------------
56 /** Represents a SETUP record that contains common page settings. */
57 class XclExpSetup : public XclExpRecord
59 public:
60 explicit XclExpSetup( const XclPageData& rPageData );
62 virtual void SaveXml( XclExpXmlStream& rStrm );
63 private:
64 /** Writes the contents of the SETUP record. */
65 virtual void WriteBody( XclExpStream& rStrm );
67 private:
68 const XclPageData& mrData; /// Page settings data of current sheet.
71 // Manual page breaks ---------------------------------------------------------
73 /** Stores an array of manual page breaks for columns or rows. */
74 class XclExpPageBreaks : public XclExpRecord
76 public:
77 explicit XclExpPageBreaks(
78 sal_uInt16 nRecId,
79 const ScfUInt16Vec& rPageBreaks,
80 sal_uInt16 nMaxPos );
82 /** Writes the record, if the list is not empty. */
83 virtual void Save( XclExpStream& rStrm );
84 virtual void SaveXml( XclExpXmlStream& rStrm );
86 private:
87 /** Writes the page break list. */
88 virtual void WriteBody( XclExpStream& rStrm );
90 private:
91 const ScfUInt16Vec& mrPageBreaks; /// Page settings data of current sheet.
92 sal_uInt16 mnMaxPos; /// Maximum row/column for BIFF8 page breaks.
95 // Page settings ==============================================================
97 /** Contains all page (print) settings records for a single sheet. */
98 class XclExpPageSettings : public XclExpRecordBase, protected XclExpRoot
100 public:
101 /** Creates all records containing the current page settings. */
102 explicit XclExpPageSettings( const XclExpRoot& rRoot );
104 /** Returns read-only access to the page data. */
105 inline const XclPageData& GetPageData() const { return maData; }
107 /** Writes all page settings records to the stream. */
108 virtual void Save( XclExpStream& rStrm );
109 virtual void SaveXml( XclExpXmlStream& rStrm );
111 private:
112 XclPageData maData; /// Page settings data.
115 // ----------------------------------------------------------------------------
117 /** Contains all page (print) settings records for a chart object. */
118 class XclExpChartPageSettings : public XclExpRecordBase, protected XclExpRoot
120 public:
121 /** Creates all records containing the current page settings. */
122 explicit XclExpChartPageSettings( const XclExpRoot& rRoot );
124 /** Returns read-only access to the page data. */
125 inline const XclPageData& GetPageData() const { return maData; }
127 /** Writes all page settings records to the stream. */
128 virtual void Save( XclExpStream& rStrm );
130 private:
131 XclPageData maData; /// Page settings data.
134 // ============================================================================
136 #endif