merge the formfield patch from ooo-build
[ooovba.git] / svx / inc / chrtitem.hxx
blobd1ba824d6d781f24d1884f09f0b8215bdf317e10
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: chrtitem.hxx,v $
10 * $Revision: 1.9 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _SVX_CHRTITEM_HXX
31 #define _SVX_CHRTITEM_HXX
33 // include ---------------------------------------------------------------
35 #include <svtools/eitem.hxx>
36 #include "svx/svxdllapi.h"
38 //------------------------------------------------------------------------
40 enum SvxChartStyle
42 CHSTYLE_2D_LINE,
43 CHSTYLE_2D_STACKEDLINE,
44 CHSTYLE_2D_PERCENTLINE,
45 CHSTYLE_2D_COLUMN,
46 CHSTYLE_2D_STACKEDCOLUMN,
47 CHSTYLE_2D_PERCENTCOLUMN,
48 CHSTYLE_2D_BAR,
49 CHSTYLE_2D_STACKEDBAR,
50 CHSTYLE_2D_PERCENTBAR,
51 CHSTYLE_2D_AREA,
52 CHSTYLE_2D_STACKEDAREA,
53 CHSTYLE_2D_PERCENTAREA,
54 CHSTYLE_2D_PIE,
55 CHSTYLE_3D_STRIPE,
56 CHSTYLE_3D_COLUMN,
57 CHSTYLE_3D_FLATCOLUMN,
58 CHSTYLE_3D_STACKEDFLATCOLUMN,
59 CHSTYLE_3D_PERCENTFLATCOLUMN,
60 CHSTYLE_3D_AREA,
61 CHSTYLE_3D_STACKEDAREA,
62 CHSTYLE_3D_PERCENTAREA,
63 CHSTYLE_3D_SURFACE,
64 CHSTYLE_3D_PIE,
65 CHSTYLE_2D_XY,
66 CHSTYLE_3D_XYZ,
67 CHSTYLE_2D_LINESYMBOLS,
68 CHSTYLE_2D_STACKEDLINESYM,
69 CHSTYLE_2D_PERCENTLINESYM,
70 CHSTYLE_2D_XYSYMBOLS,
71 CHSTYLE_3D_XYZSYMBOLS,
72 CHSTYLE_2D_DONUT1,
73 CHSTYLE_2D_DONUT2,
74 CHSTYLE_3D_BAR,
75 CHSTYLE_3D_FLATBAR,
76 CHSTYLE_3D_STACKEDFLATBAR,
77 CHSTYLE_3D_PERCENTFLATBAR,
78 CHSTYLE_2D_PIE_SEGOF1,
79 CHSTYLE_2D_PIE_SEGOFALL,
80 CHSTYLE_2D_NET,
81 CHSTYLE_2D_NET_SYMBOLS,
82 CHSTYLE_2D_NET_STACK,
83 CHSTYLE_2D_NET_SYMBOLS_STACK,
84 CHSTYLE_2D_NET_PERCENT,
85 CHSTYLE_2D_NET_SYMBOLS_PERCENT,
86 CHSTYLE_2D_CUBIC_SPLINE,
87 CHSTYLE_2D_CUBIC_SPLINE_SYMBOL,
88 CHSTYLE_2D_B_SPLINE,
89 CHSTYLE_2D_B_SPLINE_SYMBOL,
90 CHSTYLE_2D_CUBIC_SPLINE_XY,
91 CHSTYLE_2D_CUBIC_SPLINE_SYMBOL_XY,
92 CHSTYLE_2D_B_SPLINE_XY,
93 CHSTYLE_2D_B_SPLINE_SYMBOL_XY,
94 CHSTYLE_2D_XY_LINE,
95 CHSTYLE_2D_LINE_COLUMN,
96 CHSTYLE_2D_LINE_STACKEDCOLUMN,
97 CHSTYLE_2D_STOCK_1,
98 CHSTYLE_2D_STOCK_2,
99 CHSTYLE_2D_STOCK_3,
100 CHSTYLE_2D_STOCK_4,
101 CHSTYLE_ADDIN
104 #define CHSTYLE_COUNT (CHSTYLE_ADDIN + 1)
106 enum SvxChartDataDescr
108 CHDESCR_NONE,
109 CHDESCR_VALUE,
110 CHDESCR_PERCENT,
111 CHDESCR_TEXT,
112 CHDESCR_TEXTANDPERCENT,
113 CHDESCR_NUMFORMAT_PERCENT,
114 CHDESCR_NUMFORMAT_VALUE,
115 CHDESCR_TEXTANDVALUE
118 #define CHDESCR_COUNT (CHDESCR_TEXTANDVALUE + 1)
120 enum SvxChartLegendPos
122 CHLEGEND_NONE,
123 CHLEGEND_LEFT,
124 CHLEGEND_TOP,
125 CHLEGEND_RIGHT,
126 CHLEGEND_BOTTOM,
127 CHLEGEND_NONE_TOP,
128 CHLEGEND_NONE_LEFT,
129 CHLEGEND_NONE_RIGHT,
130 CHLEGEND_NONE_BOTTOM
133 #define CHLEGEND_COUNT (CHLEGEND_BOTTOM + 1)
135 enum SvxChartTextOrder
137 CHTXTORDER_SIDEBYSIDE,
138 CHTXTORDER_UPDOWN,
139 CHTXTORDER_DOWNUP,
140 CHTXTORDER_AUTO
143 #define CHTXTORDER_COUNT (CHTXTORDER_AUTO + 1)
145 enum SvxChartTextOrient
147 CHTXTORIENT_AUTOMATIC,
148 CHTXTORIENT_STANDARD,
149 CHTXTORIENT_BOTTOMTOP,
150 CHTXTORIENT_STACKED,
151 CHTXTORIENT_TOPBOTTOM
154 #define CHTXTORIENT_COUNT (CHTXTORIENT_TOPBOTTOM + 1)
156 enum SvxChartKindError
158 CHERROR_NONE,
159 CHERROR_VARIANT,
160 CHERROR_SIGMA,
161 CHERROR_PERCENT,
162 CHERROR_BIGERROR,
163 CHERROR_CONST,
164 CHERROR_STDERROR,
165 CHERROR_RANGE
168 #define CHERROR_COUNT (CHERROR_RANGE + 1)
170 enum SvxChartIndicate
172 CHINDICATE_NONE,
173 CHINDICATE_BOTH,
174 CHINDICATE_UP,
175 CHINDICATE_DOWN
178 #define CHINDICATE_COUNT (CHINDICATE_DOWN + 1)
180 enum SvxChartRegress
182 CHREGRESS_NONE,
183 CHREGRESS_LINEAR,
184 CHREGRESS_LOG,
185 CHREGRESS_EXP,
186 CHREGRESS_POWER
189 #define CHREGRESS_COUNT (CHREGRESS_POWER + 1)
191 //------------------------------------------------------------------
193 class SVX_DLLPUBLIC SvxChartStyleItem : public SfxEnumItem
195 public:
196 TYPEINFO();
197 SvxChartStyleItem(SvxChartStyle eStyle /*= CHSTYLE_2D_LINE*/,
198 USHORT nId );
199 SvxChartStyleItem(SvStream& rIn, USHORT nId );
201 virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const;
202 virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVer) const;
204 USHORT GetValueCount() const { return CHSTYLE_COUNT; }
205 SvxChartStyle GetValue() const
206 { return (SvxChartStyle)SfxEnumItem::GetValue(); }
209 //------------------------------------------------------------------
211 class SVX_DLLPUBLIC SvxChartRegressItem : public SfxEnumItem
213 public:
214 TYPEINFO();
215 SvxChartRegressItem(SvxChartRegress eRegress /*= CHREGRESS_LINEAR*/,
216 USHORT nId );
217 SvxChartRegressItem(SvStream& rIn, USHORT nId );
219 virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const;
220 virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVer) const;
222 USHORT GetValueCount() const { return CHREGRESS_COUNT; }
223 SvxChartRegress GetValue() const
224 { return (SvxChartRegress)SfxEnumItem::GetValue(); }
225 USHORT GetVersion (USHORT nFileFormatVersion) const;
228 //------------------------------------------------------------------
230 class SVX_DLLPUBLIC SvxChartDataDescrItem : public SfxEnumItem
232 public:
233 TYPEINFO();
234 SvxChartDataDescrItem(SvxChartDataDescr eDataDescr /*= CHDESCR_NONE*/,
235 USHORT nId );
236 SvxChartDataDescrItem(SvStream& rIn,
237 USHORT nId );
239 virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const;
240 virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVer) const;
242 USHORT GetValueCount() const { return CHDESCR_COUNT; }
243 SvxChartDataDescr GetValue() const
244 { return (SvxChartDataDescr)SfxEnumItem::GetValue(); }
247 //------------------------------------------------------------------
249 class SVX_DLLPUBLIC SvxChartLegendPosItem : public SfxEnumItem
251 public:
252 TYPEINFO();
253 SvxChartLegendPosItem(SvxChartLegendPos eLegendPos /*= CHLEGEND_NONE*/,
254 USHORT nId );
255 SvxChartLegendPosItem(SvStream& rIn,
256 USHORT nId );
258 virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const;
259 virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVer) const;
261 USHORT GetValueCount() const { return CHLEGEND_COUNT; }
262 SvxChartLegendPos GetValue() const
263 { return (SvxChartLegendPos)SfxEnumItem::GetValue(); }
266 //------------------------------------------------------------------
268 class SVX_DLLPUBLIC SvxChartTextOrderItem : public SfxEnumItem
270 public:
271 TYPEINFO();
272 SvxChartTextOrderItem(SvxChartTextOrder eOrder /*= CHTXTORDER_SIDEBYSIDE*/,
273 USHORT nId );
274 SvxChartTextOrderItem(SvStream& rIn,
275 USHORT nId );
277 virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const;
278 virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVer) const;
280 virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
281 virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
283 USHORT GetValueCount() const { return CHTXTORDER_COUNT; }
284 SvxChartTextOrder GetValue() const
285 { return (SvxChartTextOrder)SfxEnumItem::GetValue(); }
288 //------------------------------------------------------------------
290 class SVX_DLLPUBLIC SvxChartTextOrientItem : public SfxEnumItem
292 public:
293 TYPEINFO();
294 SvxChartTextOrientItem(SvxChartTextOrient /*eOrient = CHTXTORIENT_STANDARD*/,
295 USHORT nId );
296 SvxChartTextOrientItem(SvStream& rIn,
297 USHORT nId );
299 virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const;
300 virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVer) const;
302 USHORT GetValueCount() const { return CHTXTORDER_COUNT; }
303 SvxChartTextOrient GetValue() const
304 { return (SvxChartTextOrient)SfxEnumItem::GetValue(); }
307 //------------------------------------------------------------------
309 class SVX_DLLPUBLIC SvxChartKindErrorItem : public SfxEnumItem
311 public:
312 TYPEINFO();
313 SvxChartKindErrorItem(SvxChartKindError /*eOrient = CHERROR_NONE*/,
314 USHORT nId );
315 SvxChartKindErrorItem(SvStream& rIn,
316 USHORT nId );
318 virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const;
319 virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVer) const;
321 USHORT GetValueCount() const { return CHERROR_COUNT; }
322 SvxChartKindError GetValue() const
323 { return (SvxChartKindError)SfxEnumItem::GetValue(); }
325 USHORT GetVersion (USHORT nFileFormatVersion) const;
328 //------------------------------------------------------------------
330 class SVX_DLLPUBLIC SvxChartIndicateItem : public SfxEnumItem
332 public:
333 TYPEINFO();
334 SvxChartIndicateItem(SvxChartIndicate eOrient /*= CHINDICATE_NONE*/,
335 USHORT nId );
336 SvxChartIndicateItem(SvStream& rIn,
337 USHORT nId );
339 virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const;
340 virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVer) const;
342 USHORT GetValueCount() const { return CHINDICATE_COUNT; }
343 SvxChartIndicate GetValue() const
344 { return (SvxChartIndicate)SfxEnumItem::GetValue(); }
346 USHORT GetVersion (USHORT nFileFormatVersion) const;
349 //------------------------------------------------------------------
351 class SVX_DLLPUBLIC SvxDoubleItem : public SfxPoolItem
353 double fVal;
355 public:
356 TYPEINFO();
357 SvxDoubleItem(double fValue /*= 0.0*/, USHORT nId );
358 SvxDoubleItem(SvStream& rIn, USHORT nId );
359 SvxDoubleItem(const SvxDoubleItem& rItem);
362 virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
363 virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
367 virtual String GetValueText() const;
368 virtual SfxItemPresentation GetPresentation(SfxItemPresentation ePres,
369 SfxMapUnit eCoreMetric,
370 SfxMapUnit ePresMetric,
371 String &rText, const IntlWrapper * = 0) const;
373 virtual int operator == (const SfxPoolItem&) const;
374 virtual SfxPoolItem* Clone(SfxItemPool *pPool = NULL) const;
375 virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVersion) const;
376 virtual SvStream& Store(SvStream& rOut, USHORT nItemVersion ) const;
378 virtual double GetMin() const;
379 virtual double GetMax() const;
381 virtual SfxFieldUnit GetUnit() const;
383 double GetValue() const { return fVal; }
384 void SetValue(double fNewVal) { fVal = fNewVal; }
387 #endif // _SVX_CHRTITEM_HXX