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,
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>
63 class LwpHeaderLayout
;
64 class LwpFooterLayout
;
66 class LwpPageLayout final
: public LwpLayout
69 LwpPageLayout(LwpObjectHeader
const& objHdr
, LwpSvStream
* pStrm
);
70 virtual ~LwpPageLayout() override
;
71 virtual void RegisterStyle() override
;
72 OUString
RegisterEndnoteStyle();
73 virtual void Parse(IXFStream
* pOutputStream
) override
;
74 virtual LWP_LAYOUT_TYPE
GetLayoutType() override
{ return LWP_PAGE_LAYOUT
; }
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 LwpAtomHolder m_PrinterBinName
;
95 sal_uInt16 m_nPrinterBin
;
96 sal_Int32 m_nBdroffset
;
97 LwpAtomHolder m_PaperName
;
98 XFPageMaster
* m_pXFPageMaster
;
102 bool HasFillerPageText(LwpFoundry
const* 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
114 LwpHeaderLayout(LwpObjectHeader
const& 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
);
122 void Read() override
;
123 void ParseMargins(XFHeaderStyle
* ph1
);
124 void ParseBorder(XFHeaderStyle
* ph1
);
125 void ParseShadow(XFHeaderStyle
* ph1
);
126 void ParsePatternFill(XFHeaderStyle
* ph1
);
127 void ParseBackGround(XFHeaderStyle
* ph1
);
128 void ParseBackColor(XFHeaderStyle
* ph1
);
130 void ParseWaterMark(XFHeaderStyle
* ph1
);
133 sal_Int32 m_nBorderOffset
;
136 class LwpFooterLayout
: public LwpPlacableLayout
139 LwpFooterLayout(LwpObjectHeader
const& objHdr
, LwpSvStream
* pStrm
);
140 virtual ~LwpFooterLayout() override
;
141 virtual LWP_LAYOUT_TYPE
GetLayoutType() override
{ return LWP_FOOTER_LAYOUT
; }
142 using LwpPlacableLayout::RegisterStyle
;
143 void RegisterStyle(XFPageMaster
* pm1
);
144 void RegisterStyle(XFMasterPage
* mp1
);
147 void Read() override
;
148 void ParseMargins(XFFooterStyle
* pFooterStyle
);
149 void ParseBorder(XFFooterStyle
* pFooterStyle
);
150 void ParseShadow(XFFooterStyle
* pFooterStyle
);
151 void ParsePatternFill(XFFooterStyle
* pFooterStyle
);
152 void ParseBackGround(XFFooterStyle
* pFooterStyle
);
154 void ParseBackColor(XFFooterStyle
* pFooterStyle
);
156 void ParseWaterMark(XFFooterStyle
* pFooterStyle
);
159 sal_Int32 m_nBorderOffset
;
164 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */