Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*************************************************************************
3 : : *
4 : : * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 : : *
6 : : * Copyright 2000, 2010 Oracle and/or its affiliates.
7 : : *
8 : : * OpenOffice.org - a multi-platform office productivity suite
9 : : *
10 : : * This file is part of OpenOffice.org.
11 : : *
12 : : * OpenOffice.org is free software: you can redistribute it and/or modify
13 : : * it under the terms of the GNU Lesser General Public License version 3
14 : : * only, as published by the Free Software Foundation.
15 : : *
16 : : * OpenOffice.org is distributed in the hope that it will be useful,
17 : : * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 : : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 : : * GNU Lesser General Public License version 3 for more details
20 : : * (a copy is included in the LICENSE file that accompanied this code).
21 : : *
22 : : * You should have received a copy of the GNU Lesser General Public License
23 : : * version 3 along with OpenOffice.org. If not, see
24 : : * <http://www.openoffice.org/license.html>
25 : : * for a copy of the LGPLv3 License.
26 : : *
27 : : ************************************************************************/
28 : : #ifndef _SVX_CHRTITEM_HXX
29 : : #define _SVX_CHRTITEM_HXX
30 : :
31 : : #include <svl/eitem.hxx>
32 : : #include "svx/svxdllapi.h"
33 : :
34 : : //------------------------------------------------------------------------
35 : :
36 : : enum SvxChartStyle
37 : : {
38 : : CHSTYLE_2D_LINE,
39 : : CHSTYLE_2D_STACKEDLINE,
40 : : CHSTYLE_2D_PERCENTLINE,
41 : : CHSTYLE_2D_COLUMN,
42 : : CHSTYLE_2D_STACKEDCOLUMN,
43 : : CHSTYLE_2D_PERCENTCOLUMN,
44 : : CHSTYLE_2D_BAR,
45 : : CHSTYLE_2D_STACKEDBAR,
46 : : CHSTYLE_2D_PERCENTBAR,
47 : : CHSTYLE_2D_AREA,
48 : : CHSTYLE_2D_STACKEDAREA,
49 : : CHSTYLE_2D_PERCENTAREA,
50 : : CHSTYLE_2D_PIE,
51 : : CHSTYLE_3D_STRIPE,
52 : : CHSTYLE_3D_COLUMN,
53 : : CHSTYLE_3D_FLATCOLUMN,
54 : : CHSTYLE_3D_STACKEDFLATCOLUMN,
55 : : CHSTYLE_3D_PERCENTFLATCOLUMN,
56 : : CHSTYLE_3D_AREA,
57 : : CHSTYLE_3D_STACKEDAREA,
58 : : CHSTYLE_3D_PERCENTAREA,
59 : : CHSTYLE_3D_SURFACE,
60 : : CHSTYLE_3D_PIE,
61 : : CHSTYLE_2D_XY,
62 : : CHSTYLE_3D_XYZ,
63 : : CHSTYLE_2D_LINESYMBOLS,
64 : : CHSTYLE_2D_STACKEDLINESYM,
65 : : CHSTYLE_2D_PERCENTLINESYM,
66 : : CHSTYLE_2D_XYSYMBOLS,
67 : : CHSTYLE_3D_XYZSYMBOLS,
68 : : CHSTYLE_2D_DONUT1,
69 : : CHSTYLE_2D_DONUT2,
70 : : CHSTYLE_3D_BAR,
71 : : CHSTYLE_3D_FLATBAR,
72 : : CHSTYLE_3D_STACKEDFLATBAR,
73 : : CHSTYLE_3D_PERCENTFLATBAR,
74 : : CHSTYLE_2D_PIE_SEGOF1,
75 : : CHSTYLE_2D_PIE_SEGOFALL,
76 : : CHSTYLE_2D_NET,
77 : : CHSTYLE_2D_NET_SYMBOLS,
78 : : CHSTYLE_2D_NET_STACK,
79 : : CHSTYLE_2D_NET_SYMBOLS_STACK,
80 : : CHSTYLE_2D_NET_PERCENT,
81 : : CHSTYLE_2D_NET_SYMBOLS_PERCENT,
82 : : CHSTYLE_2D_CUBIC_SPLINE,
83 : : CHSTYLE_2D_CUBIC_SPLINE_SYMBOL,
84 : : CHSTYLE_2D_B_SPLINE,
85 : : CHSTYLE_2D_B_SPLINE_SYMBOL,
86 : : CHSTYLE_2D_CUBIC_SPLINE_XY,
87 : : CHSTYLE_2D_CUBIC_SPLINE_SYMBOL_XY,
88 : : CHSTYLE_2D_B_SPLINE_XY,
89 : : CHSTYLE_2D_B_SPLINE_SYMBOL_XY,
90 : : CHSTYLE_2D_XY_LINE,
91 : : CHSTYLE_2D_LINE_COLUMN,
92 : : CHSTYLE_2D_LINE_STACKEDCOLUMN,
93 : : CHSTYLE_2D_STOCK_1,
94 : : CHSTYLE_2D_STOCK_2,
95 : : CHSTYLE_2D_STOCK_3,
96 : : CHSTYLE_2D_STOCK_4,
97 : : CHSTYLE_ADDIN
98 : : };
99 : :
100 : : #define CHSTYLE_COUNT (CHSTYLE_ADDIN + 1)
101 : :
102 : : enum SvxChartDataDescr
103 : : {
104 : : CHDESCR_NONE,
105 : : CHDESCR_VALUE,
106 : : CHDESCR_PERCENT,
107 : : CHDESCR_TEXT,
108 : : CHDESCR_TEXTANDPERCENT,
109 : : CHDESCR_NUMFORMAT_PERCENT,
110 : : CHDESCR_NUMFORMAT_VALUE,
111 : : CHDESCR_TEXTANDVALUE
112 : : };
113 : :
114 : : #define CHDESCR_COUNT (CHDESCR_TEXTANDVALUE + 1)
115 : :
116 : : enum SvxChartTextOrder
117 : : {
118 : : CHTXTORDER_SIDEBYSIDE,
119 : : CHTXTORDER_UPDOWN,
120 : : CHTXTORDER_DOWNUP,
121 : : CHTXTORDER_AUTO
122 : : };
123 : :
124 : : #define CHTXTORDER_COUNT (CHTXTORDER_AUTO + 1)
125 : :
126 : : enum SvxChartTextOrient
127 : : {
128 : : CHTXTORIENT_AUTOMATIC,
129 : : CHTXTORIENT_STANDARD,
130 : : CHTXTORIENT_BOTTOMTOP,
131 : : CHTXTORIENT_STACKED,
132 : : CHTXTORIENT_TOPBOTTOM
133 : : };
134 : :
135 : : #define CHTXTORIENT_COUNT (CHTXTORIENT_TOPBOTTOM + 1)
136 : :
137 : : enum SvxChartKindError
138 : : {
139 : : CHERROR_NONE,
140 : : CHERROR_VARIANT,
141 : : CHERROR_SIGMA,
142 : : CHERROR_PERCENT,
143 : : CHERROR_BIGERROR,
144 : : CHERROR_CONST,
145 : : CHERROR_STDERROR,
146 : : CHERROR_RANGE
147 : : };
148 : :
149 : : #define CHERROR_COUNT (CHERROR_RANGE + 1)
150 : :
151 : : enum SvxChartIndicate
152 : : {
153 : : CHINDICATE_NONE,
154 : : CHINDICATE_BOTH,
155 : : CHINDICATE_UP,
156 : : CHINDICATE_DOWN
157 : : };
158 : :
159 : : #define CHINDICATE_COUNT (CHINDICATE_DOWN + 1)
160 : :
161 : : enum SvxChartRegress
162 : : {
163 : : CHREGRESS_NONE,
164 : : CHREGRESS_LINEAR,
165 : : CHREGRESS_LOG,
166 : : CHREGRESS_EXP,
167 : : CHREGRESS_POWER
168 : : };
169 : :
170 : : #define CHREGRESS_COUNT (CHREGRESS_POWER + 1)
171 : :
172 : : //------------------------------------------------------------------
173 : :
174 : : class SVX_DLLPUBLIC SvxChartStyleItem : public SfxEnumItem
175 : : {
176 : : public:
177 : : TYPEINFO();
178 : : SvxChartStyleItem(SvxChartStyle eStyle /*= CHSTYLE_2D_LINE*/,
179 : : sal_uInt16 nId );
180 : : SvxChartStyleItem(SvStream& rIn, sal_uInt16 nId );
181 : :
182 : : virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const;
183 : : virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nVer) const;
184 : :
185 : : sal_uInt16 GetValueCount() const { return CHSTYLE_COUNT; }
186 : : SvxChartStyle GetValue() const
187 : : { return (SvxChartStyle)SfxEnumItem::GetValue(); }
188 : : };
189 : :
190 : : //------------------------------------------------------------------
191 : :
192 [ # # ]: 0 : class SVX_DLLPUBLIC SvxChartRegressItem : public SfxEnumItem
193 : : {
194 : : public:
195 : : TYPEINFO();
196 : : SvxChartRegressItem(SvxChartRegress eRegress /*= CHREGRESS_LINEAR*/,
197 : : sal_uInt16 nId );
198 : : SvxChartRegressItem(SvStream& rIn, sal_uInt16 nId );
199 : :
200 : : virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const;
201 : : virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nVer) const;
202 : :
203 : : sal_uInt16 GetValueCount() const { return CHREGRESS_COUNT; }
204 : 0 : SvxChartRegress GetValue() const
205 : 0 : { return (SvxChartRegress)SfxEnumItem::GetValue(); }
206 : : sal_uInt16 GetVersion (sal_uInt16 nFileFormatVersion) const;
207 : : };
208 : :
209 : : //------------------------------------------------------------------
210 : :
211 : : class SVX_DLLPUBLIC SvxChartDataDescrItem : public SfxEnumItem
212 : : {
213 : : public:
214 : : TYPEINFO();
215 : : SvxChartDataDescrItem(SvStream& rIn,
216 : : sal_uInt16 nId );
217 : :
218 : : virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const;
219 : : virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nVer) const;
220 : :
221 : : sal_uInt16 GetValueCount() const { return CHDESCR_COUNT; }
222 : : SvxChartDataDescr GetValue() const
223 : : { return (SvxChartDataDescr)SfxEnumItem::GetValue(); }
224 : : };
225 : :
226 : : //------------------------------------------------------------------
227 : :
228 [ # # ]: 0 : class SVX_DLLPUBLIC SvxChartTextOrderItem : public SfxEnumItem
229 : : {
230 : : public:
231 : : TYPEINFO();
232 : : SvxChartTextOrderItem(SvxChartTextOrder eOrder /*= CHTXTORDER_SIDEBYSIDE*/,
233 : : sal_uInt16 nId );
234 : : SvxChartTextOrderItem(SvStream& rIn,
235 : : sal_uInt16 nId );
236 : :
237 : : virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const;
238 : : virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nVer) const;
239 : :
240 : : virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
241 : : virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
242 : :
243 : : sal_uInt16 GetValueCount() const { return CHTXTORDER_COUNT; }
244 : 0 : SvxChartTextOrder GetValue() const
245 : 0 : { return (SvxChartTextOrder)SfxEnumItem::GetValue(); }
246 : : };
247 : :
248 : : //------------------------------------------------------------------
249 : :
250 : : class SVX_DLLPUBLIC SvxChartTextOrientItem : public SfxEnumItem
251 : : {
252 : : public:
253 : : TYPEINFO();
254 : : SvxChartTextOrientItem(SvStream& rIn,
255 : : sal_uInt16 nId );
256 : :
257 : : virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const;
258 : : virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nVer) const;
259 : :
260 : : sal_uInt16 GetValueCount() const { return CHTXTORDER_COUNT; }
261 : : SvxChartTextOrient GetValue() const
262 : : { return (SvxChartTextOrient)SfxEnumItem::GetValue(); }
263 : : };
264 : :
265 : : //------------------------------------------------------------------
266 : :
267 [ # # ]: 0 : class SVX_DLLPUBLIC SvxChartKindErrorItem : public SfxEnumItem
268 : : {
269 : : public:
270 : : TYPEINFO();
271 : : SvxChartKindErrorItem(SvxChartKindError /*eOrient = CHERROR_NONE*/,
272 : : sal_uInt16 nId );
273 : : SvxChartKindErrorItem(SvStream& rIn,
274 : : sal_uInt16 nId );
275 : :
276 : : virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const;
277 : : virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nVer) const;
278 : :
279 : : sal_uInt16 GetValueCount() const { return CHERROR_COUNT; }
280 : 0 : SvxChartKindError GetValue() const
281 : 0 : { return (SvxChartKindError)SfxEnumItem::GetValue(); }
282 : :
283 : : sal_uInt16 GetVersion (sal_uInt16 nFileFormatVersion) const;
284 : : };
285 : :
286 : : //------------------------------------------------------------------
287 : :
288 [ # # ]: 0 : class SVX_DLLPUBLIC SvxChartIndicateItem : public SfxEnumItem
289 : : {
290 : : public:
291 : : TYPEINFO();
292 : : SvxChartIndicateItem(SvxChartIndicate eOrient /*= CHINDICATE_NONE*/,
293 : : sal_uInt16 nId );
294 : : SvxChartIndicateItem(SvStream& rIn,
295 : : sal_uInt16 nId );
296 : :
297 : : virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const;
298 : : virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nVer) const;
299 : :
300 : : sal_uInt16 GetValueCount() const { return CHINDICATE_COUNT; }
301 : 0 : SvxChartIndicate GetValue() const
302 : 0 : { return (SvxChartIndicate)SfxEnumItem::GetValue(); }
303 : :
304 : : sal_uInt16 GetVersion (sal_uInt16 nFileFormatVersion) const;
305 : : };
306 : :
307 : : //------------------------------------------------------------------
308 : :
309 [ # # ]: 0 : class SVX_DLLPUBLIC SvxDoubleItem : public SfxPoolItem
310 : : {
311 : : double fVal;
312 : :
313 : : public:
314 : : TYPEINFO();
315 : : SvxDoubleItem(double fValue /*= 0.0*/, sal_uInt16 nId );
316 : : SvxDoubleItem(const SvxDoubleItem& rItem);
317 : :
318 : : virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
319 : : virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
320 : :
321 : : virtual String GetValueText() const;
322 : : virtual SfxItemPresentation GetPresentation(SfxItemPresentation ePres,
323 : : SfxMapUnit eCoreMetric,
324 : : SfxMapUnit ePresMetric,
325 : : String &rText, const IntlWrapper * = 0) const;
326 : :
327 : : virtual int operator == (const SfxPoolItem&) const;
328 : : virtual SfxPoolItem* Clone(SfxItemPool *pPool = NULL) const;
329 : : virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nVersion) const;
330 : : virtual SvStream& Store(SvStream& rOut, sal_uInt16 nItemVersion ) const;
331 : :
332 : : virtual double GetMin() const;
333 : : virtual double GetMax() const;
334 : :
335 : : virtual SfxFieldUnit GetUnit() const;
336 : :
337 : 0 : double GetValue() const { return fVal; }
338 : : void SetValue(double fNewVal) { fVal = fNewVal; }
339 : : };
340 : :
341 : : #endif // _SVX_CHRTITEM_HXX
342 : :
343 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|