Version 7.5.1.1, tag libreoffice-7.5.1.1
[LibreOffice.git] / sc / source / filter / inc / xepage.hxx
blob97100c125beb5ec23df2fc276716c2baf51e61fe
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 #pragma once
22 #include "xerecord.hxx"
23 #include "xlpage.hxx"
24 #include "xeroot.hxx"
26 class XclExpImgData;
28 // Page settings records ======================================================
30 // Header/footer --------------------------------------------------------------
32 /** Represents a HEADER or FOOTER record. */
33 class XclExpHeaderFooter : public XclExpRecord
35 public:
36 explicit XclExpHeaderFooter( sal_uInt16 nRecId, OUString aHdrString );
38 virtual void SaveXml( XclExpXmlStream& rStrm ) override;
39 private:
40 /** Writes the header or footer string. Writes an empty record, if no header/footer present. */
41 virtual void WriteBody( XclExpStream& rStrm ) override;
43 private:
44 OUString maHdrString; /// Header or footer contents.
47 // General page settings ------------------------------------------------------
49 /** Represents a SETUP record that contains common page settings. */
50 class XclExpSetup : public XclExpRecord
52 public:
53 explicit XclExpSetup( const XclPageData& rPageData );
55 virtual void SaveXml( XclExpXmlStream& rStrm ) override;
56 private:
57 /** Writes the contents of the SETUP record. */
58 virtual void WriteBody( XclExpStream& rStrm ) override;
60 private:
61 const XclPageData& mrData; /// Page settings data of current sheet.
64 // Manual page breaks ---------------------------------------------------------
66 /** Stores an array of manual page breaks for columns or rows. */
67 class XclExpPageBreaks : public XclExpRecord
69 public:
70 explicit XclExpPageBreaks(
71 sal_uInt16 nRecId,
72 const ScfUInt16Vec& rPageBreaks,
73 sal_uInt16 nMaxPos );
75 /** Writes the record, if the list is not empty. */
76 virtual void Save( XclExpStream& rStrm ) override;
77 virtual void SaveXml( XclExpXmlStream& rStrm ) override;
79 private:
80 /** Writes the page break list. */
81 virtual void WriteBody( XclExpStream& rStrm ) override;
83 private:
84 const ScfUInt16Vec& mrPageBreaks; /// Page settings data of current sheet.
85 sal_uInt16 mnMaxPos; /// Maximum row/column for BIFF8 page breaks.
88 // Page settings ==============================================================
90 /** Contains all page (print) settings records for a single sheet. */
91 class XclExpPageSettings : public XclExpRecordBase, protected XclExpRoot
93 public:
94 /** Creates all records containing the current page settings. */
95 explicit XclExpPageSettings( const XclExpRoot& rRoot );
97 /** Returns read-only access to the page data. */
98 const XclPageData& GetPageData() const { return maData; }
100 /** Writes all page settings records to the stream. */
101 virtual void Save( XclExpStream& rStrm ) override;
102 virtual void SaveXml( XclExpXmlStream& rStrm ) override;
104 XclExpImgData* getGraphicExport();
106 private:
107 XclPageData maData; /// Page settings data.
110 /** Contains all page (print) settings records for a chart object. */
111 class XclExpChartPageSettings : public XclExpRecordBase, protected XclExpRoot
113 public:
114 /** Creates all records containing the current page settings. */
115 explicit XclExpChartPageSettings( const XclExpRoot& rRoot );
117 /** Writes all page settings records to the stream. */
118 virtual void Save( XclExpStream& rStrm ) override;
120 private:
121 XclPageData maData; /// Page settings data.
124 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */