build fix
[LibreOffice.git] / lotuswordpro / source / filter / lwppagelayout.hxx
blob5852bc9e2a2f0722e3d2fc579049a6dddbe6125d
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * The Contents of this file are made available subject to the terms of
5 * either of the following licenses
7 * - GNU Lesser General Public License Version 2.1
8 * - Sun Industry Standards Source License Version 1.1
10 * Sun Microsystems Inc., October, 2000
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
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.
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.
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
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.
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.
46 * The Initial Developer of the Original Code is: IBM Corporation
48 * Copyright: 2008 by IBM Corporation
50 * All Rights Reserved.
52 * Contributor(s): _______________________________________
55 ************************************************************************/
57 #ifndef INCLUDED_LOTUSWORDPRO_SOURCE_FILTER_LWPPAGELAYOUT_HXX
58 #define INCLUDED_LOTUSWORDPRO_SOURCE_FILTER_LWPPAGELAYOUT_HXX
60 #include "lwplayout.hxx"
61 #include "xfilter/xfmasterpage.hxx"
64 class LwpHeaderLayout;
65 class LwpFooterLayout;
67 class LwpPageLayout: public LwpLayout
69 public:
70 LwpPageLayout(LwpObjectHeader &objHdr, LwpSvStream* pStrm);
71 virtual ~LwpPageLayout() override;
72 virtual void RegisterStyle() override;
73 OUString RegisterEndnoteStyle();
74 virtual void Parse(IXFStream* pOutputStream) override;
75 virtual LWP_LAYOUT_TYPE GetLayoutType () override { return LWP_PAGE_LAYOUT;}
76 protected:
77 void Read() override;
78 LwpHeaderLayout* GetHeaderLayout();
79 LwpFooterLayout* GetFooterLayout();
80 void ParseGeometry(XFPageMaster* pm1);
81 void ParseMargins(XFPageMaster* pm1);
82 void ParseBorders(XFPageMaster* pm1);
83 void ParsePatternFill(XFPageMaster* pm1);
84 void ParseBackGround(XFPageMaster* pm1);
85 void ParseBackColor(XFPageMaster* pm1);
86 void ParseWaterMark(XFPageMaster* pm1);
87 void ParseColumns(XFPageMaster* pm1);
88 void ParseShadow(XFPageMaster* pm1);
89 void ParseFootNoteSeparator(XFPageMaster* pm1);
90 double GetMarginWidth();
91 void GetWidthAndHeight(double& fWidth, double& fHeight);
92 double GetWidth() override;
93 double GetHeight() override;
94 protected:
95 LwpAtomHolder* m_pPrinterBinName;
96 sal_uInt16 m_nPrinterBin;
97 sal_Int32 m_nBdroffset;
98 LwpAtomHolder* m_pPaperName;
99 XFPageMaster* m_pXFPageMaster;
100 public:
101 bool HasColumns();
102 bool HasFillerPageText(LwpFoundry* pFoundry);
103 void ConvertFillerPageText(XFContentContainer* pCont);
104 void ResetXFColumns();
105 LwpPageLayout* GetOddChildLayout();
106 virtual sal_Int32 GetPageNumber(sal_uInt16 nLayoutNumber) override;
107 bool operator <(LwpPageLayout& Other);
108 LwpPara* GetPagePosition();
111 class LwpHeaderLayout: public LwpPlacableLayout
113 public:
114 LwpHeaderLayout(LwpObjectHeader &objHdr, LwpSvStream* pStrm);
115 virtual ~LwpHeaderLayout() override;
116 virtual LWP_LAYOUT_TYPE GetLayoutType () override { return LWP_HEADER_LAYOUT;}
117 using LwpPlacableLayout::RegisterStyle;
118 void RegisterStyle( XFPageMaster* pm1 );
119 void RegisterStyle( XFMasterPage* mp1 );
120 protected:
121 void Read() override;
122 void ParseMargins( XFHeaderStyle* ph1 );
123 void ParseBorder( XFHeaderStyle* ph1 );
124 void ParseShadow( XFHeaderStyle* ph1 );
125 void ParsePatternFill(XFHeaderStyle* ph1);
126 void ParseBackGround(XFHeaderStyle* ph1);
127 void ParseBackColor(XFHeaderStyle* ph1);
129 void ParseWaterMark(XFHeaderStyle* ph1);
130 private:
131 sal_Int32 m_nBorderOffset;
134 class LwpFooterLayout: public LwpPlacableLayout
136 public:
137 LwpFooterLayout(LwpObjectHeader &objHdr, LwpSvStream* pStrm);
138 virtual ~LwpFooterLayout() override;
139 virtual LWP_LAYOUT_TYPE GetLayoutType () override { return LWP_FOOTER_LAYOUT;}
140 using LwpPlacableLayout::RegisterStyle;
141 void RegisterStyle(XFPageMaster* pm1);
142 void RegisterStyle(XFMasterPage* mp1);
143 protected:
144 void Read() override;
145 void ParseMargins( XFFooterStyle* pFooterStyle );
146 void ParseBorder( XFFooterStyle* pFooterStyle );
147 void ParseShadow( XFFooterStyle* pFooterStyle );
148 void ParsePatternFill(XFFooterStyle* pFooterStyle);
149 void ParseBackGround(XFFooterStyle* pFooterStyle);
151 void ParseBackColor(XFFooterStyle* pFooterStyle);
153 void ParseWaterMark(XFFooterStyle* pFooterStyle);
155 private:
156 sal_Int32 m_nBorderOffset;
159 #endif
161 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */