fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / sc / source / filter / inc / xlpage.hxx
blobf5333b96fcbf348d43bde662ac3f37e035b281c5
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_XLPAGE_HXX
21 #define INCLUDED_SC_SOURCE_FILTER_INC_XLPAGE_HXX
23 #include <tools/gen.hxx>
24 #include <boost/noncopyable.hpp>
25 #include "xltools.hxx"
27 // Constants and Enumerations =================================================
29 // (0x0014, 0x0015) HEADER, FOOTER --------------------------------------------
31 const sal_uInt16 EXC_ID_HEADER = 0x0014;
32 const sal_uInt16 EXC_ID_FOOTER = 0x0015;
34 // (0x001A, 0x001B) VERTICAL-, HORIZONTALPAGEBREAKS ---------------------------
36 const sal_uInt16 EXC_ID_VERPAGEBREAKS = 0x001A;
37 const sal_uInt16 EXC_ID_HORPAGEBREAKS = 0x001B;
39 // (0x0026, 0x0027, 0x0028, 0x0029) LEFT-, RIGHT-, TOP-, BOTTOMMARGIN ---------
41 const sal_uInt16 EXC_ID_LEFTMARGIN = 0x0026;
42 const sal_uInt16 EXC_ID_RIGHTMARGIN = 0x0027;
43 const sal_uInt16 EXC_ID_TOPMARGIN = 0x0028;
44 const sal_uInt16 EXC_ID_BOTTOMMARGIN = 0x0029;
46 const sal_Int32 EXC_MARGIN_DEFAULT_LR = 1900; /// Left/right default margin in 1/100mm.
47 const sal_Int32 EXC_MARGIN_DEFAULT_TB = 2500; /// Top/bottom default margin in 1/100mm.
48 const sal_Int32 EXC_MARGIN_DEFAULT_HF = 1300; /// Header/footer default margin in 1/100mm.
49 const sal_Int32 EXC_MARGIN_DEFAULT_HLR = 1900; /// Left/right header default margin in 1/100mm.
50 const sal_Int32 EXC_MARGIN_DEFAULT_FLR = 1900; /// Left/right footer default margin in 1/100mm.
52 // (0x002A, 0x002B) PRINTHEADERS, PRINTGRIDLINES ------------------------------
54 const sal_uInt16 EXC_ID_PRINTHEADERS = 0x002A;
55 const sal_uInt16 EXC_ID_PRINTGRIDLINES = 0x002B;
57 // (0x0033) PRINTSIZE ---------------------------------------------------------
59 const sal_uInt16 EXC_ID_PRINTSIZE = 0x0033;
61 const sal_uInt16 EXC_PRINTSIZE_SCREEN = 1;
62 const sal_uInt16 EXC_PRINTSIZE_PAGE = 2;
63 const sal_uInt16 EXC_PRINTSIZE_FULL = 3;
65 // (0x0082, 0x0083, 0x0084) GRIDSET, HCENTER, VCENTER -------------------------
67 const sal_uInt16 EXC_ID_GRIDSET = 0x0082;
68 const sal_uInt16 EXC_ID_HCENTER = 0x0083;
69 const sal_uInt16 EXC_ID_VCENTER = 0x0084;
71 // (0x00A1) SETUP -------------------------------------------------------------
73 const sal_uInt16 EXC_ID_SETUP = 0x00A1;
75 const sal_uInt16 EXC_SETUP_INROWS = 0x0001;
76 const sal_uInt16 EXC_SETUP_PORTRAIT = 0x0002;
77 const sal_uInt16 EXC_SETUP_INVALID = 0x0004;
78 const sal_uInt16 EXC_SETUP_BLACKWHITE = 0x0008;
79 const sal_uInt16 EXC_SETUP_DRAFT = 0x0010;
80 const sal_uInt16 EXC_SETUP_PRINTNOTES = 0x0020;
81 const sal_uInt16 EXC_SETUP_STARTPAGE = 0x0080;
82 const sal_uInt16 EXC_SETUP_NOTES_END = 0x0200;
84 const sal_uInt16 EXC_PAPERSIZE_DEFAULT = 0;
85 const sal_uInt16 EXC_PAPERSIZE_USER = 0xFFFF;
87 // Page settings ==============================================================
89 class SvxBrushItem;
91 /** Contains all page (print) settings for a single sheet. */
92 struct XclPageData : private boost::noncopyable
94 typedef ::std::unique_ptr< SvxBrushItem > SvxBrushItemPtr;
96 ScfUInt16Vec maHorPageBreaks; /// Horizontal page breaks.
97 ScfUInt16Vec maVerPageBreaks; /// Vertical page breaks.
98 SvxBrushItemPtr mxBrushItem; /// Background bitmap.
99 OUString maHeader; /// Excel header string (empty = off).
100 OUString maFooter; /// Excel footer string (empty = off).
101 double mfLeftMargin; /// Left margin in inches.
102 double mfRightMargin; /// Right margin in inches.
103 double mfTopMargin; /// Top margin in inches.
104 double mfBottomMargin; /// Bottom margin in inches.
105 double mfHeaderMargin; /// Margin main page to header.
106 double mfFooterMargin; /// Margin main page to footer.
107 double mfHdrLeftMargin; /// Left margin to header.
108 double mfHdrRightMargin; /// Right margin to header.
109 double mfFtrLeftMargin; /// Left margin to footer.
110 double mfFtrRightMargin; /// Right margin to footer.
111 sal_uInt16 mnPaperSize; /// Index into paper size table.
112 sal_uInt16 mnStrictPaperSize; /// Same as papersize - but for ooxml (considering stricter dimensions)
113 sal_uInt16 mnPaperWidth; /// Paper Width in mm
114 sal_uInt16 mnPaperHeight; /// Paper Height in mm
115 sal_uInt16 mnCopies; /// Number of copies.
116 sal_uInt16 mnStartPage; /// Start page number.
117 sal_uInt16 mnScaling; /// Scaling in percent.
118 sal_uInt16 mnFitToWidth; /// Fit to number of pages in width.
119 sal_uInt16 mnFitToHeight; /// Fit to number of pages in height.
120 sal_uInt16 mnHorPrintRes; /// Horizontal printing resolution.
121 sal_uInt16 mnVerPrintRes; /// Vertical printing resolution.
122 bool mbValid; /// false = some of the values are not valid.
123 bool mbPortrait; /// true = portrait; false = landscape.
124 bool mbPrintInRows; /// true = in rows; false = in columns.
125 bool mbBlackWhite; /// true = black/white; false = colors.
126 bool mbDraftQuality; /// true = draft; false = default quality.
127 bool mbPrintNotes; /// true = print notes.
128 bool mbManualStart; /// true = mnStartPage valid; false = automatic.
129 bool mbFitToPages; /// true = fit to pages; false = scale in percent.
130 bool mbHorCenter; /// true = centered horizontally; false = left aligned.
131 bool mbVerCenter; /// true = centered vertically; false = top aligned.
132 bool mbPrintHeadings; /// true = print column and row headings.
133 bool mbPrintGrid; /// true = print grid lines.
135 explicit XclPageData();
136 ~XclPageData();
138 /** Sets Excel default page settings. */
139 void SetDefaults();
141 /** Returns the real paper size (twips) from the paper size index and paper orientation. */
142 Size GetScPaperSize() const;
143 /** Sets the Excel paper size index and paper orientation from Calc paper size (twips). */
144 void SetScPaperSize( const Size& rSize, bool bPortrait, bool bStrict = false );
147 #endif
149 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */