LibreOffice Module sc (master) 1
xipage.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#include <xipage.hxx>
21#include <svl/itemset.hxx>
22#include <vcl/graph.hxx>
23#include <scitems.hxx>
24#include <svl/eitem.hxx>
25#include <svl/intitem.hxx>
26#include <svx/pageitem.hxx>
27#include <editeng/sizeitem.hxx>
28#include <editeng/lrspitem.hxx>
29#include <editeng/ulspitem.hxx>
30#include <editeng/brushitem.hxx>
32#include <document.hxx>
33#include <stlsheet.hxx>
34#include <attrib.hxx>
35#include <xistream.hxx>
36#include <xihelper.hxx>
37#include <xiescher.hxx>
38
39// Page settings ==============================================================
40
42 XclImpRoot( rRoot )
43{
44 Initialize();
45}
46
48{
50 mbValidPaper = false;
51}
52
54{
56 if( GetBiff() < EXC_BIFF4 )
57 return;
58
59 // BIFF4 - BIFF8
60 sal_uInt16 nFlags;
61 maData.mnPaperSize = rStrm.ReaduInt16();
62 maData.mnScaling = rStrm.ReaduInt16();
63 maData.mnStartPage = rStrm.ReaduInt16();
64 maData.mnFitToWidth = rStrm.ReaduInt16();
65 maData.mnFitToHeight = rStrm.ReaduInt16();
66 nFlags = rStrm.ReaduInt16();
67
72 maData.mbManualStart = true;
73
74 // new in BIFF5 - BIFF8
75 if( GetBiff() >= EXC_BIFF5 )
76 {
77 maData.mnHorPrintRes = rStrm.ReaduInt16();
78 maData.mnVerPrintRes = rStrm.ReaduInt16();
81 maData.mnCopies = rStrm.ReaduInt16();
82
86 }
87}
88
90{
91 switch( rStrm.GetRecId() )
92 {
97 default: OSL_FAIL( "XclImpPageSettings::ReadMargin - unknown record" );
98 }
99}
100
102{
103 OSL_ENSURE_BIFF( GetBiff() >= EXC_BIFF3 ); // read it anyway
104 bool bCenter = (rStrm.ReaduInt16() != 0);
105 switch( rStrm.GetRecId() )
106 {
107 case EXC_ID_HCENTER: maData.mbHorCenter = bCenter; break;
108 case EXC_ID_VCENTER: maData.mbVerCenter = bCenter; break;
109 default: OSL_FAIL( "XclImpPageSettings::ReadCenter - unknown record" );
110 }
111}
112
114{
115 OUString aString;
116 if( rStrm.GetRecLeft() )
117 aString = (GetBiff() <= EXC_BIFF5) ? rStrm.ReadByteString( false ) : rStrm.ReadUniString();
118
119 switch( rStrm.GetRecId() )
120 {
121 case EXC_ID_HEADER: maData.maHeader = aString; break;
122 case EXC_ID_FOOTER: maData.maFooter = aString; break;
123 case EXC_ID_HEADER_EVEN: maData.maHeaderEven = aString; break;
124 case EXC_ID_FOOTER_EVEN: maData.maFooterEven = aString; break;
125 default: OSL_FAIL( "XclImpPageSettings::ReadHeaderFooter - unknown record" );
126 }
127
129 {
130 if (maData.maHeader.getLength() > 10)
131 maData.maHeader = maData.maHeader.copy(0, 10);
132 if (maData.maFooter.getLength() > 10)
133 maData.maFooter = maData.maFooter.copy(0, 10);
134 if (maData.maHeaderEven.getLength() > 10)
136 if (maData.maFooterEven.getLength() > 10)
138 }
139}
140
142{
143 ScfUInt16Vec* pVec = nullptr;
144 switch( rStrm.GetRecId() )
145 {
146 case EXC_ID_HORPAGEBREAKS: pVec = &maData.maHorPageBreaks; break;
147 case EXC_ID_VERPAGEBREAKS: pVec = &maData.maVerPageBreaks; break;
148 default: OSL_FAIL( "XclImpPageSettings::ReadPageBreaks - unknown record" );
149 }
150
151 if( !pVec )
152 return;
153
154 bool bIgnore = GetBiff() == EXC_BIFF8; // ignore start/end columns or rows in BIFF8
155
156 sal_uInt16 nCount, nBreak;
157 nCount = rStrm.ReaduInt16();
158 pVec->clear();
159 pVec->reserve( nCount );
160
161 while( nCount-- )
162 {
163 nBreak = rStrm.ReaduInt16();
164 if( nBreak )
165 pVec->push_back( nBreak );
166 if( bIgnore )
167 rStrm.Ignore( 4 );
168 }
169}
170
172{
173 maData.mbPrintHeadings = (rStrm.ReaduInt16() != 0);
174}
175
177{
178 maData.mbPrintGrid = (rStrm.ReaduInt16() != 0);
179}
180
182{
184 if( aGraphic.GetType() != GraphicType::NONE )
185 maData.mxBrushItem.reset( new SvxBrushItem( aGraphic, GPOS_TILED, ATTR_BACKGROUND ) );
186}
187
188void XclImpPageSettings::SetPaperSize( sal_uInt16 nXclPaperSize, bool bPortrait )
189{
190 maData.mnPaperSize = nXclPaperSize;
191 maData.mbPortrait = bPortrait;
192 mbValidPaper = true;
193}
194
195namespace {
196
197void lclPutMarginItem( SfxItemSet& rItemSet, sal_uInt16 nRecId, double fMarginInch )
198{
199 sal_uInt16 nMarginTwips = XclTools::GetTwipsFromInch( fMarginInch );
200 switch( nRecId )
201 {
202 case EXC_ID_TOPMARGIN:
204 {
205 SvxULSpaceItem aItem( rItemSet.Get( ATTR_ULSPACE ) );
206 if( nRecId == EXC_ID_TOPMARGIN )
207 aItem.SetUpperValue( nMarginTwips );
208 else
209 aItem.SetLowerValue( nMarginTwips );
210 rItemSet.Put( aItem );
211 }
212 break;
215 {
216 SvxLRSpaceItem aItem( rItemSet.Get( ATTR_LRSPACE ) );
217 if( nRecId == EXC_ID_LEFTMARGIN )
218 aItem.SetLeftValue( nMarginTwips );
219 else
220 aItem.SetRightValue( nMarginTwips );
221 rItemSet.Put( aItem );
222 }
223 break;
224 default:
225 OSL_FAIL( "XclImpPageSettings::SetMarginItem - unknown record id" );
226 }
227}
228
229} // namespace
230
232{
233 ScDocument& rDoc = GetDoc();
234 SCTAB nScTab = GetCurrScTab();
235
236 // *** create page style sheet ***
237
238 OUString aStyleName;
239 OUString aTableName;
240 if( GetDoc().GetName( nScTab, aTableName ) )
241 aStyleName = "PageStyle_" + aTableName;
242 else
243 aStyleName = "PageStyle_" + OUString::number(static_cast<sal_Int32>(nScTab+1));
244
246 GetStyleSheetPool(), aStyleName, false);
247
248 SfxItemSet& rItemSet = rStyleSheet.GetItemSet();
249
250 // *** page settings ***
251
258
259 sal_uInt16 nStartPage = maData.mbManualStart ? maData.mnStartPage : 0;
260 ScfTools::PutItem( rItemSet, SfxUInt16Item( ATTR_PAGE_FIRSTPAGENO, nStartPage ), true );
261
262 if( maData.mxBrushItem )
263 rItemSet.Put( *maData.mxBrushItem );
264
265 if( mbValidPaper )
266 {
267 SvxPageItem aPageItem( rItemSet.Get( ATTR_PAGE ) );
268 aPageItem.SetLandscape( !maData.mbPortrait );
269 rItemSet.Put( aPageItem );
271 }
272
273 if( maData.mbFitToPages )
275 else if( maData.mbValid )
277
278 // *** margin preparations ***
279
280 double fLeftMargin = maData.mfLeftMargin;
281 double fRightMargin = maData.mfRightMargin;
282 double fTopMargin = maData.mfTopMargin;
283 double fBottomMargin = maData.mfBottomMargin;
284 // distances between header/footer and page area
285 double fHeaderHeight = 0.0;
286 double fHeaderDist = 0.0;
287 double fFooterHeight = 0.0;
288 double fFooterDist = 0.0;
289 // in Calc, "header/footer left/right margin" is X distance between header/footer and page margin
290 double fHdrLeftMargin = maData.mfHdrLeftMargin - maData.mfLeftMargin;
291 double fHdrRightMargin = maData.mfHdrRightMargin - maData.mfRightMargin;
292 double fFtrLeftMargin = maData.mfFtrLeftMargin - maData.mfLeftMargin;
293 double fFtrRightMargin = maData.mfFtrRightMargin - maData.mfRightMargin;
294
295 // *** header and footer ***
296
297 XclImpHFConverter aHFConv( GetRoot() );
298
299 // header
300 bool bHasHeader = !maData.maHeader.isEmpty();
301 SvxSetItem aHdrSetItem( rItemSet.Get( ATTR_PAGE_HEADERSET ) );
302 SfxItemSet& rHdrItemSet = aHdrSetItem.GetItemSet();
303 rHdrItemSet.Put( SfxBoolItem( ATTR_PAGE_ON, bHasHeader ) );
304 if( bHasHeader )
305 {
306 aHFConv.ParseString( maData.maHeader );
307 aHFConv.FillToItemSet( rItemSet, ATTR_PAGE_HEADERLEFT );
308 aHFConv.FillToItemSet( rItemSet, ATTR_PAGE_HEADERRIGHT );
309 aHFConv.FillToItemSet( rItemSet, ATTR_PAGE_HEADERFIRST );
310 // #i23296# In Calc, "top margin" is distance to header
311 fTopMargin = maData.mfHeaderMargin;
312 // Calc uses distance between header and sheet data area
313 fHeaderHeight = XclTools::GetInchFromTwips( aHFConv.GetTotalHeight() );
314 fHeaderDist = maData.mfTopMargin - maData.mfHeaderMargin - fHeaderHeight;
315 }
316 if( fHeaderDist < 0.0 )
317 {
318 /* #i23296# Header overlays sheet data:
319 -> set fixed header height to get correct sheet data position. */
320 ScfTools::PutItem( rHdrItemSet, SfxBoolItem( ATTR_PAGE_DYNAMIC, false ), true );
321 // shrink header height
322 tools::Long nHdrHeight = XclTools::GetTwipsFromInch( fHeaderHeight + fHeaderDist );
323 ScfTools::PutItem( rHdrItemSet, SvxSizeItem( ATTR_PAGE_SIZE, Size( 0, nHdrHeight ) ), true );
324 lclPutMarginItem( rHdrItemSet, EXC_ID_BOTTOMMARGIN, 0.0 );
325 }
326 else
327 {
328 // use dynamic header height
329 ScfTools::PutItem( rHdrItemSet, SfxBoolItem( ATTR_PAGE_DYNAMIC, true ), true );
330 lclPutMarginItem( rHdrItemSet, EXC_ID_BOTTOMMARGIN, fHeaderDist );
331 }
332 lclPutMarginItem( rHdrItemSet, EXC_ID_LEFTMARGIN, fHdrLeftMargin );
333 lclPutMarginItem( rHdrItemSet, EXC_ID_RIGHTMARGIN, fHdrRightMargin );
334 rItemSet.Put( aHdrSetItem );
335
336 // footer
337 bool bHasFooter = !maData.maFooter.isEmpty();
338 SvxSetItem aFtrSetItem( rItemSet.Get( ATTR_PAGE_FOOTERSET ) );
339 SfxItemSet& rFtrItemSet = aFtrSetItem.GetItemSet();
340 rFtrItemSet.Put( SfxBoolItem( ATTR_PAGE_ON, bHasFooter ) );
341 if( bHasFooter )
342 {
343 aHFConv.ParseString( maData.maFooter );
344 aHFConv.FillToItemSet( rItemSet, ATTR_PAGE_FOOTERLEFT );
345 aHFConv.FillToItemSet( rItemSet, ATTR_PAGE_FOOTERRIGHT );
346 aHFConv.FillToItemSet( rItemSet, ATTR_PAGE_FOOTERFIRST );
347 // #i23296# In Calc, "bottom margin" is distance to footer
348 fBottomMargin = maData.mfFooterMargin;
349 // Calc uses distance between footer and sheet data area
350 fFooterHeight = XclTools::GetInchFromTwips( aHFConv.GetTotalHeight() );
351 fFooterDist = maData.mfBottomMargin - maData.mfFooterMargin - fFooterHeight;
352 }
353 if( fFooterDist < 0.0 )
354 {
355 /* #i23296# Footer overlays sheet data:
356 -> set fixed footer height to get correct sheet data end position. */
357 ScfTools::PutItem( rFtrItemSet, SfxBoolItem( ATTR_PAGE_DYNAMIC, false ), true );
358 // shrink footer height
359 tools::Long nFtrHeight = XclTools::GetTwipsFromInch( fFooterHeight + fFooterDist );
360 ScfTools::PutItem( rFtrItemSet, SvxSizeItem( ATTR_PAGE_SIZE, Size( 0, nFtrHeight ) ), true );
361 lclPutMarginItem( rFtrItemSet, EXC_ID_TOPMARGIN, 0.0 );
362 }
363 else
364 {
365 // use dynamic footer height
366 ScfTools::PutItem( rFtrItemSet, SfxBoolItem( ATTR_PAGE_DYNAMIC, true ), true );
367 lclPutMarginItem( rFtrItemSet, EXC_ID_TOPMARGIN, fFooterDist );
368 }
369 lclPutMarginItem( rFtrItemSet, EXC_ID_LEFTMARGIN, fFtrLeftMargin );
370 lclPutMarginItem( rFtrItemSet, EXC_ID_RIGHTMARGIN, fFtrRightMargin );
371 rItemSet.Put( aFtrSetItem );
372
373 // *** set final margins ***
374
375 lclPutMarginItem( rItemSet, EXC_ID_LEFTMARGIN, fLeftMargin );
376 lclPutMarginItem( rItemSet, EXC_ID_RIGHTMARGIN, fRightMargin );
377 lclPutMarginItem( rItemSet, EXC_ID_TOPMARGIN, fTopMargin );
378 lclPutMarginItem( rItemSet, EXC_ID_BOTTOMMARGIN, fBottomMargin );
379
380 // *** put style sheet into document ***
381
382 rDoc.SetPageStyle( nScTab, rStyleSheet.GetName() );
383
384 // *** page breaks ***
385
386 for( const auto& rHorPageBreak : maData.maHorPageBreaks )
387 {
388 SCROW nScRow = static_cast< SCROW >( rHorPageBreak );
389 if( nScRow <= rDoc.MaxRow() )
390 rDoc.SetRowBreak(nScRow, nScTab, false, true);
391 }
392
393 for( const auto& rVerPageBreak : maData.maVerPageBreaks )
394 {
395 SCCOL nScCol = static_cast< SCCOL >( rVerPageBreak );
396 if( nScCol <= rDoc.MaxCol() )
397 rDoc.SetColBreak(nScCol, nScTab, false, true);
398 }
399}
400
401/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
GPOS_TILED
GraphicType GetType() const
SC_DLLPUBLIC SCCOL MaxCol() const
Definition: document.hxx:892
SC_DLLPUBLIC SCROW MaxRow() const
Definition: document.hxx:893
SC_DLLPUBLIC void SetColBreak(SCCOL nCol, SCTAB nTab, bool bPage, bool bManual)
Definition: document.cxx:4390
SC_DLLPUBLIC void SetRowBreak(SCROW nRow, SCTAB nTab, bool bPage, bool bManual)
Definition: document.cxx:4384
SC_DLLPUBLIC void SetPageStyle(SCTAB nTab, const OUString &rName)
Definition: document.cxx:6170
Contains the "scale to width/height" attribute in page styles.
Definition: attrib.hxx:230
virtual SC_DLLPUBLIC SfxItemSet & GetItemSet() override
Definition: stlsheet.cxx:133
static ScStyleSheet & MakePageStyleSheet(ScStyleSheetPool &rPool, const OUString &rStyleName, bool bForceName)
Creates and returns a page style sheet and inserts it into the pool.
Definition: ftools.cxx:262
static void PutItem(SfxItemSet &rItemSet, const SfxPoolItem &rItem, sal_uInt16 nWhichId, bool bSkipPoolDef)
Puts the item into the passed item set.
Definition: ftools.cxx:214
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
const OUString & GetName() const
SvStream & ReadDouble(double &rDouble)
void SetLandscape(bool bL)
static Graphic ReadImgData(const XclImpRoot &rRoot, XclImpStream &rStrm)
Reads and returns a bitmap from the IMGDATA record.
Definition: xiescher.cxx:3971
Converts an Excel header/footer string into three edit engine text objects.
Definition: xihelper.hxx:164
void ParseString(const OUString &rHFString)
Parses the passed string and creates three new edit engine text objects.
Definition: xihelper.cxx:282
void FillToItemSet(SfxItemSet &rItemSet, sal_uInt16 nWhichId) const
Creates a ScPageHFItem and inserts it into the passed item set.
Definition: xihelper.cxx:479
sal_Int32 GetTotalHeight() const
Returns the total height of the converted header or footer in twips.
Definition: xihelper.cxx:491
void ReadPrintHeaders(XclImpStream &rStrm)
Reads a PRINTHEADERS record.
Definition: xipage.cxx:171
void ReadSetup(XclImpStream &rStrm)
Reads a SETUP record and inserts contained data.
Definition: xipage.cxx:53
void ReadCenter(XclImpStream &rStrm)
Reads a HCENTER or VCENTER record.
Definition: xipage.cxx:101
XclImpPageSettings(const XclImpRoot &rRoot)
Definition: xipage.cxx:41
void ReadPrintGridLines(XclImpStream &rStrm)
Reads a PRINTGRIDLINES record.
Definition: xipage.cxx:176
void SetPaperSize(sal_uInt16 nXclPaperSize, bool bPortrait)
Overrides paper size and orientation (used in sheet-charts).
Definition: xipage.cxx:188
bool mbValidPaper
Page settings data.
Definition: xipage.hxx:67
XclPageData maData
Definition: xipage.hxx:66
void Initialize()
Initializes the object to be used for a new sheet.
Definition: xipage.cxx:47
void Finalize()
Creates a page stylesheet from current settings and sets it at current sheet.
Definition: xipage.cxx:231
void ReadMargin(XclImpStream &rStrm)
Reads a ***MARGIN record (reads all 4 margin records).
Definition: xipage.cxx:89
void ReadImgData(XclImpStream &rStrm)
Reads an IMGDATA record and creates the SvxBrushItem.
Definition: xipage.cxx:181
void ReadPageBreaks(XclImpStream &rStrm)
Reads a HORIZONTALPAGEBREAKS or VERTICALPAGEBREAKS record.
Definition: xipage.cxx:141
void ReadHeaderFooter(XclImpStream &rStrm)
Reads a HEADER or FOOTER record.
Definition: xipage.cxx:113
Access to global data from other classes.
Definition: xiroot.hxx:129
const XclImpRoot & GetRoot() const
Returns this root instance - for code readability in derived classes.
Definition: xiroot.hxx:134
This class is used to import record oriented streams.
Definition: xistream.hxx:278
SCTAB GetCurrScTab() const
Returns the current Calc sheet index.
Definition: xlroot.hxx:162
ScStyleSheetPool & GetStyleSheetPool() const
Returns the style sheet pool of the Calc document.
Definition: xlroot.cxx:306
XclBiff GetBiff() const
Returns the current BIFF version of the importer/exporter.
Definition: xlroot.hxx:141
ScDocument & GetDoc() const
Returns reference to the destination document (import) or source document (export).
Definition: xlroot.cxx:285
static double GetInchFromTwips(sal_Int32 nTwips)
Returns the length in inches calculated from a length in twips.
Definition: xltools.cxx:287
static sal_uInt16 GetTwipsFromInch(double fInches)
Returns the length in twips calculated from a length in inches.
Definition: xltools.cxx:277
static bool IsFuzzing()
int nCount
virtual OUString GetName() const override
bool get_flag(Type nBitField, Type nMask)
Returns true, if at least one of the bits set in nMask is set in nBitField.
Definition: ftools.hxx:75
::std::vector< sal_uInt16 > ScfUInt16Vec
Definition: ftools.hxx:255
void SvStream & rStrm
long Long
constexpr TypedWhichId< SfxUInt16Item > ATTR_PAGE_SCALE(175)
constexpr TypedWhichId< ScPageHFItem > ATTR_PAGE_FOOTERLEFT(179)
constexpr TypedWhichId< ScPageHFItem > ATTR_PAGE_HEADERLEFT(178)
constexpr TypedWhichId< SfxBoolItem > ATTR_PAGE_HORCENTER(162)
constexpr TypedWhichId< SfxBoolItem > ATTR_PAGE_DYNAMIC(165)
constexpr TypedWhichId< SvxSizeItem > ATTR_PAGE_SIZE(161)
constexpr TypedWhichId< SfxBoolItem > ATTR_PAGE_VERCENTER(163)
constexpr TypedWhichId< SfxBoolItem > ATTR_PAGE_HEADERS(170)
constexpr TypedWhichId< SvxSetItem > ATTR_PAGE_HEADERSET(184)
constexpr TypedWhichId< ScPageHFItem > ATTR_PAGE_FOOTERRIGHT(181)
constexpr TypedWhichId< SvxULSpaceItem > ATTR_ULSPACE(158)
constexpr TypedWhichId< SfxBoolItem > ATTR_PAGE_GRID(169)
constexpr TypedWhichId< SfxBoolItem > ATTR_PAGE_TOPDOWN(174)
constexpr TypedWhichId< ScPageHFItem > ATTR_PAGE_HEADERRIGHT(180)
constexpr TypedWhichId< SvxBrushItem > ATTR_BACKGROUND(148)
constexpr TypedWhichId< SfxUInt16Item > ATTR_PAGE_FIRSTPAGENO(177)
constexpr TypedWhichId< SvxPageItem > ATTR_PAGE(159)
constexpr TypedWhichId< SfxBoolItem > ATTR_PAGE_NOTES(168)
constexpr TypedWhichId< ScPageHFItem > ATTR_PAGE_HEADERFIRST(182)
constexpr TypedWhichId< ScPageHFItem > ATTR_PAGE_FOOTERFIRST(183)
constexpr TypedWhichId< SvxSetItem > ATTR_PAGE_FOOTERSET(185)
constexpr TypedWhichId< SfxBoolItem > ATTR_PAGE_ON(164)
constexpr TypedWhichId< SvxLRSpaceItem > ATTR_LRSPACE(157)
sal_uInt16 mnPaperSize
Right margin to footer.
Definition: xlpage.hxx:128
sal_uInt16 mnVerPrintRes
Horizontal printing resolution.
Definition: xlpage.hxx:138
double mfHeaderMargin
Bottom margin in inches.
Definition: xlpage.hxx:122
sal_uInt16 mnScaling
Start page number.
Definition: xlpage.hxx:134
bool mbBlackWhite
true = in rows; false = in columns.
Definition: xlpage.hxx:144
SvxBrushItemPtr mxBrushItem
Vertical page breaks.
Definition: xlpage.hxx:111
bool mbPrintHeadings
true = centered vertically; false = top aligned.
Definition: xlpage.hxx:151
bool mbManualStart
true = print notes.
Definition: xlpage.hxx:147
ScfUInt16Vec maHorPageBreaks
Definition: xlpage.hxx:109
OUString maFooterEven
Excel header string for even pages (empty = off).
Definition: xlpage.hxx:115
sal_uInt16 mnFitToHeight
Fit to number of pages in width.
Definition: xlpage.hxx:136
double mfRightMargin
Left margin in inches.
Definition: xlpage.hxx:119
bool mbPortrait
false = some of the values are not valid.
Definition: xlpage.hxx:142
bool mbVerCenter
true = centered horizontally; false = left aligned.
Definition: xlpage.hxx:150
void SetDefaults()
Sets Excel default page settings.
Definition: xlpage.cxx:164
double mfFooterMargin
Margin main page to header.
Definition: xlpage.hxx:123
bool mbValid
True = use maHeaderFirst/maFooterFirst.
Definition: xlpage.hxx:141
double mfFtrRightMargin
Left margin to footer.
Definition: xlpage.hxx:127
bool mbDraftQuality
true = black/white; false = colors.
Definition: xlpage.hxx:145
OUString maFooter
Excel header string (empty = off).
Definition: xlpage.hxx:113
bool mbPrintGrid
true = print column and row headings.
Definition: xlpage.hxx:152
sal_uInt16 mnFitToWidth
Scaling in percent.
Definition: xlpage.hxx:135
double mfHdrRightMargin
Left margin to header.
Definition: xlpage.hxx:125
OUString maHeaderEven
Excel footer string (empty = off).
Definition: xlpage.hxx:114
sal_uInt16 mnCopies
Paper Height in mm.
Definition: xlpage.hxx:132
double mfBottomMargin
Top margin in inches.
Definition: xlpage.hxx:121
bool mbHorCenter
true = fit to pages; false = scale in percent.
Definition: xlpage.hxx:149
sal_uInt16 mnHorPrintRes
Fit to number of pages in height.
Definition: xlpage.hxx:137
bool mbPrintNotes
true = draft; false = default quality.
Definition: xlpage.hxx:146
double mfHdrLeftMargin
Margin main page to footer.
Definition: xlpage.hxx:124
ScfUInt16Vec maVerPageBreaks
Horizontal page breaks.
Definition: xlpage.hxx:110
Size GetScPaperSize() const
Returns the real paper size (twips) from the paper size index and paper orientation.
Definition: xlpage.cxx:193
double mfTopMargin
Right margin in inches.
Definition: xlpage.hxx:120
double mfFtrLeftMargin
Right margin to header.
Definition: xlpage.hxx:126
bool mbFitToPages
true = mnStartPage valid; false = automatic.
Definition: xlpage.hxx:148
bool mbPrintInRows
true = portrait; false = landscape.
Definition: xlpage.hxx:143
OUString maHeader
Background bitmap.
Definition: xlpage.hxx:112
sal_uInt16 mnStartPage
Number of copies.
Definition: xlpage.hxx:133
double mfLeftMargin
Excel footer string for first page (empty = off).
Definition: xlpage.hxx:118
sal_Int16 SCTAB
Definition: types.hxx:22
sal_Int16 SCCOL
Definition: types.hxx:21
sal_Int32 SCROW
Definition: types.hxx:17
@ EXC_BIFF5
MS Excel 4.0.
Definition: xlconst.hxx:34
@ EXC_BIFF4
MS Excel 3.0.
Definition: xlconst.hxx:33
@ EXC_BIFF8
MS Excel 5.0, MS Excel 7.0 (95)
Definition: xlconst.hxx:35
@ EXC_BIFF3
MS Excel 2.1.
Definition: xlconst.hxx:32
const sal_uInt16 EXC_ID_FOOTER
Definition: xlpage.hxx:31
const sal_uInt16 EXC_ID_VCENTER
Definition: xlpage.hxx:78
const sal_uInt16 EXC_SETUP_BLACKWHITE
Definition: xlpage.hxx:87
const sal_uInt16 EXC_SETUP_PRINTNOTES
Definition: xlpage.hxx:89
const sal_uInt16 EXC_SETUP_DRAFT
Definition: xlpage.hxx:88
const sal_uInt16 EXC_ID_RIGHTMARGIN
Definition: xlpage.hxx:51
const sal_uInt16 EXC_ID_LEFTMARGIN
Definition: xlpage.hxx:50
const sal_uInt16 EXC_SETUP_STARTPAGE
Definition: xlpage.hxx:90
const sal_uInt16 EXC_ID_TOPMARGIN
Definition: xlpage.hxx:52
const sal_uInt16 EXC_ID_HEADER
Definition: xlpage.hxx:30
const sal_uInt16 EXC_ID_HEADER_EVEN
Definition: xlpage.hxx:35
const sal_uInt16 EXC_SETUP_INVALID
Definition: xlpage.hxx:86
const sal_uInt16 EXC_ID_HORPAGEBREAKS
Definition: xlpage.hxx:46
const sal_uInt16 EXC_ID_FOOTER_EVEN
Definition: xlpage.hxx:36
const sal_uInt16 EXC_ID_VERPAGEBREAKS
Definition: xlpage.hxx:45
const sal_uInt16 EXC_SETUP_INROWS
Definition: xlpage.hxx:84
const sal_uInt16 EXC_SETUP_PORTRAIT
Definition: xlpage.hxx:85
const sal_uInt16 EXC_ID_BOTTOMMARGIN
Definition: xlpage.hxx:53
const sal_uInt16 EXC_ID_HCENTER
Definition: xlpage.hxx:77
#define OSL_ENSURE_BIFF(c)
Definition: xltools.hxx:34