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 .
22 #include "xerecord.hxx"
28 // Page settings records ======================================================
30 // Header/footer --------------------------------------------------------------
32 /** Represents a HEADER or FOOTER record. */
33 class XclExpHeaderFooter
: public XclExpRecord
36 explicit XclExpHeaderFooter( sal_uInt16 nRecId
, OUString aHdrString
);
38 virtual void SaveXml( XclExpXmlStream
& rStrm
) override
;
40 /** Writes the header or footer string. Writes an empty record, if no header/footer present. */
41 virtual void WriteBody( XclExpStream
& rStrm
) override
;
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
53 explicit XclExpSetup( const XclPageData
& rPageData
);
55 virtual void SaveXml( XclExpXmlStream
& rStrm
) override
;
57 /** Writes the contents of the SETUP record. */
58 virtual void WriteBody( XclExpStream
& rStrm
) override
;
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
70 explicit XclExpPageBreaks(
72 const ScfUInt16Vec
& rPageBreaks
,
75 /** Writes the record, if the list is not empty. */
76 virtual void Save( XclExpStream
& rStrm
) override
;
77 virtual void SaveXml( XclExpXmlStream
& rStrm
) override
;
80 /** Writes the page break list. */
81 virtual void WriteBody( XclExpStream
& rStrm
) override
;
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
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();
107 XclPageData maData
; /// Page settings data.
110 /** Contains all page (print) settings records for a chart object. */
111 class XclExpChartPageSettings
: public XclExpRecordBase
, protected XclExpRoot
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
;
121 XclPageData maData
; /// Page settings data.
124 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */