xref: /aoo41x/main/sc/source/filter/inc/xepage.hxx (revision 38d50f7b)
1*38d50f7bSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*38d50f7bSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*38d50f7bSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*38d50f7bSAndrew Rist  * distributed with this work for additional information
6*38d50f7bSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*38d50f7bSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*38d50f7bSAndrew Rist  * "License"); you may not use this file except in compliance
9*38d50f7bSAndrew Rist  * with the License.  You may obtain a copy of the License at
10*38d50f7bSAndrew Rist  *
11*38d50f7bSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*38d50f7bSAndrew Rist  *
13*38d50f7bSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*38d50f7bSAndrew Rist  * software distributed under the License is distributed on an
15*38d50f7bSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*38d50f7bSAndrew Rist  * KIND, either express or implied.  See the License for the
17*38d50f7bSAndrew Rist  * specific language governing permissions and limitations
18*38d50f7bSAndrew Rist  * under the License.
19*38d50f7bSAndrew Rist  *
20*38d50f7bSAndrew Rist  *************************************************************/
21*38d50f7bSAndrew Rist 
22*38d50f7bSAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef SC_XEPAGE_HXX
25cdf0e10cSrcweir #define SC_XEPAGE_HXX
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #include "xerecord.hxx"
28cdf0e10cSrcweir #include "xlpage.hxx"
29cdf0e10cSrcweir #include "xeroot.hxx"
30cdf0e10cSrcweir 
31cdf0e10cSrcweir // Page settings records ======================================================
32cdf0e10cSrcweir 
33cdf0e10cSrcweir // Header/footer --------------------------------------------------------------
34cdf0e10cSrcweir 
35cdf0e10cSrcweir /** Represents a HEADER or FOOTER record. */
36cdf0e10cSrcweir class XclExpHeaderFooter : public XclExpRecord
37cdf0e10cSrcweir {
38cdf0e10cSrcweir public:
39cdf0e10cSrcweir     explicit            XclExpHeaderFooter( sal_uInt16 nRecId, const String& rHdrString );
40cdf0e10cSrcweir 
41cdf0e10cSrcweir     virtual void        SaveXml( XclExpXmlStream& rStrm );
42cdf0e10cSrcweir private:
43cdf0e10cSrcweir     /** Writes the header or footer string. Writes an empty record, if no header/footer present. */
44cdf0e10cSrcweir     virtual void        WriteBody( XclExpStream& rStrm );
45cdf0e10cSrcweir 
46cdf0e10cSrcweir private:
47cdf0e10cSrcweir     String              maHdrString;        /// Header or footer contents.
48cdf0e10cSrcweir };
49cdf0e10cSrcweir 
50cdf0e10cSrcweir // General page settings ------------------------------------------------------
51cdf0e10cSrcweir 
52cdf0e10cSrcweir /** Represents a SETUP record that contains common page settings. */
53cdf0e10cSrcweir class XclExpSetup : public XclExpRecord
54cdf0e10cSrcweir {
55cdf0e10cSrcweir public:
56cdf0e10cSrcweir     explicit            XclExpSetup( const XclPageData& rPageData );
57cdf0e10cSrcweir 
58cdf0e10cSrcweir     virtual void        SaveXml( XclExpXmlStream& rStrm );
59cdf0e10cSrcweir private:
60cdf0e10cSrcweir     /** Writes the contents of the SETUP record. */
61cdf0e10cSrcweir     virtual void        WriteBody( XclExpStream& rStrm );
62cdf0e10cSrcweir 
63cdf0e10cSrcweir private:
64cdf0e10cSrcweir     const XclPageData&  mrData;             /// Page settings data of current sheet.
65cdf0e10cSrcweir };
66cdf0e10cSrcweir 
67cdf0e10cSrcweir // Manual page breaks ---------------------------------------------------------
68cdf0e10cSrcweir 
69cdf0e10cSrcweir /** Stores an array of manual page breaks for columns or rows. */
70cdf0e10cSrcweir class XclExpPageBreaks : public XclExpRecord
71cdf0e10cSrcweir {
72cdf0e10cSrcweir public:
73cdf0e10cSrcweir     explicit            XclExpPageBreaks(
74cdf0e10cSrcweir                             sal_uInt16 nRecId,
75cdf0e10cSrcweir                             const ScfUInt16Vec& rPageBreaks,
76cdf0e10cSrcweir                             sal_uInt16 nMaxPos );
77cdf0e10cSrcweir 
78cdf0e10cSrcweir     /** Writes the record, if the list is not empty. */
79cdf0e10cSrcweir     virtual void        Save( XclExpStream& rStrm );
80cdf0e10cSrcweir     virtual void        SaveXml( XclExpXmlStream& rStrm );
81cdf0e10cSrcweir 
82cdf0e10cSrcweir private:
83cdf0e10cSrcweir     /** Writes the page break list. */
84cdf0e10cSrcweir     virtual void        WriteBody( XclExpStream& rStrm );
85cdf0e10cSrcweir 
86cdf0e10cSrcweir private:
87cdf0e10cSrcweir     const ScfUInt16Vec& mrPageBreaks;       /// Page settings data of current sheet.
88cdf0e10cSrcweir     sal_uInt16          mnMaxPos;           /// Maximum row/column for BIFF8 page breaks.
89cdf0e10cSrcweir };
90cdf0e10cSrcweir 
91cdf0e10cSrcweir // Page settings ==============================================================
92cdf0e10cSrcweir 
93cdf0e10cSrcweir /** Contains all page (print) settings records for a single sheet. */
94cdf0e10cSrcweir class XclExpPageSettings : public XclExpRecordBase, protected XclExpRoot
95cdf0e10cSrcweir {
96cdf0e10cSrcweir public:
97cdf0e10cSrcweir     /** Creates all records containing the current page settings. */
98cdf0e10cSrcweir     explicit            XclExpPageSettings( const XclExpRoot& rRoot );
99cdf0e10cSrcweir 
100cdf0e10cSrcweir     /** Returns read-only access to the page data. */
GetPageData() const101cdf0e10cSrcweir     inline const XclPageData& GetPageData() const { return maData; }
102cdf0e10cSrcweir 
103cdf0e10cSrcweir     /** Writes all page settings records to the stream. */
104cdf0e10cSrcweir     virtual void        Save( XclExpStream& rStrm );
105cdf0e10cSrcweir     virtual void        SaveXml( XclExpXmlStream& rStrm );
106cdf0e10cSrcweir 
107cdf0e10cSrcweir private:
108cdf0e10cSrcweir     XclPageData         maData;         /// Page settings data.
109cdf0e10cSrcweir };
110cdf0e10cSrcweir 
111cdf0e10cSrcweir // ----------------------------------------------------------------------------
112cdf0e10cSrcweir 
113cdf0e10cSrcweir /** Contains all page (print) settings records for a chart object. */
114cdf0e10cSrcweir class XclExpChartPageSettings : public XclExpRecordBase, protected XclExpRoot
115cdf0e10cSrcweir {
116cdf0e10cSrcweir public:
117cdf0e10cSrcweir     /** Creates all records containing the current page settings. */
118cdf0e10cSrcweir     explicit            XclExpChartPageSettings( const XclExpRoot& rRoot );
119cdf0e10cSrcweir 
120cdf0e10cSrcweir     /** Returns read-only access to the page data. */
GetPageData() const121cdf0e10cSrcweir     inline const XclPageData& GetPageData() const { return maData; }
122cdf0e10cSrcweir 
123cdf0e10cSrcweir     /** Writes all page settings records to the stream. */
124cdf0e10cSrcweir     virtual void        Save( XclExpStream& rStrm );
125cdf0e10cSrcweir 
126cdf0e10cSrcweir private:
127cdf0e10cSrcweir     XclPageData         maData;         /// Page settings data.
128cdf0e10cSrcweir };
129cdf0e10cSrcweir 
130cdf0e10cSrcweir // ============================================================================
131cdf0e10cSrcweir 
132cdf0e10cSrcweir #endif
133cdf0e10cSrcweir 
134