bump product version to 4.1.6.2
[LibreOffice.git] / sc / source / filter / excel / xepage.cxx
blob8e1ffb114352a8831732d90c20ea1ef0c92645af
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 .
21 #include "xepage.hxx"
22 #include <svl/itemset.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>
31 #include "document.hxx"
32 #include "stlpool.hxx"
33 #include "stlsheet.hxx"
34 #include "attrib.hxx"
35 #include "xehelper.hxx"
36 #include "xeescher.hxx"
38 #include <set>
39 #include <limits>
41 using namespace ::oox;
43 using ::std::set;
44 using ::std::numeric_limits;
46 // Page settings records ======================================================
48 // Header/footer --------------------------------------------------------------
50 XclExpHeaderFooter::XclExpHeaderFooter( sal_uInt16 nRecId, const String& rHdrString ) :
51 XclExpRecord( nRecId ),
52 maHdrString( rHdrString )
56 void XclExpHeaderFooter::SaveXml( XclExpXmlStream& rStrm )
58 sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
59 sal_Int32 nElement = GetRecId() == EXC_ID_HEADER ? XML_oddHeader : XML_oddFooter;
60 rWorksheet->startElement( nElement, FSEND );
61 rWorksheet->writeEscaped( XclXmlUtils::ToOUString( maHdrString ) );
62 rWorksheet->endElement( nElement );
65 void XclExpHeaderFooter::WriteBody( XclExpStream& rStrm )
67 if( maHdrString.Len() )
69 XclExpString aExString;
70 if( rStrm.GetRoot().GetBiff() <= EXC_BIFF5 )
71 aExString.AssignByte( maHdrString, rStrm.GetRoot().GetTextEncoding(), EXC_STR_8BITLENGTH );
72 else
73 aExString.Assign( maHdrString, EXC_STR_DEFAULT, 255 ); // 16-bit length, but max 255 chars
74 rStrm << aExString;
78 // General page settings ------------------------------------------------------
80 XclExpSetup::XclExpSetup( const XclPageData& rPageData ) :
81 XclExpRecord( EXC_ID_SETUP, 34 ),
82 mrData( rPageData )
86 void XclExpSetup::SaveXml( XclExpXmlStream& rStrm )
88 sax_fastparser::FastAttributeList* pAttrList=rStrm.GetCurrentStream()->createAttrList();
89 if( rStrm.getVersion() != oox::core::ISOIEC_29500_2008 ||
90 mrData.mnStrictPaperSize != EXC_PAPERSIZE_USER )
92 pAttrList->add( XML_paperSize, OString::valueOf( (sal_Int32) mrData.mnPaperSize ).getStr() );
94 else
96 pAttrList->add( XML_paperWidth, OString::valueOf( (sal_Int32) mrData.mnPaperWidth ).concat(OString("mm")).getStr() );
97 pAttrList->add( XML_paperHeight, OString::valueOf( (sal_Int32) mrData.mnPaperHeight ).concat(OString("mm")).getStr() );
98 // pAttrList->add( XML_paperUnits, "mm" );
100 pAttrList->add( XML_scale, OString::valueOf( (sal_Int32) mrData.mnScaling ).getStr() );
101 pAttrList->add( XML_firstPageNumber, OString::valueOf( (sal_Int32) mrData.mnStartPage ).getStr() );
102 pAttrList->add( XML_fitToWidth, OString::valueOf( (sal_Int32) mrData.mnFitToWidth ).getStr() );
103 pAttrList->add( XML_fitToHeight, OString::valueOf( (sal_Int32) mrData.mnFitToHeight ).getStr() );
104 pAttrList->add( XML_pageOrder, mrData.mbPrintInRows ? "overThenDown" : "downThenOver" );
105 pAttrList->add( XML_orientation, mrData.mbPortrait ? "portrait" : "landscape" ); // OOXTODO: "default"?
106 pAttrList->add( XML_usePrinterDefaults, XclXmlUtils::ToPsz( !mrData.mbValid ) );
107 pAttrList->add( XML_blackAndWhite, XclXmlUtils::ToPsz( mrData.mbBlackWhite ) );
108 pAttrList->add( XML_draft, XclXmlUtils::ToPsz( mrData.mbDraftQuality ) );
109 pAttrList->add( XML_cellComments, mrData.mbPrintNotes ? "atEnd" : "none" ); // OOXTODO: "asDisplayed"?
110 pAttrList->add( XML_useFirstPageNumber, XclXmlUtils::ToPsz( mrData.mbManualStart ) );
111 // OOXTODO: XML_errors, // == displayed|blank|dash|NA
112 pAttrList->add( XML_horizontalDpi, OString::valueOf( (sal_Int32) mrData.mnHorPrintRes ).getStr() );
113 pAttrList->add( XML_verticalDpi, OString::valueOf( (sal_Int32) mrData.mnVerPrintRes ).getStr() );
114 pAttrList->add( XML_copies, OString::valueOf( (sal_Int32) mrData.mnCopies ).getStr() );
115 // OOXTODO: devMode settings part RelationshipId: FSNS( XML_r, XML_id ),
117 ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList > aAttrs(pAttrList);
118 rStrm.GetCurrentStream()->singleElement( XML_pageSetup, aAttrs );
121 void XclExpSetup::WriteBody( XclExpStream& rStrm )
123 XclBiff eBiff = rStrm.GetRoot().GetBiff();
125 sal_uInt16 nFlags = 0;
126 ::set_flag( nFlags, EXC_SETUP_INROWS, mrData.mbPrintInRows );
127 ::set_flag( nFlags, EXC_SETUP_PORTRAIT, mrData.mbPortrait );
128 ::set_flag( nFlags, EXC_SETUP_INVALID, !mrData.mbValid );
129 ::set_flag( nFlags, EXC_SETUP_BLACKWHITE, mrData.mbBlackWhite );
130 if( eBiff >= EXC_BIFF5 )
132 ::set_flag( nFlags, EXC_SETUP_DRAFT, mrData.mbDraftQuality );
133 /* Set the Comments/Notes to "At end of sheet" if Print Notes is true.
134 We don't currently support "as displayed on sheet". Thus this value
135 will be re-interpreted to "At end of sheet". */
136 const sal_uInt16 nNotes = EXC_SETUP_PRINTNOTES | EXC_SETUP_NOTES_END;
137 ::set_flag( nFlags, nNotes, mrData.mbPrintNotes );
138 ::set_flag( nFlags, EXC_SETUP_STARTPAGE, mrData.mbManualStart );
141 rStrm << mrData.mnPaperSize << mrData.mnScaling << mrData.mnStartPage
142 << mrData.mnFitToWidth << mrData.mnFitToHeight << nFlags;
143 if( eBiff >= EXC_BIFF5 )
145 rStrm << mrData.mnHorPrintRes << mrData.mnVerPrintRes
146 << mrData.mfHeaderMargin << mrData.mfFooterMargin << mrData.mnCopies;
150 // Manual page breaks ---------------------------------------------------------
152 XclExpPageBreaks::XclExpPageBreaks( sal_uInt16 nRecId, const ScfUInt16Vec& rPageBreaks, sal_uInt16 nMaxPos ) :
153 XclExpRecord( nRecId ),
154 mrPageBreaks( rPageBreaks ),
155 mnMaxPos( nMaxPos )
159 void XclExpPageBreaks::Save( XclExpStream& rStrm )
161 if( !mrPageBreaks.empty() )
163 SetRecSize( 2 + ((rStrm.GetRoot().GetBiff() <= EXC_BIFF5) ? 2 : 6) * mrPageBreaks.size() );
164 XclExpRecord::Save( rStrm );
168 void XclExpPageBreaks::WriteBody( XclExpStream& rStrm )
170 bool bWriteRange = (rStrm.GetRoot().GetBiff() == EXC_BIFF8);
172 rStrm << static_cast< sal_uInt16 >( mrPageBreaks.size() );
173 for( ScfUInt16Vec::const_iterator aIt = mrPageBreaks.begin(), aEnd = mrPageBreaks.end(); aIt != aEnd; ++aIt )
175 rStrm << *aIt;
176 if( bWriteRange )
177 rStrm << sal_uInt16( 0 ) << mnMaxPos;
181 void XclExpPageBreaks::SaveXml( XclExpXmlStream& rStrm )
183 if( mrPageBreaks.empty() )
184 return;
186 sal_Int32 nElement = GetRecId() == EXC_ID_HORPAGEBREAKS ? XML_rowBreaks : XML_colBreaks;
187 sax_fastparser::FSHelperPtr& pWorksheet = rStrm.GetCurrentStream();
188 OString sNumPageBreaks = OString::valueOf( (sal_Int32) mrPageBreaks.size() );
189 pWorksheet->startElement( nElement,
190 XML_count, sNumPageBreaks.getStr(),
191 XML_manualBreakCount, sNumPageBreaks.getStr(),
192 FSEND );
193 for( ScfUInt16Vec::const_iterator aIt = mrPageBreaks.begin(), aEnd = mrPageBreaks.end(); aIt != aEnd; ++aIt )
195 pWorksheet->singleElement( XML_brk,
196 XML_id, OString::valueOf( (sal_Int32) *aIt ).getStr(),
197 XML_man, "true",
198 XML_max, OString::valueOf( (sal_Int32) mnMaxPos ).getStr(),
199 XML_min, "0",
200 // OOXTODO: XML_pt, "",
201 FSEND );
203 pWorksheet->endElement( nElement );
206 // Page settings ==============================================================
208 XclExpPageSettings::XclExpPageSettings( const XclExpRoot& rRoot ) :
209 XclExpRoot( rRoot )
211 ScDocument& rDoc = GetDoc();
212 SCTAB nScTab = GetCurrScTab();
214 if( SfxStyleSheetBase* pStyleSheet = GetStyleSheetPool().Find( rDoc.GetPageStyle( nScTab ), SFX_STYLE_FAMILY_PAGE ) )
216 const SfxItemSet& rItemSet = pStyleSheet->GetItemSet();
217 maData.mbValid = true;
219 // *** page settings ***
221 maData.mbPrintInRows = !GETITEMBOOL( rItemSet, ATTR_PAGE_TOPDOWN );
222 maData.mbHorCenter = GETITEMBOOL( rItemSet, ATTR_PAGE_HORCENTER );
223 maData.mbVerCenter = GETITEMBOOL( rItemSet, ATTR_PAGE_VERCENTER );
224 maData.mbPrintHeadings = GETITEMBOOL( rItemSet, ATTR_PAGE_HEADERS );
225 maData.mbPrintGrid = GETITEMBOOL( rItemSet, ATTR_PAGE_GRID );
226 maData.mbPrintNotes = GETITEMBOOL( rItemSet, ATTR_PAGE_NOTES );
228 maData.mnStartPage = GETITEMVALUE( rItemSet, SfxUInt16Item, ATTR_PAGE_FIRSTPAGENO, sal_uInt16 );
229 maData.mbManualStart = maData.mnStartPage && (!nScTab || rDoc.NeedPageResetAfterTab( nScTab - 1 ));
231 const SvxLRSpaceItem& rLRItem = GETITEM( rItemSet, SvxLRSpaceItem, ATTR_LRSPACE );
232 maData.mfLeftMargin = XclTools::GetInchFromTwips( rLRItem.GetLeft() );
233 maData.mfRightMargin = XclTools::GetInchFromTwips( rLRItem.GetRight() );
234 const SvxULSpaceItem& rULItem = GETITEM( rItemSet, SvxULSpaceItem, ATTR_ULSPACE );
235 maData.mfTopMargin = XclTools::GetInchFromTwips( rULItem.GetUpper() );
236 maData.mfBottomMargin = XclTools::GetInchFromTwips( rULItem.GetLower() );
238 const SvxPageItem& rPageItem = GETITEM( rItemSet, SvxPageItem, ATTR_PAGE );
239 const SvxSizeItem& rSizeItem = GETITEM( rItemSet, SvxSizeItem, ATTR_PAGE_SIZE );
240 maData.SetScPaperSize( rSizeItem.GetSize(), !rPageItem.IsLandscape() );
242 const ScPageScaleToItem& rScaleToItem = GETITEM( rItemSet, ScPageScaleToItem, ATTR_PAGE_SCALETO );
243 sal_uInt16 nPages = GETITEMVALUE( rItemSet, SfxUInt16Item, ATTR_PAGE_SCALETOPAGES, sal_uInt16 );
244 sal_uInt16 nScale = GETITEMVALUE( rItemSet, SfxUInt16Item, ATTR_PAGE_SCALE, sal_uInt16 );
246 if( ScfTools::CheckItem( rItemSet, ATTR_PAGE_SCALETO, false ) && rScaleToItem.IsValid() )
248 maData.mnFitToWidth = rScaleToItem.GetWidth();
249 maData.mnFitToHeight = rScaleToItem.GetHeight();
250 maData.mbFitToPages = true;
253 else if( ScfTools::CheckItem( rItemSet, ATTR_PAGE_SCALETOPAGES, false ) && nPages )
255 maData.mnFitToWidth = 1;
256 maData.mnFitToHeight = nPages;
257 maData.mbFitToPages = true;
259 else if( nScale )
261 maData.mnScaling = nScale;
262 maData.mbFitToPages = false;
265 maData.mxBrushItem.reset( new SvxBrushItem( GETITEM( rItemSet, SvxBrushItem, ATTR_BACKGROUND ) ) );
267 // *** header and footer ***
269 XclExpHFConverter aHFConv( GetRoot() );
271 // header
272 const SfxItemSet& rHdrItemSet = GETITEM( rItemSet, SvxSetItem, ATTR_PAGE_HEADERSET ).GetItemSet();
273 if( GETITEMBOOL( rHdrItemSet, ATTR_PAGE_ON ) )
275 const ScPageHFItem& rHFItem = GETITEM( rItemSet, ScPageHFItem, ATTR_PAGE_HEADERRIGHT );
276 aHFConv.GenerateString( rHFItem.GetLeftArea(), rHFItem.GetCenterArea(), rHFItem.GetRightArea() );
277 maData.maHeader = aHFConv.GetHFString();
278 // header height (Excel excludes header from top margin)
279 sal_Int32 nHdrHeight = GETITEMBOOL( rHdrItemSet, ATTR_PAGE_DYNAMIC ) ?
280 // dynamic height: calculate header height, add header <-> sheet area distance
281 (aHFConv.GetTotalHeight() + GETITEM( rHdrItemSet, SvxULSpaceItem, ATTR_ULSPACE ).GetLower()) :
282 // static height: ATTR_PAGE_SIZE already includes header <-> sheet area distance
283 static_cast< sal_Int32 >( GETITEM( rHdrItemSet, SvxSizeItem, ATTR_PAGE_SIZE ).GetSize().Height() );
284 maData.mfHeaderMargin = maData.mfTopMargin;
285 maData.mfTopMargin += XclTools::GetInchFromTwips( nHdrHeight );
288 // footer
289 const SfxItemSet& rFtrItemSet = GETITEM( rItemSet, SvxSetItem, ATTR_PAGE_FOOTERSET ).GetItemSet();
290 if( GETITEMBOOL( rFtrItemSet, ATTR_PAGE_ON ) )
292 const ScPageHFItem& rHFItem = GETITEM( rItemSet, ScPageHFItem, ATTR_PAGE_FOOTERRIGHT );
293 aHFConv.GenerateString( rHFItem.GetLeftArea(), rHFItem.GetCenterArea(), rHFItem.GetRightArea() );
294 maData.maFooter = aHFConv.GetHFString();
295 // footer height (Excel excludes footer from bottom margin)
296 sal_Int32 nFtrHeight = GETITEMBOOL( rFtrItemSet, ATTR_PAGE_DYNAMIC ) ?
297 // dynamic height: calculate footer height, add sheet area <-> footer distance
298 (aHFConv.GetTotalHeight() + GETITEM( rFtrItemSet, SvxULSpaceItem, ATTR_ULSPACE ).GetUpper()) :
299 // static height: ATTR_PAGE_SIZE already includes sheet area <-> footer distance
300 static_cast< sal_Int32 >( GETITEM( rFtrItemSet, SvxSizeItem, ATTR_PAGE_SIZE ).GetSize().Height() );
301 maData.mfFooterMargin = maData.mfBottomMargin;
302 maData.mfBottomMargin += XclTools::GetInchFromTwips( nFtrHeight );
306 // *** page breaks ***
308 set<SCROW> aRowBreaks;
309 rDoc.GetAllRowBreaks(aRowBreaks, nScTab, false, true);
311 SCROW nMaxRow = numeric_limits<sal_uInt16>::max();
312 for (set<SCROW>::const_iterator itr = aRowBreaks.begin(), itrEnd = aRowBreaks.end(); itr != itrEnd; ++itr)
314 SCROW nRow = *itr;
315 if (nRow > nMaxRow)
316 break;
318 maData.maHorPageBreaks.push_back(nRow);
321 if (maData.maHorPageBreaks.size() > 1026)
323 // Excel allows only up to 1026 page breaks. Trim any excess page breaks.
324 ScfUInt16Vec::iterator itr = maData.maHorPageBreaks.begin();
325 ::std::advance(itr, 1026);
326 maData.maHorPageBreaks.erase(itr, maData.maHorPageBreaks.end());
329 set<SCCOL> aColBreaks;
330 rDoc.GetAllColBreaks(aColBreaks, nScTab, false, true);
331 for (set<SCCOL>::const_iterator itr = aColBreaks.begin(), itrEnd = aColBreaks.end(); itr != itrEnd; ++itr)
332 maData.maVerPageBreaks.push_back(*itr);
335 static void lcl_WriteHeaderFooter( XclExpXmlStream& rStrm )
337 // OOXTODO: we currently only emit oddHeader/oddFooter elements, and
338 // do not support the first/even/odd page distinction.
339 rStrm.WriteAttributes(
340 // OOXTODO: XML_alignWithMargins,
341 XML_differentFirst, "false", // OOXTODO
342 XML_differentOddEven, "false", // OOXTODO
343 // OOXTODO: XML_scaleWithDoc
344 FSEND );
345 rStrm.GetCurrentStream()->write( ">" );
348 void XclExpPageSettings::Save( XclExpStream& rStrm )
350 XclExpBoolRecord( EXC_ID_PRINTHEADERS, maData.mbPrintHeadings ).Save( rStrm );
351 XclExpBoolRecord( EXC_ID_PRINTGRIDLINES, maData.mbPrintGrid ).Save( rStrm );
352 XclExpBoolRecord( EXC_ID_GRIDSET, true ).Save( rStrm );
353 XclExpPageBreaks( EXC_ID_HORPAGEBREAKS, maData.maHorPageBreaks, static_cast< sal_uInt16 >( GetXclMaxPos().Col() ) ).Save( rStrm );
354 XclExpPageBreaks( EXC_ID_VERPAGEBREAKS, maData.maVerPageBreaks, static_cast< sal_uInt16 >( GetXclMaxPos().Row() ) ).Save( rStrm );
355 XclExpHeaderFooter( EXC_ID_HEADER, maData.maHeader ).Save( rStrm );
356 XclExpHeaderFooter( EXC_ID_FOOTER, maData.maFooter ).Save( rStrm );
357 XclExpBoolRecord( EXC_ID_HCENTER, maData.mbHorCenter ).Save( rStrm );
358 XclExpBoolRecord( EXC_ID_VCENTER, maData.mbVerCenter ).Save( rStrm );
359 XclExpDoubleRecord( EXC_ID_LEFTMARGIN, maData.mfLeftMargin ).Save( rStrm );
360 XclExpDoubleRecord( EXC_ID_RIGHTMARGIN, maData.mfRightMargin ).Save( rStrm );
361 XclExpDoubleRecord( EXC_ID_TOPMARGIN, maData.mfTopMargin ).Save( rStrm );
362 XclExpDoubleRecord( EXC_ID_BOTTOMMARGIN, maData.mfBottomMargin ).Save( rStrm );
363 XclExpSetup( maData ).Save( rStrm );
365 if( (GetBiff() == EXC_BIFF8) && maData.mxBrushItem.get() )
366 if( const Graphic* pGraphic = maData.mxBrushItem->GetGraphic() )
367 XclExpImgData( *pGraphic, EXC_ID8_IMGDATA ).Save( rStrm );
370 void XclExpPageSettings::SaveXml( XclExpXmlStream& rStrm )
372 XclExpXmlStartSingleElementRecord( XML_printOptions ).SaveXml( rStrm );
373 XclExpBoolRecord( EXC_ID_PRINTHEADERS, maData.mbPrintHeadings, XML_headings ).SaveXml( rStrm );
374 XclExpBoolRecord( EXC_ID_PRINTGRIDLINES, maData.mbPrintGrid, XML_gridLines ).SaveXml( rStrm );
375 XclExpBoolRecord( EXC_ID_GRIDSET, true, XML_gridLinesSet ).SaveXml( rStrm );
376 XclExpBoolRecord( EXC_ID_HCENTER, maData.mbHorCenter, XML_horizontalCentered ).SaveXml( rStrm );
377 XclExpBoolRecord( EXC_ID_VCENTER, maData.mbVerCenter, XML_verticalCentered ).SaveXml( rStrm );
378 XclExpXmlEndSingleElementRecord().SaveXml( rStrm ); // XML_printOptions
380 XclExpXmlStartSingleElementRecord( XML_pageMargins ).SaveXml( rStrm );
381 XclExpDoubleRecord( EXC_ID_LEFTMARGIN, maData.mfLeftMargin ).SetAttribute( XML_left )->SaveXml( rStrm );
382 XclExpDoubleRecord( EXC_ID_RIGHTMARGIN, maData.mfRightMargin ).SetAttribute( XML_right )->SaveXml( rStrm );
383 XclExpDoubleRecord( EXC_ID_TOPMARGIN, maData.mfTopMargin ).SetAttribute( XML_top )->SaveXml( rStrm );
384 XclExpDoubleRecord( EXC_ID_BOTTOMMARGIN, maData.mfBottomMargin ).SetAttribute( XML_bottom )->SaveXml( rStrm );
385 XclExpDoubleRecord( 0, maData.mfHeaderMargin).SetAttribute( XML_header )->SaveXml( rStrm );
386 XclExpDoubleRecord( 0, maData.mfFooterMargin).SetAttribute( XML_footer )->SaveXml( rStrm );
387 XclExpXmlEndSingleElementRecord().SaveXml( rStrm ); // XML_pageMargins
389 XclExpSetup( maData ).SaveXml( rStrm );
391 XclExpXmlStartElementRecord( XML_headerFooter, lcl_WriteHeaderFooter ).SaveXml( rStrm );
392 XclExpHeaderFooter( EXC_ID_HEADER, maData.maHeader ).SaveXml( rStrm );
393 XclExpHeaderFooter( EXC_ID_FOOTER, maData.maFooter ).SaveXml( rStrm );
394 XclExpXmlEndElementRecord( XML_headerFooter ).SaveXml( rStrm );
396 XclExpPageBreaks( EXC_ID_HORPAGEBREAKS, maData.maHorPageBreaks,
397 static_cast< sal_uInt16 >( GetXclMaxPos().Col() ) ).SaveXml( rStrm );
398 XclExpPageBreaks( EXC_ID_VERPAGEBREAKS, maData.maVerPageBreaks,
399 static_cast< sal_uInt16 >( GetXclMaxPos().Row() ) ).SaveXml( rStrm );
401 if( const Graphic* pGraphic = maData.mxBrushItem->GetGraphic() )
402 XclExpImgData( *pGraphic, EXC_ID8_IMGDATA ).SaveXml( rStrm );
405 // ----------------------------------------------------------------------------
407 XclExpChartPageSettings::XclExpChartPageSettings( const XclExpRoot& rRoot ) :
408 XclExpRoot( rRoot )
412 void XclExpChartPageSettings::Save( XclExpStream& rStrm )
414 XclExpHeaderFooter( EXC_ID_HEADER, maData.maHeader ).Save( rStrm );
415 XclExpHeaderFooter( EXC_ID_FOOTER, maData.maFooter ).Save( rStrm );
416 XclExpBoolRecord( EXC_ID_HCENTER, maData.mbHorCenter ).Save( rStrm );
417 XclExpBoolRecord( EXC_ID_VCENTER, maData.mbVerCenter ).Save( rStrm );
418 XclExpSetup( maData ).Save( rStrm );
419 XclExpUInt16Record( EXC_ID_PRINTSIZE, EXC_PRINTSIZE_FULL ).Save( rStrm );
422 // ============================================================================
424 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */