update dev300-m58
[ooovba.git] / sc / source / filter / inc / xipage.hxx
blob3b052418b945126450e2633956082a41870f492a
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: xipage.hxx,v $
10 * $Revision: 1.7.90.2 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef SC_XIPAGE_HXX
32 #define SC_XIPAGE_HXX
34 #include "xlpage.hxx"
35 #include "xiroot.hxx"
37 // Page settings ==============================================================
39 /** Contains all page (print) settings for a single sheet.
40 @descr Supports reading all related records and creating a page style sheet. */
41 class XclImpPageSettings : protected XclImpRoot
43 public:
44 explicit XclImpPageSettings( const XclImpRoot& rRoot );
46 /** Returns read-only access to the page data. */
47 inline const XclPageData& GetPageData() const { return maData; }
49 /** Initializes the object to be used for a new sheet. */
50 void Initialize();
52 /** Reads a SETUP record and inserts contained data. */
53 void ReadSetup( XclImpStream& rStrm );
54 /** Reads a ***MARGIN record (reads all 4 margin records). */
55 void ReadMargin( XclImpStream& rStrm );
56 /** Reads a HCENTER or VCENTER record. */
57 void ReadCenter( XclImpStream& rStrm );
58 /** Reads a HEADER or FOOTER record. */
59 void ReadHeaderFooter( XclImpStream& rStrm );
60 /** Reads a HORIZONTALPAGEBREAKS or VERTICALPAGEBREAKS record. */
61 void ReadPageBreaks( XclImpStream& rStrm );
62 /** Reads a PRINTHEADERS record. */
63 void ReadPrintHeaders( XclImpStream& rStrm );
64 /** Reads a PRINTGRIDLINES record. */
65 void ReadPrintGridLines( XclImpStream& rStrm );
66 /** Reads an IMGDATA record and creates the SvxBrushItem. */
67 void ReadImgData( XclImpStream& rStrm );
69 /** Overrides paper size and orientation (used in sheet-charts). */
70 void SetPaperSize( sal_uInt16 nXclPaperSize, bool bPortrait );
71 /** Sets or clears the fit-to-pages setting (contained in WSBOOL record). */
72 inline void SetFitToPages( bool bFitToPages ) { maData.mbFitToPages = bFitToPages; }
74 /** Creates a page stylesheet from current settings and sets it at current sheet. */
75 void Finalize();
77 private:
78 XclPageData maData; /// Page settings data.
79 bool mbValidPaper; /// true = Paper size and orientation valid.
82 // ============================================================================
84 #endif