tdf#163948: fix crash when NotesPane is enabled on Tabbed UI
[LibreOffice.git] / lotuswordpro / source / filter / lwpparaproperty.hxx
blobe4c10062d5dbe1f699fdc61a0cc3b02cbd0222a9
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 * For LWP filter architecture prototype
59 ************************************************************************/
61 #ifndef INCLUDED_LOTUSWORDPRO_SOURCE_FILTER_LWPPARAPROPERTY_HXX
62 #define INCLUDED_LOTUSWORDPRO_SOURCE_FILTER_LWPPARAPROPERTY_HXX
64 #include <memory>
65 #include <lwpobjstrm.hxx>
67 #include <lwpoverride.hxx>
68 #include "lwpbackgroundoverride.hxx"
69 #include "lwpbreaksoverride.hxx"
70 #include "lwpnumberingoverride.hxx"
71 #include "lwpparaborderoverride.hxx"
72 #include "lwptaboverride.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
91 public:
92 LwpParaProperty(){}
93 virtual ~LwpParaProperty() {}
94 virtual sal_uInt32 GetType() = 0;
97 //align/indent/spacing
98 //TO DO:border/background etc
100 class LwpParaAlignProperty : public LwpParaProperty
102 public:
103 explicit LwpParaAlignProperty(LwpObjectStream* pFile);
104 virtual ~LwpParaAlignProperty() override;
105 LwpAlignmentOverride* GetAlignment();
106 sal_uInt32 GetType() override;
108 private:
109 LwpAlignmentOverride* m_pAlignment;
112 inline LwpAlignmentOverride* LwpParaAlignProperty::GetAlignment()
114 return m_pAlignment;
117 class LwpParaIndentProperty : public LwpParaProperty
119 public:
120 explicit LwpParaIndentProperty(LwpObjectStream* pFile);
121 virtual ~LwpParaIndentProperty() override;
122 LwpIndentOverride* GetIndent();
123 sal_uInt32 GetType() override;
124 inline const LwpObjectID& GetIndentID() const;
126 private:
127 LwpObjectID m_aIndentID;
128 LwpIndentOverride* m_pIndent;
130 inline const LwpObjectID& LwpParaIndentProperty::GetIndentID() const
132 return m_aIndentID;
134 inline LwpIndentOverride* LwpParaIndentProperty::GetIndent()
136 return m_pIndent;
139 class LwpParaSpacingProperty : public LwpParaProperty
141 public:
142 explicit LwpParaSpacingProperty(LwpObjectStream* pFile);
143 virtual ~LwpParaSpacingProperty() override;
144 LwpSpacingOverride* GetSpacing();
145 sal_uInt32 GetType() override;
146 private:
147 LwpSpacingOverride* m_pSpacing;
151 inline LwpSpacingOverride* LwpParaSpacingProperty::GetSpacing()
153 return m_pSpacing;
156 class LwpParaBorderOverride;
157 class LwpParaBorderProperty : public LwpParaProperty
159 public:
160 explicit LwpParaBorderProperty(LwpObjectStream* pStrm);
162 sal_uInt32 GetType() override { return PP_LOCAL_BORDER; }
164 inline LwpParaBorderOverride* GetLocalParaBorder();
166 private:
167 LwpParaBorderOverride* m_pParaBorderOverride;
170 inline LwpParaBorderOverride* LwpParaBorderProperty::GetLocalParaBorder()
172 return m_pParaBorderOverride;
175 class LwpParaBreaksProperty : public LwpParaProperty
177 public:
178 explicit LwpParaBreaksProperty(LwpObjectStream* pStrm);
180 sal_uInt32 GetType() override { return PP_LOCAL_BREAKS; }
182 inline LwpBreaksOverride* GetLocalParaBreaks();
184 private:
185 LwpBreaksOverride* m_pBreaks;
189 inline LwpBreaksOverride* LwpParaBreaksProperty::GetLocalParaBreaks()
191 return m_pBreaks;
194 class LwpParaBulletProperty : public LwpParaProperty
196 public:
197 explicit LwpParaBulletProperty(LwpObjectStream* pStrm);
199 virtual ~LwpParaBulletProperty() override;
201 sal_uInt32 GetType() override { return PP_LOCAL_BULLET; }
203 inline LwpBulletOverride* GetLocalParaBullet();
205 private:
206 std::unique_ptr<LwpBulletOverride> m_pBullet;
209 inline LwpBulletOverride* LwpParaBulletProperty::GetLocalParaBullet()
211 return m_pBullet.get();
214 class LwpParaNumberingProperty : public LwpParaProperty
216 public:
217 explicit LwpParaNumberingProperty(LwpObjectStream* pStrm);
219 sal_uInt32 GetType() override { return PP_LOCAL_NUMBERING; }
221 inline LwpNumberingOverride* GetLocalNumbering() const;
222 private:
223 LwpNumberingOverride* m_pNumberingOverride;
226 inline LwpNumberingOverride* LwpParaNumberingProperty::GetLocalNumbering() const
228 return m_pNumberingOverride;
231 class LwpParaTabRackProperty : public LwpParaProperty
233 public:
234 explicit LwpParaTabRackProperty(LwpObjectStream* pStrm);
235 virtual ~LwpParaTabRackProperty() override;
236 sal_uInt32 GetType() override { return PP_LOCAL_TABRACK; }
238 inline LwpTabOverride* GetTab();
240 private:
241 LwpTabOverride* m_pTabOverride;
244 inline LwpTabOverride* LwpParaTabRackProperty::GetTab()
246 return m_pTabOverride;
249 class LwpParaBackGroundProperty : public LwpParaProperty
251 public:
252 explicit LwpParaBackGroundProperty(LwpObjectStream* pFile);
253 virtual ~LwpParaBackGroundProperty() override;
254 LwpBackgroundOverride* GetBackground();
255 sal_uInt32 GetType() override;
256 private:
257 LwpBackgroundOverride* m_pBackground;
260 inline LwpBackgroundOverride* LwpParaBackGroundProperty::GetBackground()
262 return m_pBackground;
265 inline sal_uInt32 LwpParaBackGroundProperty::GetType()
267 return PP_LOCAL_BACKGROUND;
270 #endif
272 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */