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 .
21 #include <svl/itemset.hxx>
22 #include "scitems.hxx"
23 #include <svl/eitem.hxx>
24 #include <svl/intitem.hxx>
25 #include <svx/pageitem.hxx>
26 #include <editeng/sizeitem.hxx>
27 #include <editeng/lrspitem.hxx>
28 #include <editeng/ulspitem.hxx>
29 #include <editeng/brushitem.hxx>
30 #include "document.hxx"
31 #include "stlpool.hxx"
32 #include "stlsheet.hxx"
34 #include "xehelper.hxx"
35 #include "xeescher.hxx"
40 using namespace ::oox
;
43 using ::std::numeric_limits
;
45 // Page settings records ======================================================
47 // Header/footer --------------------------------------------------------------
49 XclExpHeaderFooter::XclExpHeaderFooter( sal_uInt16 nRecId
, const OUString
& rHdrString
) :
50 XclExpRecord( nRecId
),
51 maHdrString( rHdrString
)
55 void XclExpHeaderFooter::SaveXml( XclExpXmlStream
& rStrm
)
57 sax_fastparser::FSHelperPtr
& rWorksheet
= rStrm
.GetCurrentStream();
58 sal_Int32 nElement
= GetRecId() == EXC_ID_HEADER
? XML_oddHeader
: XML_oddFooter
;
59 rWorksheet
->startElement( nElement
, FSEND
);
60 rWorksheet
->writeEscaped( maHdrString
);
61 rWorksheet
->endElement( nElement
);
64 void XclExpHeaderFooter::WriteBody( XclExpStream
& rStrm
)
66 if( !maHdrString
.isEmpty() )
68 XclExpString aExString
;
69 if( rStrm
.GetRoot().GetBiff() <= EXC_BIFF5
)
70 aExString
.AssignByte( maHdrString
, rStrm
.GetRoot().GetTextEncoding(), EXC_STR_8BITLENGTH
);
72 aExString
.Assign( maHdrString
, EXC_STR_DEFAULT
, 255 ); // 16-bit length, but max 255 chars
77 // General page settings ------------------------------------------------------
79 XclExpSetup::XclExpSetup( const XclPageData
& rPageData
) :
80 XclExpRecord( EXC_ID_SETUP
, 34 ),
85 void XclExpSetup::SaveXml( XclExpXmlStream
& rStrm
)
87 sax_fastparser::FastAttributeList
* pAttrList
= sax_fastparser::FastSerializerHelper::createAttrList();
88 if( rStrm
.getVersion() != oox::core::ISOIEC_29500_2008
||
89 mrData
.mnStrictPaperSize
!= EXC_PAPERSIZE_USER
)
91 pAttrList
->add( XML_paperSize
, OString::number( mrData
.mnPaperSize
).getStr() );
95 pAttrList
->add( XML_paperWidth
, OString::number( mrData
.mnPaperWidth
).concat(OString("mm")).getStr() );
96 pAttrList
->add( XML_paperHeight
, OString::number( mrData
.mnPaperHeight
).concat(OString("mm")).getStr() );
97 // pAttrList->add( XML_paperUnits, "mm" );
99 pAttrList
->add( XML_scale
, OString::number( mrData
.mnScaling
).getStr() );
100 pAttrList
->add( XML_firstPageNumber
, OString::number( mrData
.mnStartPage
).getStr() );
101 pAttrList
->add( XML_fitToWidth
, OString::number( mrData
.mnFitToWidth
).getStr() );
102 pAttrList
->add( XML_fitToHeight
, OString::number( mrData
.mnFitToHeight
).getStr() );
103 pAttrList
->add( XML_pageOrder
, mrData
.mbPrintInRows
? "overThenDown" : "downThenOver" );
104 pAttrList
->add( XML_orientation
, mrData
.mbPortrait
? "portrait" : "landscape" ); // OOXTODO: "default"?
105 pAttrList
->add( XML_usePrinterDefaults
, XclXmlUtils::ToPsz( !mrData
.mbValid
) );
106 pAttrList
->add( XML_blackAndWhite
, XclXmlUtils::ToPsz( mrData
.mbBlackWhite
) );
107 pAttrList
->add( XML_draft
, XclXmlUtils::ToPsz( mrData
.mbDraftQuality
) );
108 pAttrList
->add( XML_cellComments
, mrData
.mbPrintNotes
? "atEnd" : "none" ); // OOXTODO: "asDisplayed"?
109 pAttrList
->add( XML_useFirstPageNumber
, XclXmlUtils::ToPsz( mrData
.mbManualStart
) );
110 // OOXTODO: XML_errors, // == displayed|blank|dash|NA
111 pAttrList
->add( XML_horizontalDpi
, OString::number( mrData
.mnHorPrintRes
).getStr() );
112 pAttrList
->add( XML_verticalDpi
, OString::number( mrData
.mnVerPrintRes
).getStr() );
113 pAttrList
->add( XML_copies
, OString::number( mrData
.mnCopies
).getStr() );
114 // OOXTODO: devMode settings part RelationshipId: FSNS( XML_r, XML_id ),
116 ::com::sun::star::uno::Reference
< ::com::sun::star::xml::sax::XFastAttributeList
> aAttrs(pAttrList
);
117 rStrm
.GetCurrentStream()->singleElement( XML_pageSetup
, aAttrs
);
120 void XclExpSetup::WriteBody( XclExpStream
& rStrm
)
122 XclBiff eBiff
= rStrm
.GetRoot().GetBiff();
124 sal_uInt16 nFlags
= 0;
125 ::set_flag( nFlags
, EXC_SETUP_INROWS
, mrData
.mbPrintInRows
);
126 ::set_flag( nFlags
, EXC_SETUP_PORTRAIT
, mrData
.mbPortrait
);
127 ::set_flag( nFlags
, EXC_SETUP_INVALID
, !mrData
.mbValid
);
128 ::set_flag( nFlags
, EXC_SETUP_BLACKWHITE
, mrData
.mbBlackWhite
);
129 if( eBiff
>= EXC_BIFF5
)
131 ::set_flag( nFlags
, EXC_SETUP_DRAFT
, mrData
.mbDraftQuality
);
132 /* Set the Comments/Notes to "At end of sheet" if Print Notes is true.
133 We don't currently support "as displayed on sheet". Thus this value
134 will be re-interpreted to "At end of sheet". */
135 const sal_uInt16 nNotes
= EXC_SETUP_PRINTNOTES
| EXC_SETUP_NOTES_END
;
136 ::set_flag( nFlags
, nNotes
, mrData
.mbPrintNotes
);
137 ::set_flag( nFlags
, EXC_SETUP_STARTPAGE
, mrData
.mbManualStart
);
140 rStrm
<< mrData
.mnPaperSize
<< mrData
.mnScaling
<< mrData
.mnStartPage
141 << mrData
.mnFitToWidth
<< mrData
.mnFitToHeight
<< nFlags
;
142 if( eBiff
>= EXC_BIFF5
)
144 rStrm
<< mrData
.mnHorPrintRes
<< mrData
.mnVerPrintRes
145 << mrData
.mfHeaderMargin
<< mrData
.mfFooterMargin
<< mrData
.mnCopies
;
149 // Manual page breaks ---------------------------------------------------------
151 XclExpPageBreaks::XclExpPageBreaks( sal_uInt16 nRecId
, const ScfUInt16Vec
& rPageBreaks
, sal_uInt16 nMaxPos
) :
152 XclExpRecord( nRecId
),
153 mrPageBreaks( rPageBreaks
),
158 void XclExpPageBreaks::Save( XclExpStream
& rStrm
)
160 if( !mrPageBreaks
.empty() )
162 SetRecSize( 2 + ((rStrm
.GetRoot().GetBiff() <= EXC_BIFF5
) ? 2 : 6) * mrPageBreaks
.size() );
163 XclExpRecord::Save( rStrm
);
167 void XclExpPageBreaks::WriteBody( XclExpStream
& rStrm
)
169 bool bWriteRange
= (rStrm
.GetRoot().GetBiff() == EXC_BIFF8
);
171 rStrm
<< static_cast< sal_uInt16
>( mrPageBreaks
.size() );
172 for( ScfUInt16Vec::const_iterator aIt
= mrPageBreaks
.begin(), aEnd
= mrPageBreaks
.end(); aIt
!= aEnd
; ++aIt
)
176 rStrm
<< sal_uInt16( 0 ) << mnMaxPos
;
180 void XclExpPageBreaks::SaveXml( XclExpXmlStream
& rStrm
)
182 if( mrPageBreaks
.empty() )
185 sal_Int32 nElement
= GetRecId() == EXC_ID_HORPAGEBREAKS
? XML_rowBreaks
: XML_colBreaks
;
186 sax_fastparser::FSHelperPtr
& pWorksheet
= rStrm
.GetCurrentStream();
187 OString sNumPageBreaks
= OString::number( mrPageBreaks
.size() );
188 pWorksheet
->startElement( nElement
,
189 XML_count
, sNumPageBreaks
.getStr(),
190 XML_manualBreakCount
, sNumPageBreaks
.getStr(),
192 for( ScfUInt16Vec::const_iterator aIt
= mrPageBreaks
.begin(), aEnd
= mrPageBreaks
.end(); aIt
!= aEnd
; ++aIt
)
194 pWorksheet
->singleElement( XML_brk
,
195 XML_id
, OString::number( *aIt
).getStr(),
197 XML_max
, OString::number( mnMaxPos
).getStr(),
199 // OOXTODO: XML_pt, "",
202 pWorksheet
->endElement( nElement
);
205 // Page settings ==============================================================
207 XclExpPageSettings::XclExpPageSettings( const XclExpRoot
& rRoot
) :
210 ScDocument
& rDoc
= GetDoc();
211 SCTAB nScTab
= GetCurrScTab();
213 if( SfxStyleSheetBase
* pStyleSheet
= GetStyleSheetPool().Find( rDoc
.GetPageStyle( nScTab
), SFX_STYLE_FAMILY_PAGE
) )
215 const SfxItemSet
& rItemSet
= pStyleSheet
->GetItemSet();
216 maData
.mbValid
= true;
218 // *** page settings ***
220 maData
.mbPrintInRows
= !GETITEMBOOL( rItemSet
, ATTR_PAGE_TOPDOWN
);
221 maData
.mbHorCenter
= GETITEMBOOL( rItemSet
, ATTR_PAGE_HORCENTER
);
222 maData
.mbVerCenter
= GETITEMBOOL( rItemSet
, ATTR_PAGE_VERCENTER
);
223 maData
.mbPrintHeadings
= GETITEMBOOL( rItemSet
, ATTR_PAGE_HEADERS
);
224 maData
.mbPrintGrid
= GETITEMBOOL( rItemSet
, ATTR_PAGE_GRID
);
225 maData
.mbPrintNotes
= GETITEMBOOL( rItemSet
, ATTR_PAGE_NOTES
);
227 maData
.mnStartPage
= GETITEMVALUE( rItemSet
, SfxUInt16Item
, ATTR_PAGE_FIRSTPAGENO
, sal_uInt16
);
228 maData
.mbManualStart
= maData
.mnStartPage
&& (!nScTab
|| rDoc
.NeedPageResetAfterTab( nScTab
- 1 ));
230 const SvxLRSpaceItem
& rLRItem
= GETITEM( rItemSet
, SvxLRSpaceItem
, ATTR_LRSPACE
);
231 maData
.mfLeftMargin
= XclTools::GetInchFromTwips( rLRItem
.GetLeft() );
232 maData
.mfRightMargin
= XclTools::GetInchFromTwips( rLRItem
.GetRight() );
233 const SvxULSpaceItem
& rULItem
= GETITEM( rItemSet
, SvxULSpaceItem
, ATTR_ULSPACE
);
234 maData
.mfTopMargin
= XclTools::GetInchFromTwips( rULItem
.GetUpper() );
235 maData
.mfBottomMargin
= XclTools::GetInchFromTwips( rULItem
.GetLower() );
237 const SvxPageItem
& rPageItem
= GETITEM( rItemSet
, SvxPageItem
, ATTR_PAGE
);
238 const SvxSizeItem
& rSizeItem
= GETITEM( rItemSet
, SvxSizeItem
, ATTR_PAGE_SIZE
);
239 maData
.SetScPaperSize( rSizeItem
.GetSize(), !rPageItem
.IsLandscape() );
241 const ScPageScaleToItem
& rScaleToItem
= GETITEM( rItemSet
, ScPageScaleToItem
, ATTR_PAGE_SCALETO
);
242 sal_uInt16 nPages
= GETITEMVALUE( rItemSet
, SfxUInt16Item
, ATTR_PAGE_SCALETOPAGES
, sal_uInt16
);
243 sal_uInt16 nScale
= GETITEMVALUE( rItemSet
, SfxUInt16Item
, ATTR_PAGE_SCALE
, sal_uInt16
);
245 if( ScfTools::CheckItem( rItemSet
, ATTR_PAGE_SCALETO
, false ) && rScaleToItem
.IsValid() )
247 maData
.mnFitToWidth
= rScaleToItem
.GetWidth();
248 maData
.mnFitToHeight
= rScaleToItem
.GetHeight();
249 maData
.mbFitToPages
= true;
252 else if( ScfTools::CheckItem( rItemSet
, ATTR_PAGE_SCALETOPAGES
, false ) && nPages
)
254 maData
.mnFitToWidth
= 1;
255 maData
.mnFitToHeight
= nPages
;
256 maData
.mbFitToPages
= true;
260 maData
.mnScaling
= nScale
;
261 maData
.mbFitToPages
= false;
264 maData
.mxBrushItem
.reset( new SvxBrushItem( GETITEM( rItemSet
, SvxBrushItem
, ATTR_BACKGROUND
) ) );
266 // *** header and footer ***
268 XclExpHFConverter
aHFConv( GetRoot() );
271 const SfxItemSet
& rHdrItemSet
= GETITEM( rItemSet
, SvxSetItem
, ATTR_PAGE_HEADERSET
).GetItemSet();
272 if( GETITEMBOOL( rHdrItemSet
, ATTR_PAGE_ON
) )
274 const ScPageHFItem
& rHFItem
= GETITEM( rItemSet
, ScPageHFItem
, ATTR_PAGE_HEADERRIGHT
);
275 aHFConv
.GenerateString( rHFItem
.GetLeftArea(), rHFItem
.GetCenterArea(), rHFItem
.GetRightArea() );
276 maData
.maHeader
= aHFConv
.GetHFString();
277 // header height (Excel excludes header from top margin)
278 sal_Int32 nHdrHeight
= GETITEMBOOL( rHdrItemSet
, ATTR_PAGE_DYNAMIC
) ?
279 // dynamic height: calculate header height, add header <-> sheet area distance
280 (aHFConv
.GetTotalHeight() + GETITEM( rHdrItemSet
, SvxULSpaceItem
, ATTR_ULSPACE
).GetLower()) :
281 // static height: ATTR_PAGE_SIZE already includes header <-> sheet area distance
282 static_cast< sal_Int32
>( GETITEM( rHdrItemSet
, SvxSizeItem
, ATTR_PAGE_SIZE
).GetSize().Height() );
283 maData
.mfHeaderMargin
= maData
.mfTopMargin
;
284 maData
.mfTopMargin
+= XclTools::GetInchFromTwips( nHdrHeight
);
288 const SfxItemSet
& rFtrItemSet
= GETITEM( rItemSet
, SvxSetItem
, ATTR_PAGE_FOOTERSET
).GetItemSet();
289 if( GETITEMBOOL( rFtrItemSet
, ATTR_PAGE_ON
) )
291 const ScPageHFItem
& rHFItem
= GETITEM( rItemSet
, ScPageHFItem
, ATTR_PAGE_FOOTERRIGHT
);
292 aHFConv
.GenerateString( rHFItem
.GetLeftArea(), rHFItem
.GetCenterArea(), rHFItem
.GetRightArea() );
293 maData
.maFooter
= aHFConv
.GetHFString();
294 // footer height (Excel excludes footer from bottom margin)
295 sal_Int32 nFtrHeight
= GETITEMBOOL( rFtrItemSet
, ATTR_PAGE_DYNAMIC
) ?
296 // dynamic height: calculate footer height, add sheet area <-> footer distance
297 (aHFConv
.GetTotalHeight() + GETITEM( rFtrItemSet
, SvxULSpaceItem
, ATTR_ULSPACE
).GetUpper()) :
298 // static height: ATTR_PAGE_SIZE already includes sheet area <-> footer distance
299 static_cast< sal_Int32
>( GETITEM( rFtrItemSet
, SvxSizeItem
, ATTR_PAGE_SIZE
).GetSize().Height() );
300 maData
.mfFooterMargin
= maData
.mfBottomMargin
;
301 maData
.mfBottomMargin
+= XclTools::GetInchFromTwips( nFtrHeight
);
305 // *** page breaks ***
307 set
<SCROW
> aRowBreaks
;
308 rDoc
.GetAllRowBreaks(aRowBreaks
, nScTab
, false, true);
310 SCROW nMaxRow
= numeric_limits
<sal_uInt16
>::max();
311 for (set
<SCROW
>::const_iterator itr
= aRowBreaks
.begin(), itrEnd
= aRowBreaks
.end(); itr
!= itrEnd
; ++itr
)
317 maData
.maHorPageBreaks
.push_back(nRow
);
320 if (maData
.maHorPageBreaks
.size() > 1026)
322 // Excel allows only up to 1026 page breaks. Trim any excess page breaks.
323 ScfUInt16Vec::iterator itr
= maData
.maHorPageBreaks
.begin();
324 ::std::advance(itr
, 1026);
325 maData
.maHorPageBreaks
.erase(itr
, maData
.maHorPageBreaks
.end());
328 set
<SCCOL
> aColBreaks
;
329 rDoc
.GetAllColBreaks(aColBreaks
, nScTab
, false, true);
330 for (set
<SCCOL
>::const_iterator itr
= aColBreaks
.begin(), itrEnd
= aColBreaks
.end(); itr
!= itrEnd
; ++itr
)
331 maData
.maVerPageBreaks
.push_back(*itr
);
334 class XclExpXmlStartHeaderFooterElementRecord
: public XclExpXmlElementRecord
337 explicit XclExpXmlStartHeaderFooterElementRecord(sal_Int32
const nElement
)
338 : XclExpXmlElementRecord(nElement
) {}
340 virtual void SaveXml( XclExpXmlStream
& rStrm
) SAL_OVERRIDE
;
343 void XclExpXmlStartHeaderFooterElementRecord::SaveXml(XclExpXmlStream
& rStrm
)
345 // OOXTODO: we currently only emit oddHeader/oddFooter elements, and
346 // do not support the first/even/odd page distinction.
347 sax_fastparser::FSHelperPtr
& rStream
= rStrm
.GetCurrentStream();
348 rStream
->startElement( mnElement
,
349 // OOXTODO: XML_alignWithMargins,
350 XML_differentFirst
, "false", // OOXTODO
351 XML_differentOddEven
, "false", // OOXTODO
352 // OOXTODO: XML_scaleWithDoc
356 void XclExpPageSettings::Save( XclExpStream
& rStrm
)
358 XclExpBoolRecord( EXC_ID_PRINTHEADERS
, maData
.mbPrintHeadings
).Save( rStrm
);
359 XclExpBoolRecord( EXC_ID_PRINTGRIDLINES
, maData
.mbPrintGrid
).Save( rStrm
);
360 XclExpBoolRecord( EXC_ID_GRIDSET
, true ).Save( rStrm
);
361 XclExpPageBreaks( EXC_ID_HORPAGEBREAKS
, maData
.maHorPageBreaks
, static_cast< sal_uInt16
>( GetXclMaxPos().Col() ) ).Save( rStrm
);
362 XclExpPageBreaks( EXC_ID_VERPAGEBREAKS
, maData
.maVerPageBreaks
, static_cast< sal_uInt16
>( GetXclMaxPos().Row() ) ).Save( rStrm
);
363 XclExpHeaderFooter( EXC_ID_HEADER
, maData
.maHeader
).Save( rStrm
);
364 XclExpHeaderFooter( EXC_ID_FOOTER
, maData
.maFooter
).Save( rStrm
);
365 XclExpBoolRecord( EXC_ID_HCENTER
, maData
.mbHorCenter
).Save( rStrm
);
366 XclExpBoolRecord( EXC_ID_VCENTER
, maData
.mbVerCenter
).Save( rStrm
);
367 XclExpDoubleRecord( EXC_ID_LEFTMARGIN
, maData
.mfLeftMargin
).Save( rStrm
);
368 XclExpDoubleRecord( EXC_ID_RIGHTMARGIN
, maData
.mfRightMargin
).Save( rStrm
);
369 XclExpDoubleRecord( EXC_ID_TOPMARGIN
, maData
.mfTopMargin
).Save( rStrm
);
370 XclExpDoubleRecord( EXC_ID_BOTTOMMARGIN
, maData
.mfBottomMargin
).Save( rStrm
);
371 XclExpSetup( maData
).Save( rStrm
);
373 if( (GetBiff() == EXC_BIFF8
) && maData
.mxBrushItem
.get() )
374 if( const Graphic
* pGraphic
= maData
.mxBrushItem
->GetGraphic() )
375 XclExpImgData( *pGraphic
, EXC_ID8_IMGDATA
).Save( rStrm
);
378 void XclExpPageSettings::SaveXml( XclExpXmlStream
& rStrm
)
380 XclExpXmlStartSingleElementRecord( XML_printOptions
).SaveXml( rStrm
);
381 XclExpBoolRecord( EXC_ID_PRINTHEADERS
, maData
.mbPrintHeadings
, XML_headings
).SaveXml( rStrm
);
382 XclExpBoolRecord( EXC_ID_PRINTGRIDLINES
, maData
.mbPrintGrid
, XML_gridLines
).SaveXml( rStrm
);
383 XclExpBoolRecord( EXC_ID_GRIDSET
, true, XML_gridLinesSet
).SaveXml( rStrm
);
384 XclExpBoolRecord( EXC_ID_HCENTER
, maData
.mbHorCenter
, XML_horizontalCentered
).SaveXml( rStrm
);
385 XclExpBoolRecord( EXC_ID_VCENTER
, maData
.mbVerCenter
, XML_verticalCentered
).SaveXml( rStrm
);
386 XclExpXmlEndSingleElementRecord().SaveXml( rStrm
); // XML_printOptions
388 XclExpXmlStartSingleElementRecord( XML_pageMargins
).SaveXml( rStrm
);
389 XclExpDoubleRecord( EXC_ID_LEFTMARGIN
, maData
.mfLeftMargin
).SetAttribute( XML_left
)->SaveXml( rStrm
);
390 XclExpDoubleRecord( EXC_ID_RIGHTMARGIN
, maData
.mfRightMargin
).SetAttribute( XML_right
)->SaveXml( rStrm
);
391 XclExpDoubleRecord( EXC_ID_TOPMARGIN
, maData
.mfTopMargin
).SetAttribute( XML_top
)->SaveXml( rStrm
);
392 XclExpDoubleRecord( EXC_ID_BOTTOMMARGIN
, maData
.mfBottomMargin
).SetAttribute( XML_bottom
)->SaveXml( rStrm
);
393 XclExpDoubleRecord( 0, maData
.mfHeaderMargin
).SetAttribute( XML_header
)->SaveXml( rStrm
);
394 XclExpDoubleRecord( 0, maData
.mfFooterMargin
).SetAttribute( XML_footer
)->SaveXml( rStrm
);
395 XclExpXmlEndSingleElementRecord().SaveXml( rStrm
); // XML_pageMargins
397 XclExpSetup( maData
).SaveXml( rStrm
);
399 XclExpXmlStartHeaderFooterElementRecord(XML_headerFooter
).SaveXml(rStrm
);
400 XclExpHeaderFooter( EXC_ID_HEADER
, maData
.maHeader
).SaveXml( rStrm
);
401 XclExpHeaderFooter( EXC_ID_FOOTER
, maData
.maFooter
).SaveXml( rStrm
);
402 XclExpXmlEndElementRecord( XML_headerFooter
).SaveXml( rStrm
);
404 XclExpPageBreaks( EXC_ID_HORPAGEBREAKS
, maData
.maHorPageBreaks
,
405 static_cast< sal_uInt16
>( GetXclMaxPos().Col() ) ).SaveXml( rStrm
);
406 XclExpPageBreaks( EXC_ID_VERPAGEBREAKS
, maData
.maVerPageBreaks
,
407 static_cast< sal_uInt16
>( GetXclMaxPos().Row() ) ).SaveXml( rStrm
);
410 XclExpImgData
* XclExpPageSettings::getGraphicExport()
412 if( const Graphic
* pGraphic
= maData
.mxBrushItem
->GetGraphic() )
413 return new XclExpImgData( *pGraphic
, EXC_ID8_IMGDATA
);
418 XclExpChartPageSettings::XclExpChartPageSettings( const XclExpRoot
& rRoot
) :
423 void XclExpChartPageSettings::Save( XclExpStream
& rStrm
)
425 XclExpHeaderFooter( EXC_ID_HEADER
, maData
.maHeader
).Save( rStrm
);
426 XclExpHeaderFooter( EXC_ID_FOOTER
, maData
.maFooter
).Save( rStrm
);
427 XclExpBoolRecord( EXC_ID_HCENTER
, maData
.mbHorCenter
).Save( rStrm
);
428 XclExpBoolRecord( EXC_ID_VCENTER
, maData
.mbVerCenter
).Save( rStrm
);
429 XclExpSetup( maData
).Save( rStrm
);
430 XclExpUInt16Record( EXC_ID_PRINTSIZE
, EXC_PRINTSIZE_FULL
).Save( rStrm
);
433 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */