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 * For LWP filter architecture prototype
59 ************************************************************************/
60 /*************************************************************************
63 ************************************************************************/
64 #ifndef _LWPPARAPROPERTY_HXX_
65 #define _LWPPARAPROPERTY_HXX_
68 #include "lwpobjstrm.hxx"
69 #include "lwpdllist.hxx"
71 #include "lwpoverride.hxx"
72 #include "lwppiece.hxx"
74 /* paragraph property ID's */
75 #define PP_OUTLINE_SHOW 0x53484f4cUL /* "SHOW" */
76 #define PP_OUTLINE_HIDE 0x48494445UL /* "HIDE" */
77 #define PP_LOCAL_ALIGN 0x414c494eUL /* "ALIN" */
78 #define PP_LOCAL_INDENT 0x494e444eUL /* "INDN" */
79 #define PP_LOCAL_SPACING 0x5350434eUL /* "SPCN" */
80 #define PP_LOCAL_TABRACK 0x54414253UL /* "TABS" */
81 #define PP_LOCAL_BREAKS 0x42524b53UL /* "BRKS" */
82 #define PP_LOCAL_BULLET 0x42554c4cUL /* "BULL" */
83 #define PP_LOCAL_BORDER 0x424f5244UL /* "BORD" */
84 #define PP_LOCAL_BACKGROUND 0x4241434bUL /* "BACK" */
85 #define PP_LOCAL_NUMBERING 0x4e4d4252UL /* "NMBR" */
86 #define PP_LOCAL_KINSOKU 0x4b494e53UL /* "KINS" */
87 #define PP_PROPLIST 0x50524f50UL /* "PROP" */
89 class LwpParaProperty
: public LwpDLList
93 virtual ~LwpParaProperty(void){}
94 virtual sal_uInt32
GetType(void) = 0;
95 inline LwpParaProperty
* GetNext(void);
96 inline LwpParaProperty
* GetPrevious(void);
98 static LwpParaProperty
* ReadPropertyList(LwpObjectStream
* pFile
,LwpObject
* Whole
);
102 inline LwpParaProperty
* LwpParaProperty::GetNext(void)
104 return static_cast<LwpParaProperty
*>(LwpDLList::GetNext());
107 inline LwpParaProperty
* LwpParaProperty::GetPrevious(void)
109 return static_cast<LwpParaProperty
*>(LwpDLList::GetPrevious());
112 //align/indent/spacing
113 //TO DO:border/backgroud etc
116 class LwpParaAlignProperty
: public LwpParaProperty
119 // LwpParaAlignProperty(LwpParaAlignProperty* pOther);
120 LwpParaAlignProperty(LwpObjectStream
* pFile
);
121 virtual ~LwpParaAlignProperty(void);
122 LwpAlignmentOverride
* GetAlignment(void);
123 sal_uInt32
GetType(void);
126 LwpAlignmentOverride
* m_pAlignment
;
129 inline LwpAlignmentOverride
* LwpParaAlignProperty::GetAlignment(void)
134 class LwpParaIndentProperty
: public LwpParaProperty
137 LwpParaIndentProperty(LwpObjectStream
* pFile
);
138 virtual ~LwpParaIndentProperty(void);
139 LwpIndentOverride
* GetIndent(void);
140 sal_uInt32
GetType(void);
141 inline LwpObjectID
GetIndentID();
144 LwpObjectID m_aIndentID
;
145 LwpIndentOverride
* m_pIndent
;
147 inline LwpObjectID
LwpParaIndentProperty::GetIndentID()
151 inline LwpIndentOverride
* LwpParaIndentProperty::GetIndent(void)
156 class LwpParaSpacingProperty
: public LwpParaProperty
159 LwpParaSpacingProperty(LwpObjectStream
* pFile
);
160 virtual ~LwpParaSpacingProperty(void);
161 LwpSpacingOverride
* GetSpacing(void);
162 sal_uInt32
GetType(void);
164 LwpSpacingOverride
* m_pSpacing
;
168 inline LwpSpacingOverride
* LwpParaSpacingProperty::GetSpacing(void)
173 class LwpParaBorderOverride
;
174 class LwpParaBorderProperty
: public LwpParaProperty
177 LwpParaBorderProperty(LwpObjectStream
* pStrm
);
179 inline sal_uInt32
GetType();
181 inline LwpParaBorderOverride
* GetLocalParaBorder();
184 LwpParaBorderOverride
* m_pParaBorderOverride
;
187 inline LwpParaBorderOverride
* LwpParaBorderProperty::GetLocalParaBorder()
189 return m_pParaBorderOverride
;
192 inline sal_uInt32
LwpParaBorderProperty::GetType()
194 return PP_LOCAL_BORDER
;
197 class LwpParaBreaksProperty
: public LwpParaProperty
200 LwpParaBreaksProperty(LwpObjectStream
* pStrm
);
202 inline sal_uInt32
GetType();
204 inline LwpBreaksOverride
* GetLocalParaBreaks();
207 LwpBreaksOverride
* m_pBreaks
;
211 inline sal_uInt32
LwpParaBreaksProperty::GetType()
213 return PP_LOCAL_BREAKS
;
215 inline LwpBreaksOverride
* LwpParaBreaksProperty::GetLocalParaBreaks()
221 class LwpParaBulletProperty
: public LwpParaProperty
224 LwpParaBulletProperty(LwpObjectStream
* pStrm
);
226 virtual ~LwpParaBulletProperty();
228 inline sal_uInt32
GetType();
230 inline LwpBulletOverride
* GetLocalParaBullet();
233 LwpBulletOverride
* m_pBullet
;
236 inline sal_uInt32
LwpParaBulletProperty::GetType()
238 return PP_LOCAL_BULLET
;
240 inline LwpBulletOverride
* LwpParaBulletProperty::GetLocalParaBullet()
246 class LwpParaNumberingProperty
: public LwpParaProperty
249 LwpParaNumberingProperty(LwpObjectStream
* pStrm
);
251 inline sal_uInt32
GetType();
253 inline LwpNumberingOverride
* GetLocalNumbering() const;
255 LwpNumberingOverride
* m_pNumberingOverride
;
257 inline sal_uInt32
LwpParaNumberingProperty::GetType()
259 return PP_LOCAL_NUMBERING
;
261 inline LwpNumberingOverride
* LwpParaNumberingProperty::GetLocalNumbering() const
263 return m_pNumberingOverride
;
266 class LwpParaTabRackProperty
: public LwpParaProperty
269 LwpParaTabRackProperty(LwpObjectStream
* pStrm
);
270 ~LwpParaTabRackProperty(void);
271 inline sal_uInt32
GetType();
273 inline LwpTabOverride
* GetTab();
276 LwpTabOverride
* m_pTabOverride
;
279 inline LwpTabOverride
* LwpParaTabRackProperty::GetTab()
281 return m_pTabOverride
;
284 inline sal_uInt32
LwpParaTabRackProperty::GetType(void)
286 return PP_LOCAL_TABRACK
;
290 class LwpParaBackGroundProperty
: public LwpParaProperty
293 LwpParaBackGroundProperty(LwpObjectStream
* pFile
);
294 virtual ~LwpParaBackGroundProperty(void);
295 LwpBackgroundOverride
* GetBackground(void);
296 sal_uInt32
GetType(void);
298 LwpBackgroundOverride
* m_pBackground
;
301 inline LwpBackgroundOverride
* LwpParaBackGroundProperty::GetBackground(void)
303 return m_pBackground
;
306 inline sal_uInt32
LwpParaBackGroundProperty::GetType()
308 return PP_LOCAL_BACKGROUND
;
313 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */