Line data Source code
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 : * Change History
62 : Jan 2005 Created
63 : ************************************************************************/
64 : #ifndef INCLUDED_LOTUSWORDPRO_SOURCE_FILTER_LWPPARAPROPERTY_HXX
65 : #define INCLUDED_LOTUSWORDPRO_SOURCE_FILTER_LWPPARAPROPERTY_HXX
66 :
67 : #include "lwpobj.hxx"
68 : #include "lwpobjstrm.hxx"
69 : #include "lwpdllist.hxx"
70 :
71 : #include "lwpoverride.hxx"
72 : #include "lwppiece.hxx"
73 :
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" */
88 :
89 : class LwpParaProperty : public LwpDLList
90 : {
91 : public:
92 806 : LwpParaProperty(){}
93 806 : virtual ~LwpParaProperty(void){}
94 : virtual sal_uInt32 GetType(void) = 0;
95 : inline LwpParaProperty* GetNext(void);
96 : inline LwpParaProperty* GetPrevious(void);
97 :
98 : static LwpParaProperty* ReadPropertyList(LwpObjectStream* pFile,rtl::Reference<LwpObject> const & Whole);
99 :
100 : };
101 :
102 1708 : inline LwpParaProperty* LwpParaProperty::GetNext(void)
103 : {
104 1708 : return static_cast<LwpParaProperty*>(LwpDLList::GetNext());
105 : }
106 :
107 : inline LwpParaProperty* LwpParaProperty::GetPrevious(void)
108 : {
109 : return static_cast<LwpParaProperty*>(LwpDLList::GetPrevious());
110 : }
111 :
112 : //align/indent/spacing
113 : //TO DO:border/backgroud etc
114 :
115 : class LwpParaAlignProperty : public LwpParaProperty
116 : {
117 : public:
118 : // LwpParaAlignProperty(LwpParaAlignProperty* pOther);
119 : LwpParaAlignProperty(LwpObjectStream* pFile);
120 : virtual ~LwpParaAlignProperty(void);
121 : LwpAlignmentOverride* GetAlignment(void);
122 : sal_uInt32 GetType(void) SAL_OVERRIDE;
123 :
124 : private:
125 : LwpAlignmentOverride* m_pAlignment;
126 : };
127 :
128 8 : inline LwpAlignmentOverride* LwpParaAlignProperty::GetAlignment(void)
129 : {
130 8 : return m_pAlignment;
131 : }
132 :
133 : class LwpParaIndentProperty : public LwpParaProperty
134 : {
135 : public:
136 : LwpParaIndentProperty(LwpObjectStream* pFile);
137 : virtual ~LwpParaIndentProperty(void);
138 : LwpIndentOverride* GetIndent(void);
139 : sal_uInt32 GetType(void) SAL_OVERRIDE;
140 : inline LwpObjectID GetIndentID();
141 :
142 : private:
143 : LwpObjectID m_aIndentID;
144 : LwpIndentOverride* m_pIndent;
145 : };
146 0 : inline LwpObjectID LwpParaIndentProperty::GetIndentID()
147 : {
148 0 : return m_aIndentID;
149 : }
150 260 : inline LwpIndentOverride* LwpParaIndentProperty::GetIndent(void)
151 : {
152 260 : return m_pIndent;
153 : }
154 :
155 : class LwpParaSpacingProperty : public LwpParaProperty
156 : {
157 : public:
158 : LwpParaSpacingProperty(LwpObjectStream* pFile);
159 : virtual ~LwpParaSpacingProperty(void);
160 : LwpSpacingOverride* GetSpacing(void);
161 : sal_uInt32 GetType(void) SAL_OVERRIDE;
162 : private:
163 : LwpSpacingOverride* m_pSpacing;
164 :
165 : };
166 :
167 224 : inline LwpSpacingOverride* LwpParaSpacingProperty::GetSpacing(void)
168 : {
169 224 : return m_pSpacing;
170 : }
171 :
172 : class LwpParaBorderOverride;
173 8 : class LwpParaBorderProperty : public LwpParaProperty
174 : {
175 : public:
176 : LwpParaBorderProperty(LwpObjectStream* pStrm);
177 :
178 4 : sal_uInt32 GetType() SAL_OVERRIDE { return PP_LOCAL_BORDER; }
179 :
180 : inline LwpParaBorderOverride* GetLocalParaBorder();
181 :
182 : private:
183 : LwpParaBorderOverride* m_pParaBorderOverride;
184 : };
185 :
186 4 : inline LwpParaBorderOverride* LwpParaBorderProperty::GetLocalParaBorder()
187 : {
188 4 : return m_pParaBorderOverride;
189 : }
190 :
191 508 : class LwpParaBreaksProperty : public LwpParaProperty
192 : {
193 : public:
194 : LwpParaBreaksProperty(LwpObjectStream* pStrm);
195 :
196 286 : sal_uInt32 GetType() SAL_OVERRIDE { return PP_LOCAL_BREAKS; }
197 :
198 : inline LwpBreaksOverride* GetLocalParaBreaks();
199 :
200 : private:
201 : LwpBreaksOverride* m_pBreaks;
202 :
203 : };
204 :
205 254 : inline LwpBreaksOverride* LwpParaBreaksProperty::GetLocalParaBreaks()
206 : {
207 254 : return m_pBreaks;
208 : }
209 :
210 : class LwpParaBulletProperty : public LwpParaProperty
211 : {
212 : public:
213 : LwpParaBulletProperty(LwpObjectStream* pStrm);
214 :
215 : virtual ~LwpParaBulletProperty();
216 :
217 8 : sal_uInt32 GetType() SAL_OVERRIDE { return PP_LOCAL_BULLET; }
218 :
219 : inline LwpBulletOverride* GetLocalParaBullet();
220 :
221 : private:
222 : LwpBulletOverride* m_pBullet;
223 : };
224 :
225 8 : inline LwpBulletOverride* LwpParaBulletProperty::GetLocalParaBullet()
226 : {
227 8 : return m_pBullet;
228 : }
229 :
230 16 : class LwpParaNumberingProperty : public LwpParaProperty
231 : {
232 : public:
233 : LwpParaNumberingProperty(LwpObjectStream* pStrm);
234 :
235 8 : sal_uInt32 GetType() SAL_OVERRIDE { return PP_LOCAL_NUMBERING; }
236 :
237 : inline LwpNumberingOverride* GetLocalNumbering() const;
238 : private:
239 : LwpNumberingOverride* m_pNumberingOverride;
240 : };
241 :
242 8 : inline LwpNumberingOverride* LwpParaNumberingProperty::GetLocalNumbering() const
243 : {
244 8 : return m_pNumberingOverride;
245 : }
246 :
247 : class LwpParaTabRackProperty : public LwpParaProperty
248 : {
249 : public:
250 : LwpParaTabRackProperty(LwpObjectStream* pStrm);
251 : virtual ~LwpParaTabRackProperty(void);
252 8 : sal_uInt32 GetType() SAL_OVERRIDE { return PP_LOCAL_TABRACK; }
253 :
254 : inline LwpTabOverride* GetTab();
255 :
256 : private:
257 : LwpTabOverride* m_pTabOverride;
258 : };
259 :
260 4 : inline LwpTabOverride* LwpParaTabRackProperty::GetTab()
261 : {
262 4 : return m_pTabOverride;
263 : }
264 :
265 : class LwpParaBackGroundProperty : public LwpParaProperty
266 : {
267 : public:
268 : LwpParaBackGroundProperty(LwpObjectStream* pFile);
269 : virtual ~LwpParaBackGroundProperty(void);
270 : LwpBackgroundOverride* GetBackground(void);
271 : sal_uInt32 GetType(void) SAL_OVERRIDE;
272 : private:
273 : LwpBackgroundOverride* m_pBackground;
274 : };
275 :
276 36 : inline LwpBackgroundOverride* LwpParaBackGroundProperty::GetBackground(void)
277 : {
278 36 : return m_pBackground;
279 : }
280 :
281 36 : inline sal_uInt32 LwpParaBackGroundProperty::GetType()
282 : {
283 36 : return PP_LOCAL_BACKGROUND;
284 : }
285 :
286 : #endif
287 :
288 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|