1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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"
29 // Page settings records ======================================================
31 // Header/footer --------------------------------------------------------------
33 /** Represents a HEADER or FOOTER record. */
34 class XclExpHeaderFooter
: public XclExpRecord
37 explicit XclExpHeaderFooter( sal_uInt16 nRecId
, const OUString
& rHdrString
);
39 virtual void SaveXml( XclExpXmlStream
& rStrm
) override
;
41 /** Writes the header or footer string. Writes an empty record, if no header/footer present. */
42 virtual void WriteBody( XclExpStream
& rStrm
) override
;
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
54 explicit XclExpSetup( const XclPageData
& rPageData
);
56 virtual void SaveXml( XclExpXmlStream
& rStrm
) override
;
58 /** Writes the contents of the SETUP record. */
59 virtual void WriteBody( XclExpStream
& rStrm
) override
;
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
71 explicit XclExpPageBreaks(
73 const ScfUInt16Vec
& rPageBreaks
,
76 /** Writes the record, if the list is not empty. */
77 virtual void Save( XclExpStream
& rStrm
) override
;
78 virtual void SaveXml( XclExpXmlStream
& rStrm
) override
;
81 /** Writes the page break list. */
82 virtual void WriteBody( XclExpStream
& rStrm
) override
;
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
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();
108 XclPageData maData
; /// Page settings data.
111 /** Contains all page (print) settings records for a chart object. */
112 class XclExpChartPageSettings
: public XclExpRecordBase
, protected XclExpRoot
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
;
122 XclPageData maData
; /// Page settings data.
127 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */