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 ************************************************************************/
56 /*************************************************************************
58 * the class for VO_FrameLayout
59 ************************************************************************/
61 #ifndef INCLUDED_LOTUSWORDPRO_SOURCE_FILTER_LWPFRAMELAYOUT_HXX
62 #define INCLUDED_LOTUSWORDPRO_SOURCE_FILTER_LWPFRAMELAYOUT_HXX
64 #include "lwplayout.hxx"
65 #include "lwpstory.hxx"
66 #include "lwpmarker.hxx"
68 * @brief For register frame style and parse frame
75 explicit LwpFrame(LwpPlacableLayout
* pLayout
);
77 void RegisterStyle(XFFrameStyle
* pFrameStyle
);
78 void Parse(XFFrame
* pXFFrame
, sal_Int32 nPageNo
);
79 void XFConvert(XFContentContainer
* pCont
);
81 void ApplyWrapType(XFFrameStyle
* pFrameStyle
);
82 void ApplyMargins(XFFrameStyle
* pFrameStyle
);
83 void ApplyPadding(XFFrameStyle
* pFrameStyle
);
84 void ApplyBorders(XFFrameStyle
* pFrameStyle
);
85 void ApplyColumns(XFFrameStyle
* pFrameStyle
);
86 void ApplyShadow(XFFrameStyle
* pFrameStyle
);
87 void ApplyBackColor(XFFrameStyle
* pFrameStyle
);
88 void ApplyProtect(XFFrameStyle
* pFrameStyle
);
89 void ApplyTextDir(XFFrameStyle
* pFrameStyle
);
90 void ApplyPosType(XFFrameStyle
* pFrameStyle
);
91 void ApplyWatermark(XFFrameStyle
* pFrameStyle
);
92 void ApplyPatternFill(XFFrameStyle
* pFrameStyle
);
93 void ApplyBackGround(XFFrameStyle
* pFrameStyle
);
94 void ParseAnchorType(XFFrame
* pXFFrame
);
97 LwpPlacableLayout
* m_pLayout
;
102 * @brief Frame link information
110 void Read(LwpObjectStream
* pStrm
);
111 LwpObjectID
& GetNextLayout(){ return m_NextLayout
;}
112 LwpObjectID
& GetPreviousLayout(){ return m_PreviousLayout
;}
114 LwpObjectID m_PreviousLayout
;
115 LwpObjectID m_NextLayout
;
119 * @brief VO_FRAMELAYOUT object
122 class LwpFrameLayout
: public LwpPlacableLayout
125 LwpFrameLayout(LwpObjectHeader
&objHdr
, LwpSvStream
* pStrm
);
126 virtual ~LwpFrameLayout() override
;
127 virtual LWP_LAYOUT_TYPE
GetLayoutType () override
{ return LWP_FRAME_LAYOUT
;}
128 virtual void RegisterStyle() override
;
129 virtual void XFConvert(XFContentContainer
* pCont
) override
;
130 void XFConvertFrame(XFContentContainer
* pCont
, sal_Int32 nStart
= 0, sal_Int32 nEnd
= 0, bool bAll
= false) override
;
131 OUString
GetNextLinkName();
132 bool HasPreviousLinkLayout();
133 bool IsForWaterMark() override
;
134 double GetWidth() override
;
135 void ApplyGraphicSize(XFFrame
* pXFFrame
);
137 void Read() override
;
139 double GetMaxWidth();
143 std::unique_ptr
<LwpFrame
> m_pFrame
;
144 bool m_bGettingMaxWidth
;
148 * @brief VO_GROUPLAYOUT object , information for frame group layout
151 class LwpGroupLayout
: public LwpPlacableLayout
154 LwpGroupLayout(LwpObjectHeader
&objHdr
, LwpSvStream
* pStrm
);
155 virtual ~LwpGroupLayout() override
;
156 virtual LWP_LAYOUT_TYPE
GetLayoutType () override
{ return LWP_GROUP_LAYOUT
;}
157 virtual void RegisterStyle() override
;
158 virtual void XFConvert(XFContentContainer
* pCont
) override
;
159 void XFConvertFrame(XFContentContainer
* pCont
, sal_Int32 nStart
= 0, sal_Int32 nEnd
= 0, bool bAll
= false) override
;
161 void Read() override
;
163 std::unique_ptr
<LwpFrame
> m_pFrame
;
168 * @brief VO_GROUPFRAME object , information for frame group contents
171 class LwpGroupFrame
: public LwpContent
174 LwpGroupFrame(LwpObjectHeader
&objHdr
, LwpSvStream
* pStrm
);
175 virtual ~LwpGroupFrame() override
;
176 virtual void RegisterStyle() override
;
177 virtual void XFConvert(XFContentContainer
* pCont
) override
;
179 void Read() override
;
184 class LwpDropcapLayout
: public LwpFrameLayout
187 LwpDropcapLayout(LwpObjectHeader
&objHdr
, LwpSvStream
* pStrm
);
188 virtual ~LwpDropcapLayout() override
{}
189 virtual LWP_LAYOUT_TYPE
GetLayoutType () override
{ return LWP_DROPCAP_LAYOUT
;}
190 virtual void Parse(IXFStream
* pOutputStream
) override
;
191 virtual void XFConvert(XFContentContainer
* pCont
) override
;
192 sal_uInt16
GetLines(){return m_nLines
;}
193 void SetChars(sal_uInt32 nChars
){ m_nChars
+= nChars
;}
194 sal_uInt32
GetChars() const {return m_nChars
;}
195 void RegisterStyle(LwpFoundry
* pFoundry
);
196 void RegisterStyle() override
;
198 void Read() override
;
204 class LwpRubyLayout
: public LwpFrameLayout
207 LwpRubyLayout(LwpObjectHeader
&objHdr
, LwpSvStream
* pStrm
);
208 virtual ~LwpRubyLayout() override
{}
209 LwpRubyMarker
* GetMarker();
210 void ConvertContentText();
211 LwpStory
* GetContentStory();
212 void RegisterStyle() override
;
221 void Read() override
;
223 sal_uInt8 m_nPlacement
;
224 sal_uInt8 m_nAlignment
;
225 sal_uInt16 m_nStateFlag
;
226 sal_Int32 m_nXOffset
;
227 sal_Int32 m_nYOffset
;
228 LwpObjectID m_objRubyMarker
;
233 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */