Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*************************************************************************
3 : : *
4 : : * The Contents of this file are made available subject to the terms of
5 : : * either of the following licenses
6 : : *
7 : : * - GNU Lesser General Public License Version 2.1
8 : : * - Sun Industry Standards Source License Version 1.1
9 : : *
10 : : * Sun Microsystems Inc., October, 2000
11 : : *
12 : : * GNU Lesser General Public License Version 2.1
13 : : * =============================================
14 : : * Copyright 2000 by Sun Microsystems, Inc.
15 : : * 901 San Antonio Road, Palo Alto, CA 94303, USA
16 : : *
17 : : * This library is free software; you can redistribute it and/or
18 : : * modify it under the terms of the GNU Lesser General Public
19 : : * License version 2.1, as published by the Free Software Foundation.
20 : : *
21 : : * This library is distributed in the hope that it will be useful,
22 : : * but WITHOUT ANY WARRANTY; without even the implied warranty of
23 : : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
24 : : * Lesser General Public License for more details.
25 : : *
26 : : * You should have received a copy of the GNU Lesser General Public
27 : : * License along with this library; if not, write to the Free Software
28 : : * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
29 : : * MA 02111-1307 USA
30 : : *
31 : : *
32 : : * Sun Industry Standards Source License Version 1.1
33 : : * =================================================
34 : : * The contents of this file are subject to the Sun Industry Standards
35 : : * Source License Version 1.1 (the "License"); You may not use this file
36 : : * except in compliance with the License. You may obtain a copy of the
37 : : * License at http://www.openoffice.org/license.html.
38 : : *
39 : : * Software provided under this License is provided on an "AS IS" basis,
40 : : * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
41 : : * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
42 : : * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
43 : : * See the License for the specific provisions governing your rights and
44 : : * obligations concerning the Software.
45 : : *
46 : : * The Initial Developer of the Original Code is: IBM Corporation
47 : : *
48 : : * Copyright: 2008 by IBM Corporation
49 : : *
50 : : * All Rights Reserved.
51 : : *
52 : : * Contributor(s): _______________________________________
53 : : *
54 : : *
55 : : ************************************************************************/
56 : : /*************************************************************************
57 : : * Change History
58 : : Mar 2005 Created
59 : : ************************************************************************/
60 : :
61 : : #ifndef _LWPPAGELAYOUT_HXX
62 : : #define _LWPPAGELAYOUT_HXX
63 : :
64 : : #include "lwplayout.hxx"
65 : :
66 : : class LwpHeaderLayout;
67 : : class LwpFooterLayout;
68 : :
69 : : class LwpPageLayout: public LwpLayout
70 : : {
71 : : public:
72 : : LwpPageLayout(LwpObjectHeader &objHdr, LwpSvStream* pStrm);
73 : : virtual ~LwpPageLayout();
74 : : virtual void RegisterStyle();
75 : : OUString RegisterEndnoteStyle();
76 : : virtual void Parse(IXFStream* pOutputStream);
77 : 2475 : virtual LWP_LAYOUT_TYPE GetLayoutType () { return LWP_PAGE_LAYOUT;}
78 : : protected:
79 : : void Read();
80 : : LwpHeaderLayout* GetHeaderLayout();
81 : : LwpFooterLayout* GetFooterLayout();
82 : : //void RegisterChildStyle();
83 : : void ParseGeometry(XFPageMaster* pm1);
84 : : void ParseMargins(XFPageMaster* pm1);
85 : : void ParseBorders(XFPageMaster* pm1);
86 : : // add by , 06/03/2005
87 : : void ParsePatternFill(XFPageMaster* pm1);
88 : : void ParseBackGround(XFPageMaster* pm1);
89 : : // end add
90 : : void ParseBackColor(XFPageMaster* pm1);
91 : : void ParseWaterMark(XFPageMaster* pm1);
92 : : void ParseColumns(XFPageMaster* pm1);
93 : : void ParseShadow(XFPageMaster* pm1);
94 : : void ParseFootNoteSeparator(XFPageMaster* pm1);
95 : : double GetMarginWidth();
96 : : void GetWidthAndHeight(double& fWidth, double& fHeight);
97 : : double GetWidth();
98 : : double GetHeight();
99 : : protected:
100 : : LwpAtomHolder* m_pPrinterBinName;
101 : : sal_uInt16 m_nPrinterBin;
102 : : sal_Int32 m_nBdroffset;
103 : : LwpAtomHolder* m_pPaperName;
104 : : XFPageMaster* m_pXFPageMaster;
105 : : public:
106 : : sal_Bool HasColumns();
107 : : sal_Bool HasFillerPageText(LwpFoundry* pFoundry);
108 : : void ConvertFillerPageText(XFContentContainer* pCont);
109 : : void ResetXFColumns();
110 : : LwpPageLayout* GetOddChildLayout();
111 : : virtual sal_Int32 GetPageNumber(sal_uInt16 nLayoutNumber = 0);
112 : : sal_Bool operator <(LwpPageLayout& Other);
113 : : LwpPara* GetPagePosition();
114 : : };
115 : :
116 : : #include "xfilter/xfmasterpage.hxx"
117 : :
118 : : class LwpHeaderLayout: public LwpPlacableLayout
119 : : {
120 : : public:
121 : : LwpHeaderLayout(LwpObjectHeader &objHdr, LwpSvStream* pStrm);
122 : : ~LwpHeaderLayout();
123 : 240 : virtual LWP_LAYOUT_TYPE GetLayoutType () { return LWP_HEADER_LAYOUT;}
124 : : using LwpPlacableLayout::RegisterStyle;
125 : : void RegisterStyle( XFPageMaster* pm1 );
126 : : void RegisterStyle( XFMasterPage* mp1 );
127 : : protected:
128 : : void Read();
129 : : void ParseMargins( XFHeaderStyle* ph1 );
130 : : void ParseBorder( XFHeaderStyle* ph1 );
131 : : void ParseShadow( XFHeaderStyle* ph1 );
132 : : // add by , 06/03/2005
133 : : void ParsePatternFill(XFHeaderStyle* ph1);
134 : : void ParseBackGround(XFHeaderStyle* ph1);
135 : : // end add
136 : : void ParseBackColor(XFHeaderStyle* ph1);
137 : :
138 : : void ParseWaterMark(XFHeaderStyle* ph1);
139 : : //End by
140 : : private:
141 : : sal_Int32 m_nBorderOffset;
142 : : };
143 : :
144 : : class LwpFooterLayout: public LwpPlacableLayout
145 : : {
146 : : public:
147 : : LwpFooterLayout(LwpObjectHeader &objHdr, LwpSvStream* pStrm);
148 : : ~LwpFooterLayout();
149 : 201 : virtual LWP_LAYOUT_TYPE GetLayoutType () { return LWP_FOOTER_LAYOUT;}
150 : : using LwpPlacableLayout::RegisterStyle;
151 : : void RegisterStyle(XFPageMaster* pm1);
152 : : void RegisterStyle(XFMasterPage* mp1);
153 : : protected:
154 : : void Read();
155 : : void ParseMargins( XFFooterStyle* pFooterStyle );
156 : : void ParseBorder( XFFooterStyle* pFooterStyle );
157 : : void ParseShadow( XFFooterStyle* pFooterStyle );
158 : : // add by , 06/03/2005
159 : : void ParsePatternFill(XFFooterStyle* pFooterStyle);
160 : : void ParseBackGround(XFFooterStyle* pFooterStyle);
161 : : // end add
162 : :
163 : : void ParseBackColor(XFFooterStyle* pFooterStyle);
164 : :
165 : : void ParseWaterMark(XFFooterStyle* pFooterStyle);
166 : : //End by
167 : :
168 : : private:
169 : : sal_Int32 m_nBorderOffset;
170 : : };
171 : :
172 : : #endif
173 : :
174 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|