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 INCLUDED_SC_SOURCE_FILTER_INC_XEPAGE_HXX
21 : #define INCLUDED_SC_SOURCE_FILTER_INC_XEPAGE_HXX
22 :
23 : #include "xerecord.hxx"
24 : #include "xlpage.hxx"
25 : #include "xeroot.hxx"
26 :
27 : class XclExpImgData;
28 :
29 : // Page settings records ======================================================
30 :
31 : // Header/footer --------------------------------------------------------------
32 :
33 : /** Represents a HEADER or FOOTER record. */
34 262 : class XclExpHeaderFooter : public XclExpRecord
35 : {
36 : public:
37 : explicit XclExpHeaderFooter( sal_uInt16 nRecId, const OUString& rHdrString );
38 :
39 : virtual void SaveXml( XclExpXmlStream& rStrm ) SAL_OVERRIDE;
40 : private:
41 : /** Writes the header or footer string. Writes an empty record, if no header/footer present. */
42 : virtual void WriteBody( XclExpStream& rStrm ) SAL_OVERRIDE;
43 :
44 : private:
45 : OUString maHdrString; /// Header or footer contents.
46 : };
47 :
48 : // General page settings ------------------------------------------------------
49 :
50 : /** Represents a SETUP record that contains common page settings. */
51 131 : class XclExpSetup : public XclExpRecord
52 : {
53 : public:
54 : explicit XclExpSetup( const XclPageData& rPageData );
55 :
56 : virtual void SaveXml( XclExpXmlStream& rStrm ) SAL_OVERRIDE;
57 : private:
58 : /** Writes the contents of the SETUP record. */
59 : virtual void WriteBody( XclExpStream& rStrm ) SAL_OVERRIDE;
60 :
61 : private:
62 : const XclPageData& mrData; /// Page settings data of current sheet.
63 : };
64 :
65 : // Manual page breaks ---------------------------------------------------------
66 :
67 : /** Stores an array of manual page breaks for columns or rows. */
68 258 : class XclExpPageBreaks : public XclExpRecord
69 : {
70 : public:
71 : explicit XclExpPageBreaks(
72 : sal_uInt16 nRecId,
73 : const ScfUInt16Vec& rPageBreaks,
74 : sal_uInt16 nMaxPos );
75 :
76 : /** Writes the record, if the list is not empty. */
77 : virtual void Save( XclExpStream& rStrm ) SAL_OVERRIDE;
78 : virtual void SaveXml( XclExpXmlStream& rStrm ) SAL_OVERRIDE;
79 :
80 : private:
81 : /** Writes the page break list. */
82 : virtual void WriteBody( XclExpStream& rStrm ) SAL_OVERRIDE;
83 :
84 : private:
85 : const ScfUInt16Vec& mrPageBreaks; /// Page settings data of current sheet.
86 : sal_uInt16 mnMaxPos; /// Maximum row/column for BIFF8 page breaks.
87 : };
88 :
89 : // Page settings ==============================================================
90 :
91 : /** Contains all page (print) settings records for a single sheet. */
92 258 : class XclExpPageSettings : public XclExpRecordBase, protected XclExpRoot
93 : {
94 : public:
95 : /** Creates all records containing the current page settings. */
96 : explicit XclExpPageSettings( const XclExpRoot& rRoot );
97 :
98 : /** Returns read-only access to the page data. */
99 129 : inline const XclPageData& GetPageData() const { return maData; }
100 :
101 : /** Writes all page settings records to the stream. */
102 : virtual void Save( XclExpStream& rStrm ) SAL_OVERRIDE;
103 : virtual void SaveXml( XclExpXmlStream& rStrm ) SAL_OVERRIDE;
104 :
105 : XclExpImgData* getGraphicExport();
106 :
107 : private:
108 : XclPageData maData; /// Page settings data.
109 : };
110 :
111 : /** Contains all page (print) settings records for a chart object. */
112 52 : class XclExpChartPageSettings : public XclExpRecordBase, protected XclExpRoot
113 : {
114 : public:
115 : /** Creates all records containing the current page settings. */
116 : explicit XclExpChartPageSettings( const XclExpRoot& rRoot );
117 :
118 : /** Returns read-only access to the page data. */
119 : inline const XclPageData& GetPageData() const { return maData; }
120 :
121 : /** Writes all page settings records to the stream. */
122 : virtual void Save( XclExpStream& rStrm ) SAL_OVERRIDE;
123 :
124 : private:
125 : XclPageData maData; /// Page settings data.
126 : };
127 :
128 : #endif
129 :
130 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|