Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*
3 : : * This file is part of the LibreOffice project.
4 : : *
5 : : * This Source Code Form is subject to the terms of the Mozilla Public
6 : : * License, v. 2.0. If a copy of the MPL was not distributed with this
7 : : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 : : *
9 : : * This file incorporates work covered by the following license notice:
10 : : *
11 : : * Licensed to the Apache Software Foundation (ASF) under one or more
12 : : * contributor license agreements. See the NOTICE file distributed
13 : : * with this work for additional information regarding copyright
14 : : * ownership. The ASF licenses this file to you under the Apache
15 : : * License, Version 2.0 (the "License"); you may not use this file
16 : : * except in compliance with the License. You may obtain a copy of
17 : : * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 : : */
19 : :
20 : : #ifndef SC_XEPAGE_HXX
21 : : #define SC_XEPAGE_HXX
22 : :
23 : : #include "xerecord.hxx"
24 : : #include "xlpage.hxx"
25 : : #include "xeroot.hxx"
26 : :
27 : : // Page settings records ======================================================
28 : :
29 : : // Header/footer --------------------------------------------------------------
30 : :
31 : : /** Represents a HEADER or FOOTER record. */
32 [ # # ][ # # ]: 0 : class XclExpHeaderFooter : public XclExpRecord
33 : : {
34 : : public:
35 : : explicit XclExpHeaderFooter( sal_uInt16 nRecId, const String& rHdrString );
36 : :
37 : : virtual void SaveXml( XclExpXmlStream& rStrm );
38 : : private:
39 : : /** Writes the header or footer string. Writes an empty record, if no header/footer present. */
40 : : virtual void WriteBody( XclExpStream& rStrm );
41 : :
42 : : private:
43 : : String maHdrString; /// Header or footer contents.
44 : : };
45 : :
46 : : // General page settings ------------------------------------------------------
47 : :
48 : : /** Represents a SETUP record that contains common page settings. */
49 [ # # ]: 0 : class XclExpSetup : public XclExpRecord
50 : : {
51 : : public:
52 : : explicit XclExpSetup( const XclPageData& rPageData );
53 : :
54 : : virtual void SaveXml( XclExpXmlStream& rStrm );
55 : : private:
56 : : /** Writes the contents of the SETUP record. */
57 : : virtual void WriteBody( XclExpStream& rStrm );
58 : :
59 : : private:
60 : : const XclPageData& mrData; /// Page settings data of current sheet.
61 : : };
62 : :
63 : : // Manual page breaks ---------------------------------------------------------
64 : :
65 : : /** Stores an array of manual page breaks for columns or rows. */
66 [ # # ]: 0 : class XclExpPageBreaks : public XclExpRecord
67 : : {
68 : : public:
69 : : explicit XclExpPageBreaks(
70 : : sal_uInt16 nRecId,
71 : : const ScfUInt16Vec& rPageBreaks,
72 : : sal_uInt16 nMaxPos );
73 : :
74 : : /** Writes the record, if the list is not empty. */
75 : : virtual void Save( XclExpStream& rStrm );
76 : : virtual void SaveXml( XclExpXmlStream& rStrm );
77 : :
78 : : private:
79 : : /** Writes the page break list. */
80 : : virtual void WriteBody( XclExpStream& rStrm );
81 : :
82 : : private:
83 : : const ScfUInt16Vec& mrPageBreaks; /// Page settings data of current sheet.
84 : : sal_uInt16 mnMaxPos; /// Maximum row/column for BIFF8 page breaks.
85 : : };
86 : :
87 : : // Page settings ==============================================================
88 : :
89 : : /** Contains all page (print) settings records for a single sheet. */
90 [ # # ][ # # ]: 0 : class XclExpPageSettings : public XclExpRecordBase, protected XclExpRoot
[ # # ]
91 : : {
92 : : public:
93 : : /** Creates all records containing the current page settings. */
94 : : explicit XclExpPageSettings( const XclExpRoot& rRoot );
95 : :
96 : : /** Returns read-only access to the page data. */
97 : 0 : inline const XclPageData& GetPageData() const { return maData; }
98 : :
99 : : /** Writes all page settings records to the stream. */
100 : : virtual void Save( XclExpStream& rStrm );
101 : : virtual void SaveXml( XclExpXmlStream& rStrm );
102 : :
103 : : private:
104 : : XclPageData maData; /// Page settings data.
105 : : };
106 : :
107 : : // ----------------------------------------------------------------------------
108 : :
109 : : /** Contains all page (print) settings records for a chart object. */
110 [ # # ][ # # ]: 0 : class XclExpChartPageSettings : public XclExpRecordBase, protected XclExpRoot
[ # # ]
111 : : {
112 : : public:
113 : : /** Creates all records containing the current page settings. */
114 : : explicit XclExpChartPageSettings( const XclExpRoot& rRoot );
115 : :
116 : : /** Returns read-only access to the page data. */
117 : : inline const XclPageData& GetPageData() const { return maData; }
118 : :
119 : : /** Writes all page settings records to the stream. */
120 : : virtual void Save( XclExpStream& rStrm );
121 : :
122 : : private:
123 : : XclPageData maData; /// Page settings data.
124 : : };
125 : :
126 : : // ============================================================================
127 : :
128 : : #endif
129 : :
130 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|