LibreOffice Module lotuswordpro (master) 1
lwplaypiece.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*************************************************************************
3 *
4 * The Contents of this file are made available subject to the terms of
5 * either of the following licenses
6 *
7 * - GNU Lesser General Public License Version 2.1
8 * - Sun Industry Standards Source License Version 1.1
9 *
10 * Sun Microsystems Inc., October, 2000
11 *
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
16 *
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.
20 *
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.
25 *
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
30 *
31 *
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.
38 *
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.
45 *
46 * The Initial Developer of the Original Code is: IBM Corporation
47 *
48 * Copyright: 2008 by IBM Corporation
49 *
50 * All Rights Reserved.
51 *
52 * Contributor(s): _______________________________________
53 *
54 *
55 ************************************************************************/
56/*************************************************************************
57 * @file
58 * For LWP filter architecture prototype
59 ************************************************************************/
60
61#ifndef INCLUDED_LOTUSWORDPRO_SOURCE_FILTER_LWPLAYPIECE_HXX
62#define INCLUDED_LOTUSWORDPRO_SOURCE_FILTER_LWPLAYPIECE_HXX
63
64#include "lwppiece.hxx"
65#include <lwpbasetype.hxx>
66#include "lwpmargins.hxx"
67#include "lwpborderstuff.hxx"
68#include "lwpshadow.hxx"
69
71{
72public:
73 LwpRotor();
74 void Read(LwpObjectStream* pStrm);
75
76private:
77 sal_Int16 m_nRotation; //angle
78};
79
81{
82public:
83 LwpLayoutGeometry(LwpObjectHeader const& objHdr, LwpSvStream* pStrm);
84 virtual void Parse(IXFStream* pOutputStream) override;
85 sal_Int32 GetWidth() const { return m_nWidth; }
86 sal_Int32 GetHeight() const { return m_nHeight; }
87 const LwpPoint& GetOrigin() const { return m_Origin; }
88 const LwpPoint& GetAbsoluteOrigin() const { return m_AbsoluteOrigin; }
90
91private:
92 virtual void Read() override;
93 virtual ~LwpLayoutGeometry() override;
94
95 sal_Int32 m_nWidth;
96 sal_Int32 m_nHeight;
101};
102
103class LwpLayoutScale final : public LwpVirtualPiece
104{
105public:
106 enum
107 {
113 };
114
115 enum
116 {
118 TILED = 2
119 };
120 LwpLayoutScale(LwpObjectHeader const& objHdr, LwpSvStream* pStrm);
121 virtual void Parse(IXFStream* pOutputStream) override;
122 sal_uInt16 GetScaleMode() const { return m_nScaleMode; }
123 sal_uInt32 GetScalePercentage() const { return m_nScalePercentage; }
124 sal_Int32 GetScaleWidth() const { return m_nScaleWidth; }
125 sal_Int32 GetScaleHeight() const { return m_nScaleHeight; }
126 sal_uInt16 GetPlacement() const { return m_nPlacement; }
128
129private:
130 virtual void Read() override;
131 virtual ~LwpLayoutScale() override;
132
133 sal_uInt16 m_nScaleMode;
135 sal_Int32 m_nScaleWidth;
136 sal_Int32 m_nScaleHeight;
139 sal_uInt16 m_nPlacement;
140};
141
143{
144public:
145 LwpLayoutMargins(LwpObjectHeader const& objHdr, LwpSvStream* pStrm);
146 virtual void Parse(IXFStream* pOutputStream) override;
149
150private:
151 virtual void Read() override;
152 virtual ~LwpLayoutMargins() override;
153
157};
158
160{
161public:
162 LwpLayoutBorder(LwpObjectHeader const& objHdr, LwpSvStream* pStrm);
163 virtual void Parse(IXFStream* pOutputStream) override;
165
166private:
167 virtual void Read() override;
168 virtual ~LwpLayoutBorder() override;
169
171};
172
174{
175public:
176 LwpLayoutBackground(LwpObjectHeader const& objHdr, LwpSvStream* pStrm);
177 virtual void Parse(IXFStream* pOutputStream) override;
179
180private:
181 virtual void Read() override;
182 virtual ~LwpLayoutBackground() override;
183
185};
186
188{
189public:
192 void Read(LwpObjectStream* pStrm);
193
194private:
199};
200
201//It seems that this class is used for designer border. Only read now.
203{
204public:
206 virtual void Parse(IXFStream* pOutputStream) override;
207
208private:
209 virtual void Read() override;
210 virtual ~LwpLayoutExternalBorder() override;
211
213};
214
216{
217public:
219 void Read(LwpObjectStream* pStrm);
221
222private:
223 sal_Int32 m_nWidth;
224 sal_Int32 m_nGap;
225};
226
228{
229public:
230 LwpLayoutColumns(LwpObjectHeader const& objHdr, LwpSvStream* pStrm);
231 virtual void Parse(IXFStream* pOutputStream) override;
232 sal_uInt16 GetNumCols() const { return m_nNumCols; }
233 double GetColGap(sal_uInt16 nIndex);
234
235private:
236 virtual void Read() override;
237 virtual ~LwpLayoutColumns() override;
238
239 sal_uInt16 m_nNumCols;
240 std::unique_ptr<LwpColumnInfo[]> m_pColumns;
241};
242
244{
245public:
246 LwpLayoutGutters(LwpObjectHeader const& objHdr, LwpSvStream* pStrm);
247 virtual void Parse(IXFStream* pOutputStream) override;
249
250private:
251 virtual void Read() override;
252 virtual ~LwpLayoutGutters() override;
253
255};
256
258{
259public:
260 LwpJoinStuff();
261 void Read(LwpObjectStream* pStrm);
262
263private:
264 sal_uInt16 m_nPercentage;
265 sal_uInt16 m_nCorners;
266 sal_Int32 m_nWidth;
267 sal_Int32 m_nHeight;
268
270 {
271 MITRE = 1,
281 STAR = 11,
282 ROPE = 12,
283 DECO1 = 13,
284 DECO2 = 14,
285 RAIN = 15,
286 PIN = 16,
287 ROSE = 17,
288 SUNF = 18,
289 DECO3 = 19,
291 BUBBLE = 21,
292 GIRDER = 22,
293 SMILE = 23,
294 ARROW = 24,
295 MAXJOIN = 24
296 };
297
298 sal_uInt16 m_nID; //JoinType
299 sal_uInt16 m_nScaling;
301};
302
303class LwpLayoutJoins final : public LwpVirtualPiece
304{
305public:
306 LwpLayoutJoins(LwpObjectHeader const& objHdr, LwpSvStream* pStrm);
307 virtual void Parse(IXFStream* pOutputStream) override;
308
309private:
310 virtual void Read() override;
311 virtual ~LwpLayoutJoins() override;
312
314};
315
317{
318public:
319 LwpLayoutShadow(LwpObjectHeader const& objHdr, LwpSvStream* pStrm);
320 virtual void Parse(IXFStream* pOutputStream) override;
322
323private:
324 virtual void Read() override;
325 virtual ~LwpLayoutShadow() override;
326
328};
329
331{
332public:
334 void Read(LwpObjectStream* pStrm);
337 {
344 };
346 {
356 };
358 {
362 };
363
364private:
371};
372
374{
375public:
376 LwpLayoutRelativity(LwpObjectHeader const& objHdr, LwpSvStream* pStrm);
377 virtual void Parse(IXFStream* pOutputStream) override;
379
380private:
381 virtual void Read() override;
382 virtual ~LwpLayoutRelativity() override;
383
385};
386
387#endif
388
389/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Stream wrapper for sax writer.
Definition: ixfstream.hxx:72
AtomHolder class of Word Pro to hold a string.
lwpcolor class (red, green, blue, extra)
Definition: lwpcolor.hxx:71
sal_Int32 m_nWidth
double GetGap()
void Read(LwpObjectStream *pStrm)
sal_Int32 m_nGap
LwpAtomHolder m_BottomName
LwpAtomHolder m_TopName
LwpAtomHolder m_RightName
void Read(LwpObjectStream *pStrm)
LwpAtomHolder m_LeftName
sal_Int32 m_nWidth
sal_uInt16 m_nCorners
void Read(LwpObjectStream *pStrm)
LwpColor m_Color
sal_uInt16 m_nScaling
sal_uInt16 m_nPercentage
sal_Int32 m_nHeight
sal_uInt16 m_nID
LwpBackgroundStuff & GetBackgoudStuff()
LwpLayoutBackground(LwpObjectHeader const &objHdr, LwpSvStream *pStrm)
LwpBackgroundStuff m_BackgroundStuff
virtual ~LwpLayoutBackground() override
virtual void Read() override
@descr Read LwpDLVList data from object stream
virtual void Parse(IXFStream *pOutputStream) override
@descr default parse function
LwpLayoutBorder(LwpObjectHeader const &objHdr, LwpSvStream *pStrm)
virtual ~LwpLayoutBorder() override
LwpBorderStuff & GetBorderStuff()
LwpBorderStuff m_BorderStuff
virtual void Parse(IXFStream *pOutputStream) override
@descr default parse function
virtual void Read() override
@descr Read LwpDLVList data from object stream
double GetColGap(sal_uInt16 nIndex)
LwpLayoutColumns(LwpObjectHeader const &objHdr, LwpSvStream *pStrm)
sal_uInt16 GetNumCols() const
virtual ~LwpLayoutColumns() override
sal_uInt16 m_nNumCols
virtual void Read() override
@descr Read LwpDLVList data from object stream
std::unique_ptr< LwpColumnInfo[]> m_pColumns
virtual void Parse(IXFStream *pOutputStream) override
@descr default parse function
LwpLayoutExternalBorder(LwpObjectHeader const &objHdr, LwpSvStream *pStrm)
virtual void Parse(IXFStream *pOutputStream) override
@descr default parse function
LwpExternalBorder m_ExtranalBorder
virtual void Read() override
@descr Read LwpDLVList data from object stream
virtual ~LwpLayoutExternalBorder() override
sal_Int32 m_nHeight
Definition: lwplaypiece.hxx:96
LwpPoint m_AbsoluteOrigin
Definition: lwplaypiece.hxx:98
LwpRotor m_ContainerRotor
Definition: lwplaypiece.hxx:99
const LwpPoint & GetOrigin() const
Definition: lwplaypiece.hxx:87
virtual void Parse(IXFStream *pOutputStream) override
@descr default parse function
LwpLayoutGeometry(LwpObjectHeader const &objHdr, LwpSvStream *pStrm)
Definition: lwplaypiece.cxx:75
sal_Int32 m_nWidth
Definition: lwplaypiece.hxx:95
sal_uInt8 m_ContentOrientation
sal_Int32 GetHeight() const
Definition: lwplaypiece.hxx:86
const LwpPoint & GetAbsoluteOrigin() const
Definition: lwplaypiece.hxx:88
virtual void Read() override
@descr Read LwpDLVList data from object stream
Definition: lwplaypiece.cxx:85
sal_Int32 GetWidth() const
Definition: lwplaypiece.hxx:85
sal_uInt8 GetContentOrientation() const
Definition: lwplaypiece.hxx:89
virtual ~LwpLayoutGeometry() override
Definition: lwplaypiece.cxx:82
LwpLayoutGutters(LwpObjectHeader const &objHdr, LwpSvStream *pStrm)
LwpBorderStuff m_BorderBuffer
virtual void Parse(IXFStream *pOutputStream) override
@descr default parse function
virtual ~LwpLayoutGutters() override
LwpBorderStuff & GetBorderStuff()
virtual void Read() override
@descr Read LwpDLVList data from object stream
LwpJoinStuff m_JoinStuff
virtual ~LwpLayoutJoins() override
virtual void Read() override
@descr Read LwpDLVList data from object stream
virtual void Parse(IXFStream *pOutputStream) override
@descr default parse function
LwpLayoutJoins(LwpObjectHeader const &objHdr, LwpSvStream *pStrm)
LwpMargins m_ExtMargins
virtual void Read() override
@descr Read LwpDLVList data from object stream
virtual void Parse(IXFStream *pOutputStream) override
@descr default parse function
LwpMargins & GetMargins()
LwpMargins m_ExtraMargins
virtual ~LwpLayoutMargins() override
LwpMargins & GetExtMargins()
LwpMargins m_Margins
LwpLayoutMargins(LwpObjectHeader const &objHdr, LwpSvStream *pStrm)
void Read(LwpObjectStream *pStrm)
sal_uInt8 GetRelativeType() const
virtual void Read() override
@descr Read LwpDLVList data from object stream
LwpLayoutRelativity(LwpObjectHeader const &objHdr, LwpSvStream *pStrm)
LwpLayoutRelativityGuts m_RelGuts
virtual ~LwpLayoutRelativity() override
LwpLayoutRelativityGuts & GetRelGuts()
virtual void Parse(IXFStream *pOutputStream) override
@descr default parse function
sal_Int32 m_nScaleHeight
sal_uInt32 GetScalePercentage() const
sal_uInt16 GetPlacement() const
LwpPoint & GetOffset()
virtual void Parse(IXFStream *pOutputStream) override
@descr default parse function
sal_uInt16 GetScaleMode() const
virtual void Read() override
@descr Read LwpDLVList data from object stream
sal_uInt16 m_nContentRotation
sal_uInt32 m_nScalePercentage
sal_uInt16 m_nScaleMode
LwpLayoutScale(LwpObjectHeader const &objHdr, LwpSvStream *pStrm)
sal_Int32 GetScaleWidth() const
sal_uInt16 m_nPlacement
virtual ~LwpLayoutScale() override
sal_Int32 m_nScaleWidth
sal_Int32 GetScaleHeight() const
LwpPoint m_Offset
LwpLayoutShadow(LwpObjectHeader const &objHdr, LwpSvStream *pStrm)
LwpShadow m_Shadow
LwpShadow & GetShadow()
virtual void Parse(IXFStream *pOutputStream) override
@descr default parse function
virtual void Read() override
@descr Read LwpDLVList data from object stream
virtual ~LwpLayoutShadow() override
Base class of all Lwp VO objects.
Definition: lwpobjhdr.hxx:71
stream class for LwpObject body data provide stream like interface to read object data
Definition: lwpobjstrm.hxx:77
point class
sal_Int16 m_nRotation
Definition: lwplaypiece.hxx:77
void Read(LwpObjectStream *pStrm)
Definition: lwplaypiece.cxx:70
encapsulate XInputStream to provide SvStream like interfaces
Definition: lwpsvstream.hxx:69
static double ConvertFromUnitsToMetric(sal_Int32 nUnits)
Definition: lwptools.hxx:117
unsigned char sal_uInt8