Version 5.2.6.1, tag libreoffice-5.2.6.1
[LibreOffice.git] / lotuswordpro / source / filter / lwppagelayout.hxx
blob8074c3bbc7a35c1e9540f58784428f4d017a33a6
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"
62 class LwpHeaderLayout;
63 class LwpFooterLayout;
65 class LwpPageLayout: public LwpLayout
67 public:
68 LwpPageLayout(LwpObjectHeader &objHdr, LwpSvStream* pStrm);
69 virtual ~LwpPageLayout();
70 virtual void RegisterStyle() override;
71 OUString RegisterEndnoteStyle();
72 virtual void Parse(IXFStream* pOutputStream) override;
73 virtual LWP_LAYOUT_TYPE GetLayoutType () override { return LWP_PAGE_LAYOUT;}
74 protected:
75 void Read() override;
76 LwpHeaderLayout* GetHeaderLayout();
77 LwpFooterLayout* GetFooterLayout();
78 void ParseGeometry(XFPageMaster* pm1);
79 void ParseMargins(XFPageMaster* pm1);
80 void ParseBorders(XFPageMaster* pm1);
81 void ParsePatternFill(XFPageMaster* pm1);
82 void ParseBackGround(XFPageMaster* pm1);
83 void ParseBackColor(XFPageMaster* pm1);
84 void ParseWaterMark(XFPageMaster* pm1);
85 void ParseColumns(XFPageMaster* pm1);
86 void ParseShadow(XFPageMaster* pm1);
87 void ParseFootNoteSeparator(XFPageMaster* pm1);
88 double GetMarginWidth();
89 void GetWidthAndHeight(double& fWidth, double& fHeight);
90 double GetWidth() override;
91 double GetHeight() override;
92 protected:
93 LwpAtomHolder* m_pPrinterBinName;
94 sal_uInt16 m_nPrinterBin;
95 sal_Int32 m_nBdroffset;
96 LwpAtomHolder* m_pPaperName;
97 XFPageMaster* m_pXFPageMaster;
98 public:
99 bool HasColumns();
100 bool HasFillerPageText(LwpFoundry* pFoundry);
101 void ConvertFillerPageText(XFContentContainer* pCont);
102 void ResetXFColumns();
103 LwpPageLayout* GetOddChildLayout();
104 virtual sal_Int32 GetPageNumber(sal_uInt16 nLayoutNumber = 0) override;
105 bool operator <(LwpPageLayout& Other);
106 LwpPara* GetPagePosition();
109 #include "xfilter/xfmasterpage.hxx"
111 class LwpHeaderLayout: public LwpPlacableLayout
113 public:
114 LwpHeaderLayout(LwpObjectHeader &objHdr, LwpSvStream* pStrm);
115 virtual ~LwpHeaderLayout();
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();
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: */