Version 6.4.0.3, tag libreoffice-6.4.0.3
[LibreOffice.git] / sc / source / filter / inc / xepage.hxx
blobb7747c2e907779aa02a35c52411cd85780d0258e
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_SC_SOURCE_FILTER_INC_XEPAGE_HXX
21 #define INCLUDED_SC_SOURCE_FILTER_INC_XEPAGE_HXX
23 #include "xerecord.hxx"
24 #include "xlpage.hxx"
25 #include "xeroot.hxx"
27 class XclExpImgData;
29 // Page settings records ======================================================
31 // Header/footer --------------------------------------------------------------
33 /** Represents a HEADER or FOOTER record. */
34 class XclExpHeaderFooter : public XclExpRecord
36 public:
37 explicit XclExpHeaderFooter( sal_uInt16 nRecId, const OUString& rHdrString );
39 virtual void SaveXml( XclExpXmlStream& rStrm ) 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 ) override;
44 private:
45 OUString const maHdrString; /// Header or footer contents.
48 // General page settings ------------------------------------------------------
50 /** Represents a SETUP record that contains common page settings. */
51 class XclExpSetup : public XclExpRecord
53 public:
54 explicit XclExpSetup( const XclPageData& rPageData );
56 virtual void SaveXml( XclExpXmlStream& rStrm ) override;
57 private:
58 /** Writes the contents of the SETUP record. */
59 virtual void WriteBody( XclExpStream& rStrm ) override;
61 private:
62 const XclPageData& mrData; /// Page settings data of current sheet.
65 // Manual page breaks ---------------------------------------------------------
67 /** Stores an array of manual page breaks for columns or rows. */
68 class XclExpPageBreaks : public XclExpRecord
70 public:
71 explicit XclExpPageBreaks(
72 sal_uInt16 nRecId,
73 const ScfUInt16Vec& rPageBreaks,
74 sal_uInt16 nMaxPos );
76 /** Writes the record, if the list is not empty. */
77 virtual void Save( XclExpStream& rStrm ) override;
78 virtual void SaveXml( XclExpXmlStream& rStrm ) override;
80 private:
81 /** Writes the page break list. */
82 virtual void WriteBody( XclExpStream& rStrm ) override;
84 private:
85 const ScfUInt16Vec& mrPageBreaks; /// Page settings data of current sheet.
86 sal_uInt16 const mnMaxPos; /// Maximum row/column for BIFF8 page breaks.
89 // Page settings ==============================================================
91 /** Contains all page (print) settings records for a single sheet. */
92 class XclExpPageSettings : public XclExpRecordBase, protected XclExpRoot
94 public:
95 /** Creates all records containing the current page settings. */
96 explicit XclExpPageSettings( const XclExpRoot& rRoot );
98 /** Returns read-only access to the page data. */
99 const XclPageData& GetPageData() const { return maData; }
101 /** Writes all page settings records to the stream. */
102 virtual void Save( XclExpStream& rStrm ) override;
103 virtual void SaveXml( XclExpXmlStream& rStrm ) override;
105 XclExpImgData* getGraphicExport();
107 private:
108 XclPageData maData; /// Page settings data.
111 /** Contains all page (print) settings records for a chart object. */
112 class XclExpChartPageSettings : public XclExpRecordBase, protected XclExpRoot
114 public:
115 /** Creates all records containing the current page settings. */
116 explicit XclExpChartPageSettings( const XclExpRoot& rRoot );
118 /** Writes all page settings records to the stream. */
119 virtual void Save( XclExpStream& rStrm ) override;
121 private:
122 XclPageData maData; /// Page settings data.
125 #endif
127 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */