fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / lotuswordpro / source / filter / lwpframelayout.hxx
bloba686377148dfee5a8f4b260c8dfbfa4a73a6f890
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 ************************************************************************/
56 /*************************************************************************
57 * @file
58 * the class for VO_FrameLayout
59 ************************************************************************/
60 /*************************************************************************
61 * Change History
62 Mar 2005 Created
63 ************************************************************************/
65 #ifndef INCLUDED_LOTUSWORDPRO_SOURCE_FILTER_LWPFRAMELAYOUT_HXX
66 #define INCLUDED_LOTUSWORDPRO_SOURCE_FILTER_LWPFRAMELAYOUT_HXX
68 #include "lwplayout.hxx"
69 #include "lwpstory.hxx"
70 #include "lwpmarker.hxx"
71 /**
72 * @brief For register frame style and parse frame
76 class LwpFrame
78 public:
79 LwpFrame(LwpPlacableLayout* pLayout);
80 ~LwpFrame();
81 void RegisterStyle(XFFrameStyle* pFrameStyle);
82 void Parse(XFFrame* pXFFrame, sal_Int32 nPageNo = 0);
83 void XFConvert(XFContentContainer* pCont);
84 private:
85 void ApplyWrapType(XFFrameStyle* pFrameStyle);
86 void ApplyMargins(XFFrameStyle* pFrameStyle);
87 void ApplyPadding(XFFrameStyle* pFrameStyle);
88 void ApplyBorders(XFFrameStyle* pFrameStyle);
89 void ApplyColumns(XFFrameStyle* pFrameStyle);
90 void ApplyShadow(XFFrameStyle* pFrameStyle);
91 void ApplyBackColor(XFFrameStyle* pFrameStyle);
92 void ApplyProtect(XFFrameStyle* pFrameStyle);
93 void ApplyTextDir(XFFrameStyle* pFrameStyle);
94 void ApplyPosType(XFFrameStyle* pFrameStyle);
95 void ApplyWatermark(XFFrameStyle* pFrameStyle);
96 // add by , 06/01/2005
97 void ApplyPatternFill(XFFrameStyle* pFrameStyle);
98 void ApplyBackGround(XFFrameStyle* pFrameStyle);
99 // end add
100 void ParseAnchorType(XFFrame* pXFFrame);
101 bool IsLeftWider();
102 private:
103 LwpPlacableLayout* m_pLayout;
104 OUString m_StyleName;
108 * @brief Frame link information
111 class LwpFrameLink
113 public:
114 LwpFrameLink();
115 ~LwpFrameLink();
116 void Read(LwpObjectStream* pStrm);
117 LwpObjectID& GetNextLayout(){ return m_NextLayout;}
118 LwpObjectID& GetPreviousLayout(){ return m_PreviousLayout;}
119 private:
120 LwpObjectID m_PreviousLayout;
121 LwpObjectID m_NextLayout;
125 * @brief VO_FRAMELAYOUT object
128 class LwpFrameLayout: public LwpPlacableLayout
130 public:
131 LwpFrameLayout(LwpObjectHeader &objHdr, LwpSvStream* pStrm);
132 virtual ~LwpFrameLayout();
133 virtual LWP_LAYOUT_TYPE GetLayoutType () SAL_OVERRIDE { return LWP_FRAME_LAYOUT;}
134 virtual void RegisterStyle() SAL_OVERRIDE;
135 virtual void XFConvert(XFContentContainer* pCont) SAL_OVERRIDE;
136 void XFConvertFrame(XFContentContainer* pCont, sal_Int32 nStart = 0, sal_Int32 nEnd = 0, bool bAll = false) SAL_OVERRIDE;
137 OUString GetNextLinkName();
138 bool HasPreviousLinkLayout();
139 bool IsForWaterMark() SAL_OVERRIDE;
140 double GetWidth() SAL_OVERRIDE;
141 void ApplyGraphicSize(XFFrame* pXFFrame);
142 protected:
143 void Read() SAL_OVERRIDE;
144 private:
145 double GetMaxWidth();
147 private:
148 LwpFrameLink m_Link;
149 LwpFrame* m_pFrame;
153 * @brief VO_GROUPLAYOUT object , information for frame group layout
156 class LwpGroupLayout: public LwpPlacableLayout
158 public:
159 LwpGroupLayout(LwpObjectHeader &objHdr, LwpSvStream* pStrm);
160 virtual ~LwpGroupLayout();
161 virtual LWP_LAYOUT_TYPE GetLayoutType () SAL_OVERRIDE { return LWP_GROUP_LAYOUT;}
162 virtual void RegisterStyle() SAL_OVERRIDE;
163 virtual void XFConvert(XFContentContainer* pCont) SAL_OVERRIDE;
164 void XFConvertFrame(XFContentContainer* pCont, sal_Int32 nStart = 0, sal_Int32 nEnd = 0, bool bAll = false) SAL_OVERRIDE;
165 protected:
166 void Read() SAL_OVERRIDE;
167 private:
168 LwpFrame* m_pFrame;
173 * @brief VO_GROUPFRAME object , information for frame group contents
176 class LwpGroupFrame: public LwpContent
178 public:
179 LwpGroupFrame(LwpObjectHeader &objHdr, LwpSvStream* pStrm);
180 virtual ~LwpGroupFrame();
181 virtual void RegisterStyle() SAL_OVERRIDE;
182 virtual void XFConvert(XFContentContainer* pCont) SAL_OVERRIDE;
183 protected:
184 void Read() SAL_OVERRIDE;
187 class LwpStory;
188 class LwpFoundry;
189 class LwpDropcapLayout : public LwpFrameLayout
191 public:
192 LwpDropcapLayout(LwpObjectHeader &objHdr, LwpSvStream* pStrm);
193 virtual ~LwpDropcapLayout(){}
194 virtual LWP_LAYOUT_TYPE GetLayoutType () SAL_OVERRIDE { return LWP_DROPCAP_LAYOUT;}
195 virtual void Parse(IXFStream* pOutputStream) SAL_OVERRIDE;
196 virtual void XFConvert(XFContentContainer* pCont) SAL_OVERRIDE;
197 sal_uInt16 GetLines(){return m_nLines;}
198 void SetChars(sal_uInt32 nChars){ m_nChars += nChars;}
199 sal_uInt32 GetChars() const {return m_nChars;}
200 LwpStory* GetContentStory();
201 void RegisterStyle(LwpFoundry* pFoundry);
202 void RegisterStyle() SAL_OVERRIDE;
203 protected:
204 void Read() SAL_OVERRIDE;
205 private:
206 sal_uInt16 m_nLines;
207 sal_uInt32 m_nChars;
210 class LwpRubyLayout : public LwpFrameLayout
212 public:
213 LwpRubyLayout(LwpObjectHeader &objHdr, LwpSvStream* pStrm);
214 virtual ~LwpRubyLayout(){}
215 LwpRubyMarker* GetMarker();
216 void ConvertContentText();
217 LwpStory* GetContentStory();
218 sal_uInt8 GetPosition(){return m_nPlacement;}
219 sal_uInt8 GetAlignment(){return m_nAlignment;}
220 void RegisterStyle() SAL_OVERRIDE;
221 enum{
222 LEFT = 4,
223 RIGHT = 5,
224 CENTER = 2,
225 TOP = 1,
226 BOTTOM = 3
228 protected:
229 void Read() SAL_OVERRIDE;
230 private:
231 sal_uInt8 m_nPlacement;
232 sal_uInt8 m_nAlignment;
233 sal_uInt16 m_nStateFlag;
234 sal_Int32 m_nXOffset;
235 sal_Int32 m_nYOffset;
236 LwpObjectID m_objRubyMarker;
239 #endif
241 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */