xref: /aoo41x/main/sc/source/filter/excel/xepage.cxx (revision b3f79822)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 // MARKER(update_precomp.py): autogen include statement, do not remove
25 #include "precompiled_sc.hxx"
26 
27 #include "xepage.hxx"
28 #include <svl/itemset.hxx>
29 #include "scitems.hxx"
30 #include <svl/eitem.hxx>
31 #include <svl/intitem.hxx>
32 #include <svx/pageitem.hxx>
33 #include <editeng/sizeitem.hxx>
34 #include <editeng/lrspitem.hxx>
35 #include <editeng/ulspitem.hxx>
36 #include <editeng/brshitem.hxx>
37 #include "document.hxx"
38 #include "stlpool.hxx"
39 #include "stlsheet.hxx"
40 #include "attrib.hxx"
41 #include "xehelper.hxx"
42 #include "xeescher.hxx"
43 
44 #include <set>
45 #include <limits>
46 
47 using namespace ::oox;
48 
49 using ::rtl::OString;
50 using ::std::set;
51 using ::std::numeric_limits;
52 
53 // Page settings records ======================================================
54 
55 // Header/footer --------------------------------------------------------------
56 
XclExpHeaderFooter(sal_uInt16 nRecId,const String & rHdrString)57 XclExpHeaderFooter::XclExpHeaderFooter( sal_uInt16 nRecId, const String& rHdrString ) :
58     XclExpRecord( nRecId ),
59     maHdrString( rHdrString )
60 {
61 }
62 
SaveXml(XclExpXmlStream & rStrm)63 void XclExpHeaderFooter::SaveXml( XclExpXmlStream& rStrm )
64 {
65     sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
66     sal_Int32 nElement = GetRecId() == EXC_ID_HEADER ?  XML_oddHeader : XML_oddFooter;
67     rWorksheet->startElement( nElement, FSEND );
68     rWorksheet->writeEscaped( XclXmlUtils::ToOUString( maHdrString ) );
69     rWorksheet->endElement( nElement );
70 }
71 
WriteBody(XclExpStream & rStrm)72 void XclExpHeaderFooter::WriteBody( XclExpStream& rStrm )
73 {
74     if( maHdrString.Len() )
75     {
76         XclExpString aExString;
77         if( rStrm.GetRoot().GetBiff() <= EXC_BIFF5 )
78             aExString.AssignByte( maHdrString, rStrm.GetRoot().GetTextEncoding(), EXC_STR_8BITLENGTH );
79         else
80             aExString.Assign( maHdrString, EXC_STR_DEFAULT, 255 );  // 16-bit length, but max 255 chars
81         rStrm << aExString;
82     }
83 }
84 
85 // General page settings ------------------------------------------------------
86 
XclExpSetup(const XclPageData & rPageData)87 XclExpSetup::XclExpSetup( const XclPageData& rPageData ) :
88     XclExpRecord( EXC_ID_SETUP, 34 ),
89     mrData( rPageData )
90 {
91 }
92 
SaveXml(XclExpXmlStream & rStrm)93 void XclExpSetup::SaveXml( XclExpXmlStream& rStrm )
94 {
95     rStrm.GetCurrentStream()->singleElement( XML_pageSetup,
96             XML_paperSize,          OString::valueOf( (sal_Int32) mrData.mnPaperSize ).getStr(),
97             XML_scale,              OString::valueOf( (sal_Int32) mrData.mnScaling ).getStr(),
98             XML_firstPageNumber,    OString::valueOf( (sal_Int32) mrData.mnStartPage ).getStr(),
99             XML_fitToWidth,         OString::valueOf( (sal_Int32) mrData.mnFitToWidth ).getStr(),
100             XML_fitToHeight,        OString::valueOf( (sal_Int32) mrData.mnFitToHeight ).getStr(),
101             XML_pageOrder,          mrData.mbPrintInRows ? "overThenDown" : "downThenOver",
102             XML_orientation,        mrData.mbPortrait ? "portrait" : "landscape",   // OOXTODO: "default"?
103             XML_usePrinterDefaults, XclXmlUtils::ToPsz( !mrData.mbValid ),
104             XML_blackAndWhite,      XclXmlUtils::ToPsz( mrData.mbBlackWhite ),
105             XML_draft,              XclXmlUtils::ToPsz( mrData.mbDraftQuality ),
106             XML_cellComments,       mrData.mbPrintNotes ? "atEnd" : "none",         // OOXTODO: "asDisplayed"?
107             XML_useFirstPageNumber, XclXmlUtils::ToPsz( mrData.mbManualStart ),
108             // OOXTODO: XML_errors, // == displayed|blank|dash|NA
109             XML_horizontalDpi,      OString::valueOf( (sal_Int32) mrData.mnHorPrintRes ).getStr(),
110             XML_verticalDpi,        OString::valueOf( (sal_Int32) mrData.mnVerPrintRes ).getStr(),
111             XML_copies,             OString::valueOf( (sal_Int32) mrData.mnCopies ).getStr(),
112             // OOXTODO: devMode settings part RelationshipId: FSNS( XML_r, XML_id ),
113             FSEND );
114 }
115 
WriteBody(XclExpStream & rStrm)116 void XclExpSetup::WriteBody( XclExpStream& rStrm )
117 {
118     XclBiff eBiff = rStrm.GetRoot().GetBiff();
119 
120     sal_uInt16 nFlags = 0;
121     ::set_flag( nFlags, EXC_SETUP_INROWS,       mrData.mbPrintInRows );
122     ::set_flag( nFlags, EXC_SETUP_PORTRAIT,     mrData.mbPortrait );
123     ::set_flag( nFlags, EXC_SETUP_INVALID,      !mrData.mbValid );
124     ::set_flag( nFlags, EXC_SETUP_BLACKWHITE,   mrData.mbBlackWhite );
125     if( eBiff >= EXC_BIFF5 )
126     {
127         ::set_flag( nFlags, EXC_SETUP_DRAFT,        mrData.mbDraftQuality );
128         /*  Set the Comments/Notes to "At end of sheet" if Print Notes is true.
129             We don't currently support "as displayed on sheet". Thus this value
130             will be re-interpreted to "At end of sheet". */
131         const sal_uInt16 nNotes = EXC_SETUP_PRINTNOTES | EXC_SETUP_NOTES_END;
132         ::set_flag( nFlags, nNotes,                 mrData.mbPrintNotes );
133         ::set_flag( nFlags, EXC_SETUP_STARTPAGE,    mrData.mbManualStart );
134     }
135 
136     rStrm   << mrData.mnPaperSize << mrData.mnScaling << mrData.mnStartPage
137             << mrData.mnFitToWidth << mrData.mnFitToHeight << nFlags;
138     if( eBiff >= EXC_BIFF5 )
139     {
140         rStrm   << mrData.mnHorPrintRes << mrData.mnVerPrintRes
141                 << mrData.mfHeaderMargin << mrData.mfFooterMargin << mrData.mnCopies;
142     }
143 }
144 
145 // Manual page breaks ---------------------------------------------------------
146 
XclExpPageBreaks(sal_uInt16 nRecId,const ScfUInt16Vec & rPageBreaks,sal_uInt16 nMaxPos)147 XclExpPageBreaks::XclExpPageBreaks( sal_uInt16 nRecId, const ScfUInt16Vec& rPageBreaks, sal_uInt16 nMaxPos ) :
148     XclExpRecord( nRecId ),
149     mrPageBreaks( rPageBreaks ),
150     mnMaxPos( nMaxPos )
151 {
152 }
153 
Save(XclExpStream & rStrm)154 void XclExpPageBreaks::Save( XclExpStream& rStrm )
155 {
156     if( !mrPageBreaks.empty() )
157     {
158         SetRecSize( 2 + ((rStrm.GetRoot().GetBiff() <= EXC_BIFF5) ? 2 : 6) * mrPageBreaks.size() );
159         XclExpRecord::Save( rStrm );
160     }
161 }
162 
WriteBody(XclExpStream & rStrm)163 void XclExpPageBreaks::WriteBody( XclExpStream& rStrm )
164 {
165     bool bWriteRange = (rStrm.GetRoot().GetBiff() == EXC_BIFF8);
166 
167     rStrm << static_cast< sal_uInt16 >( mrPageBreaks.size() );
168     for( ScfUInt16Vec::const_iterator aIt = mrPageBreaks.begin(), aEnd = mrPageBreaks.end(); aIt != aEnd; ++aIt )
169     {
170         rStrm << *aIt;
171         if( bWriteRange )
172             rStrm << sal_uInt16( 0 ) << mnMaxPos;
173     }
174 }
175 
SaveXml(XclExpXmlStream & rStrm)176 void XclExpPageBreaks::SaveXml( XclExpXmlStream& rStrm )
177 {
178     if( mrPageBreaks.empty() )
179         return;
180 
181     sal_Int32 nElement = GetRecId() == EXC_ID_HORPAGEBREAKS ? XML_rowBreaks : XML_colBreaks;
182     sax_fastparser::FSHelperPtr& pWorksheet = rStrm.GetCurrentStream();
183     OString sNumPageBreaks = OString::valueOf( (sal_Int32) mrPageBreaks.size() );
184     pWorksheet->startElement( nElement,
185             XML_count,              sNumPageBreaks.getStr(),
186             XML_manualBreakCount,   sNumPageBreaks.getStr(),
187             FSEND );
188     for( ScfUInt16Vec::const_iterator aIt = mrPageBreaks.begin(), aEnd = mrPageBreaks.end(); aIt != aEnd; ++aIt )
189     {
190         pWorksheet->singleElement( XML_brk,
191                 XML_id,     OString::valueOf( (sal_Int32) *aIt ).getStr(),
192                 XML_man,    "true",
193                 XML_max,    OString::valueOf( (sal_Int32) mnMaxPos ).getStr(),
194                 XML_min,    "0",
195                 // OOXTODO: XML_pt, "",
196                 FSEND );
197     }
198     pWorksheet->endElement( nElement );
199 }
200 
201 // Page settings ==============================================================
202 
XclExpPageSettings(const XclExpRoot & rRoot)203 XclExpPageSettings::XclExpPageSettings( const XclExpRoot& rRoot ) :
204     XclExpRoot( rRoot )
205 {
206     ScDocument& rDoc = GetDoc();
207     SCTAB nScTab = GetCurrScTab();
208 
209     if( SfxStyleSheetBase* pStyleSheet = GetStyleSheetPool().Find( rDoc.GetPageStyle( nScTab ), SFX_STYLE_FAMILY_PAGE ) )
210     {
211         const SfxItemSet& rItemSet = pStyleSheet->GetItemSet();
212         maData.mbValid = true;
213 
214         // *** page settings ***
215 
216         maData.mbPrintInRows   = !GETITEMBOOL( rItemSet, ATTR_PAGE_TOPDOWN   );
217         maData.mbHorCenter     =  GETITEMBOOL( rItemSet, ATTR_PAGE_HORCENTER );
218         maData.mbVerCenter     =  GETITEMBOOL( rItemSet, ATTR_PAGE_VERCENTER );
219         maData.mbPrintHeadings =  GETITEMBOOL( rItemSet, ATTR_PAGE_HEADERS   );
220         maData.mbPrintGrid     =  GETITEMBOOL( rItemSet, ATTR_PAGE_GRID      );
221         maData.mbPrintNotes    =  GETITEMBOOL( rItemSet, ATTR_PAGE_NOTES     );
222 
223         maData.mnStartPage     = GETITEMVALUE( rItemSet, SfxUInt16Item, ATTR_PAGE_FIRSTPAGENO, sal_uInt16 );
224         maData.mbManualStart   = maData.mnStartPage && (!nScTab || rDoc.NeedPageResetAfterTab( nScTab - 1 ));
225 
226         const SvxLRSpaceItem& rLRItem = GETITEM( rItemSet, SvxLRSpaceItem, ATTR_LRSPACE );
227         maData.mfLeftMargin    = XclTools::GetInchFromTwips( rLRItem.GetLeft() );
228         maData.mfRightMargin   = XclTools::GetInchFromTwips( rLRItem.GetRight() );
229         const SvxULSpaceItem& rULItem = GETITEM( rItemSet, SvxULSpaceItem, ATTR_ULSPACE );
230         maData.mfTopMargin     = XclTools::GetInchFromTwips( rULItem.GetUpper() );
231         maData.mfBottomMargin  = XclTools::GetInchFromTwips( rULItem.GetLower() );
232 
233         const SvxPageItem& rPageItem = GETITEM( rItemSet, SvxPageItem, ATTR_PAGE );
234         const SvxSizeItem& rSizeItem = GETITEM( rItemSet, SvxSizeItem, ATTR_PAGE_SIZE );
235         maData.SetScPaperSize( rSizeItem.GetSize(), !rPageItem.IsLandscape() );
236 
237         const ScPageScaleToItem& rScaleToItem = GETITEM( rItemSet, ScPageScaleToItem, ATTR_PAGE_SCALETO );
238         sal_uInt16 nPages = GETITEMVALUE( rItemSet, SfxUInt16Item, ATTR_PAGE_SCALETOPAGES, sal_uInt16 );
239         sal_uInt16 nScale = GETITEMVALUE( rItemSet, SfxUInt16Item, ATTR_PAGE_SCALE, sal_uInt16 );
240 
241         if( ScfTools::CheckItem( rItemSet, ATTR_PAGE_SCALETO, false ) && rScaleToItem.IsValid() )
242         {
243             maData.mnFitToWidth = rScaleToItem.GetWidth();
244             maData.mnFitToHeight = rScaleToItem.GetHeight();
245             maData.mbFitToPages = true;
246 
247         }
248         else if( ScfTools::CheckItem( rItemSet, ATTR_PAGE_SCALETOPAGES, false ) && nPages )
249         {
250             maData.mnFitToWidth = 1;
251             maData.mnFitToHeight = nPages;
252             maData.mbFitToPages = true;
253         }
254         else if( nScale )
255         {
256             maData.mnScaling = nScale;
257             maData.mbFitToPages = false;
258         }
259 
260         maData.mxBrushItem.reset( new SvxBrushItem( GETITEM( rItemSet, SvxBrushItem, ATTR_BACKGROUND ) ) );
261 
262         // *** header and footer ***
263 
264         XclExpHFConverter aHFConv( GetRoot() );
265 
266         // header
267         const SfxItemSet& rHdrItemSet = GETITEM( rItemSet, SvxSetItem, ATTR_PAGE_HEADERSET ).GetItemSet();
268         if( GETITEMBOOL( rHdrItemSet, ATTR_PAGE_ON ) )
269         {
270             const ScPageHFItem& rHFItem = GETITEM( rItemSet, ScPageHFItem, ATTR_PAGE_HEADERRIGHT );
271             aHFConv.GenerateString( rHFItem.GetLeftArea(), rHFItem.GetCenterArea(), rHFItem.GetRightArea() );
272             maData.maHeader = aHFConv.GetHFString();
273             // header height (Excel excludes header from top margin)
274             sal_Int32 nHdrHeight = GETITEMBOOL( rHdrItemSet, ATTR_PAGE_DYNAMIC ) ?
275                 // dynamic height: calculate header height, add header <-> sheet area distance
276                 (aHFConv.GetTotalHeight() + GETITEM( rHdrItemSet, SvxULSpaceItem, ATTR_ULSPACE ).GetLower()) :
277                 // static height: ATTR_PAGE_SIZE already includes header <-> sheet area distance
278                 static_cast< sal_Int32 >( GETITEM( rHdrItemSet, SvxSizeItem, ATTR_PAGE_SIZE ).GetSize().Height() );
279             maData.mfHeaderMargin = maData.mfTopMargin;
280             maData.mfTopMargin += XclTools::GetInchFromTwips( nHdrHeight );
281         }
282 
283         // footer
284         const SfxItemSet& rFtrItemSet = GETITEM( rItemSet, SvxSetItem, ATTR_PAGE_FOOTERSET ).GetItemSet();
285         if( GETITEMBOOL( rFtrItemSet, ATTR_PAGE_ON ) )
286         {
287             const ScPageHFItem& rHFItem = GETITEM( rItemSet, ScPageHFItem, ATTR_PAGE_FOOTERRIGHT );
288             aHFConv.GenerateString( rHFItem.GetLeftArea(), rHFItem.GetCenterArea(), rHFItem.GetRightArea() );
289             maData.maFooter = aHFConv.GetHFString();
290             // footer height (Excel excludes footer from bottom margin)
291             sal_Int32 nFtrHeight = GETITEMBOOL( rFtrItemSet, ATTR_PAGE_DYNAMIC ) ?
292                 // dynamic height: calculate footer height, add sheet area <-> footer distance
293                 (aHFConv.GetTotalHeight() + GETITEM( rFtrItemSet, SvxULSpaceItem, ATTR_ULSPACE ).GetUpper()) :
294                 // static height: ATTR_PAGE_SIZE already includes sheet area <-> footer distance
295                 static_cast< sal_Int32 >( GETITEM( rFtrItemSet, SvxSizeItem, ATTR_PAGE_SIZE ).GetSize().Height() );
296             maData.mfFooterMargin = maData.mfBottomMargin;
297             maData.mfBottomMargin += XclTools::GetInchFromTwips( nFtrHeight );
298         }
299     }
300 
301     // *** page breaks ***
302 
303     set<SCROW> aRowBreaks;
304     rDoc.GetAllRowBreaks(aRowBreaks, nScTab, false, true);
305 
306     SCROW nMaxRow = numeric_limits<sal_uInt16>::max();
307     for (set<SCROW>::const_iterator itr = aRowBreaks.begin(), itrEnd = aRowBreaks.end(); itr != itrEnd; ++itr)
308     {
309         SCROW nRow = *itr;
310         if (nRow > nMaxRow)
311             break;
312 
313         maData.maHorPageBreaks.push_back(nRow);
314     }
315 
316     set<SCCOL> aColBreaks;
317     rDoc.GetAllColBreaks(aColBreaks, nScTab, false, true);
318     for (set<SCCOL>::const_iterator itr = aColBreaks.begin(), itrEnd = aColBreaks.end(); itr != itrEnd; ++itr)
319         maData.maVerPageBreaks.push_back(*itr);
320 }
321 
lcl_WriteHeaderFooter(XclExpXmlStream & rStrm)322 static void lcl_WriteHeaderFooter( XclExpXmlStream& rStrm )
323 {
324     // OOXTODO: we currently only emit oddHeader/oddFooter elements, and
325     //          do not support the first/even/odd page distinction.
326     rStrm.WriteAttributes(
327             // OOXTODO: XML_alignWithMargins,
328             XML_differentFirst,     "false",    // OOXTODO
329             XML_differentOddEven,   "false",    // OOXTODO
330             // OOXTODO: XML_scaleWithDoc
331             FSEND );
332     rStrm.GetCurrentStream()->write( ">" );
333 }
334 
Save(XclExpStream & rStrm)335 void XclExpPageSettings::Save( XclExpStream& rStrm )
336 {
337     XclExpBoolRecord( EXC_ID_PRINTHEADERS, maData.mbPrintHeadings ).Save( rStrm );
338     XclExpBoolRecord( EXC_ID_PRINTGRIDLINES, maData.mbPrintGrid ).Save( rStrm );
339     XclExpBoolRecord( EXC_ID_GRIDSET, true ).Save( rStrm );
340     XclExpPageBreaks( EXC_ID_HORPAGEBREAKS, maData.maHorPageBreaks, static_cast< sal_uInt16 >( GetXclMaxPos().Col() ) ).Save( rStrm );
341     XclExpPageBreaks( EXC_ID_VERPAGEBREAKS, maData.maVerPageBreaks, static_cast< sal_uInt16 >( GetXclMaxPos().Row() ) ).Save( rStrm );
342     XclExpHeaderFooter( EXC_ID_HEADER, maData.maHeader ).Save( rStrm );
343     XclExpHeaderFooter( EXC_ID_FOOTER, maData.maFooter ).Save( rStrm );
344     XclExpBoolRecord( EXC_ID_HCENTER, maData.mbHorCenter ).Save( rStrm );
345     XclExpBoolRecord( EXC_ID_VCENTER, maData.mbVerCenter ).Save( rStrm );
346     XclExpDoubleRecord( EXC_ID_LEFTMARGIN, maData.mfLeftMargin ).Save( rStrm );
347     XclExpDoubleRecord( EXC_ID_RIGHTMARGIN, maData.mfRightMargin ).Save( rStrm );
348     XclExpDoubleRecord( EXC_ID_TOPMARGIN, maData.mfTopMargin ).Save( rStrm );
349     XclExpDoubleRecord( EXC_ID_BOTTOMMARGIN, maData.mfBottomMargin ).Save( rStrm );
350     XclExpSetup( maData ).Save( rStrm );
351 
352     if( (GetBiff() == EXC_BIFF8) && maData.mxBrushItem.get() )
353         if( const Graphic* pGraphic = maData.mxBrushItem->GetGraphic() )
354             XclExpImgData( *pGraphic, EXC_ID8_IMGDATA ).Save( rStrm );
355 }
356 
SaveXml(XclExpXmlStream & rStrm)357 void XclExpPageSettings::SaveXml( XclExpXmlStream& rStrm )
358 {
359     XclExpXmlStartSingleElementRecord( XML_printOptions ).SaveXml( rStrm );
360     XclExpBoolRecord( EXC_ID_PRINTHEADERS, maData.mbPrintHeadings, XML_headings ).SaveXml( rStrm );
361     XclExpBoolRecord( EXC_ID_PRINTGRIDLINES, maData.mbPrintGrid, XML_gridLines ).SaveXml( rStrm );
362     XclExpBoolRecord( EXC_ID_GRIDSET, true, XML_gridLinesSet ).SaveXml( rStrm );
363     XclExpBoolRecord( EXC_ID_HCENTER, maData.mbHorCenter, XML_horizontalCentered ).SaveXml( rStrm );
364     XclExpBoolRecord( EXC_ID_VCENTER, maData.mbVerCenter, XML_verticalCentered ).SaveXml( rStrm );
365     XclExpXmlEndSingleElementRecord().SaveXml( rStrm );    // XML_printOptions
366 
367     XclExpXmlStartSingleElementRecord( XML_pageMargins ).SaveXml( rStrm );
368     XclExpDoubleRecord( EXC_ID_LEFTMARGIN, maData.mfLeftMargin ).SetAttribute( XML_left )->SaveXml( rStrm );
369     XclExpDoubleRecord( EXC_ID_RIGHTMARGIN, maData.mfRightMargin ).SetAttribute( XML_right )->SaveXml( rStrm );
370     XclExpDoubleRecord( EXC_ID_TOPMARGIN, maData.mfTopMargin ).SetAttribute( XML_top )->SaveXml( rStrm );
371     XclExpDoubleRecord( EXC_ID_BOTTOMMARGIN, maData.mfBottomMargin ).SetAttribute( XML_bottom )->SaveXml( rStrm );
372     XclExpDoubleRecord( 0, maData.mfHeaderMargin).SetAttribute( XML_header )->SaveXml( rStrm );
373     XclExpDoubleRecord( 0, maData.mfFooterMargin).SetAttribute( XML_footer )->SaveXml( rStrm );
374     XclExpXmlEndSingleElementRecord().SaveXml( rStrm );    // XML_pageMargins
375 
376     XclExpSetup( maData ).SaveXml( rStrm );
377 
378     XclExpXmlStartElementRecord( XML_headerFooter, lcl_WriteHeaderFooter ).SaveXml( rStrm );
379     XclExpHeaderFooter( EXC_ID_HEADER, maData.maHeader ).SaveXml( rStrm );
380     XclExpHeaderFooter( EXC_ID_FOOTER, maData.maFooter ).SaveXml( rStrm );
381     XclExpXmlEndElementRecord( XML_headerFooter ).SaveXml( rStrm );
382 
383     XclExpPageBreaks( EXC_ID_HORPAGEBREAKS, maData.maHorPageBreaks,
384                     static_cast< sal_uInt16 >( GetXclMaxPos().Col() ) ).SaveXml( rStrm );
385     XclExpPageBreaks( EXC_ID_VERPAGEBREAKS, maData.maVerPageBreaks,
386                     static_cast< sal_uInt16 >( GetXclMaxPos().Row() ) ).SaveXml( rStrm );
387 
388     if( const Graphic* pGraphic = maData.mxBrushItem->GetGraphic() )
389         XclExpImgData( *pGraphic, EXC_ID8_IMGDATA ).SaveXml( rStrm );
390 }
391 
392 // ----------------------------------------------------------------------------
393 
XclExpChartPageSettings(const XclExpRoot & rRoot)394 XclExpChartPageSettings::XclExpChartPageSettings( const XclExpRoot& rRoot ) :
395     XclExpRoot( rRoot )
396 {
397 }
398 
Save(XclExpStream & rStrm)399 void XclExpChartPageSettings::Save( XclExpStream& rStrm )
400 {
401     XclExpHeaderFooter( EXC_ID_HEADER, maData.maHeader ).Save( rStrm );
402     XclExpHeaderFooter( EXC_ID_FOOTER, maData.maFooter ).Save( rStrm );
403     XclExpBoolRecord( EXC_ID_HCENTER, maData.mbHorCenter ).Save( rStrm );
404     XclExpBoolRecord( EXC_ID_VCENTER, maData.mbVerCenter ).Save( rStrm );
405     XclExpSetup( maData ).Save( rStrm );
406     XclExpUInt16Record( EXC_ID_PRINTSIZE, EXC_PRINTSIZE_FULL ).Save( rStrm );
407 }
408 
409 // ============================================================================
410 
411