bump product version to 4.2.0.1
[LibreOffice.git] / include / svx / chrtitem.hxx
blob95e8c3a4871b089f632ad479cf0709fb94feef07
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef INCLUDED_SVX_CHRTITEM_HXX
20 #define INCLUDED_SVX_CHRTITEM_HXX
22 #include <svl/eitem.hxx>
23 #include <svx/svxdllapi.h>
25 //------------------------------------------------------------------------
27 enum SvxChartStyle
29 CHSTYLE_2D_LINE,
30 CHSTYLE_2D_STACKEDLINE,
31 CHSTYLE_2D_PERCENTLINE,
32 CHSTYLE_2D_COLUMN,
33 CHSTYLE_2D_STACKEDCOLUMN,
34 CHSTYLE_2D_PERCENTCOLUMN,
35 CHSTYLE_2D_BAR,
36 CHSTYLE_2D_STACKEDBAR,
37 CHSTYLE_2D_PERCENTBAR,
38 CHSTYLE_2D_AREA,
39 CHSTYLE_2D_STACKEDAREA,
40 CHSTYLE_2D_PERCENTAREA,
41 CHSTYLE_2D_PIE,
42 CHSTYLE_3D_STRIPE,
43 CHSTYLE_3D_COLUMN,
44 CHSTYLE_3D_FLATCOLUMN,
45 CHSTYLE_3D_STACKEDFLATCOLUMN,
46 CHSTYLE_3D_PERCENTFLATCOLUMN,
47 CHSTYLE_3D_AREA,
48 CHSTYLE_3D_STACKEDAREA,
49 CHSTYLE_3D_PERCENTAREA,
50 CHSTYLE_3D_SURFACE,
51 CHSTYLE_3D_PIE,
52 CHSTYLE_2D_XY,
53 CHSTYLE_3D_XYZ,
54 CHSTYLE_2D_LINESYMBOLS,
55 CHSTYLE_2D_STACKEDLINESYM,
56 CHSTYLE_2D_PERCENTLINESYM,
57 CHSTYLE_2D_XYSYMBOLS,
58 CHSTYLE_3D_XYZSYMBOLS,
59 CHSTYLE_2D_DONUT1,
60 CHSTYLE_2D_DONUT2,
61 CHSTYLE_3D_BAR,
62 CHSTYLE_3D_FLATBAR,
63 CHSTYLE_3D_STACKEDFLATBAR,
64 CHSTYLE_3D_PERCENTFLATBAR,
65 CHSTYLE_2D_PIE_SEGOF1,
66 CHSTYLE_2D_PIE_SEGOFALL,
67 CHSTYLE_2D_NET,
68 CHSTYLE_2D_NET_SYMBOLS,
69 CHSTYLE_2D_NET_STACK,
70 CHSTYLE_2D_NET_SYMBOLS_STACK,
71 CHSTYLE_2D_NET_PERCENT,
72 CHSTYLE_2D_NET_SYMBOLS_PERCENT,
73 CHSTYLE_2D_CUBIC_SPLINE,
74 CHSTYLE_2D_CUBIC_SPLINE_SYMBOL,
75 CHSTYLE_2D_B_SPLINE,
76 CHSTYLE_2D_B_SPLINE_SYMBOL,
77 CHSTYLE_2D_CUBIC_SPLINE_XY,
78 CHSTYLE_2D_CUBIC_SPLINE_SYMBOL_XY,
79 CHSTYLE_2D_B_SPLINE_XY,
80 CHSTYLE_2D_B_SPLINE_SYMBOL_XY,
81 CHSTYLE_2D_XY_LINE,
82 CHSTYLE_2D_LINE_COLUMN,
83 CHSTYLE_2D_LINE_STACKEDCOLUMN,
84 CHSTYLE_2D_STOCK_1,
85 CHSTYLE_2D_STOCK_2,
86 CHSTYLE_2D_STOCK_3,
87 CHSTYLE_2D_STOCK_4,
88 CHSTYLE_ADDIN
91 #define CHSTYLE_COUNT (CHSTYLE_ADDIN + 1)
93 enum SvxChartDataDescr
95 CHDESCR_NONE,
96 CHDESCR_VALUE,
97 CHDESCR_PERCENT,
98 CHDESCR_TEXT,
99 CHDESCR_TEXTANDPERCENT,
100 CHDESCR_NUMFORMAT_PERCENT,
101 CHDESCR_NUMFORMAT_VALUE,
102 CHDESCR_TEXTANDVALUE
105 #define CHDESCR_COUNT (CHDESCR_TEXTANDVALUE + 1)
107 enum SvxChartTextOrder
109 CHTXTORDER_SIDEBYSIDE,
110 CHTXTORDER_UPDOWN,
111 CHTXTORDER_DOWNUP,
112 CHTXTORDER_AUTO
115 #define CHTXTORDER_COUNT (CHTXTORDER_AUTO + 1)
117 enum SvxChartTextOrient
119 CHTXTORIENT_AUTOMATIC,
120 CHTXTORIENT_STANDARD,
121 CHTXTORIENT_BOTTOMTOP,
122 CHTXTORIENT_STACKED,
123 CHTXTORIENT_TOPBOTTOM
126 #define CHTXTORIENT_COUNT (CHTXTORIENT_TOPBOTTOM + 1)
128 enum SvxChartKindError
130 CHERROR_NONE,
131 CHERROR_VARIANT,
132 CHERROR_SIGMA,
133 CHERROR_PERCENT,
134 CHERROR_BIGERROR,
135 CHERROR_CONST,
136 CHERROR_STDERROR,
137 CHERROR_RANGE
140 #define CHERROR_COUNT (CHERROR_RANGE + 1)
142 enum SvxChartIndicate
144 CHINDICATE_NONE,
145 CHINDICATE_BOTH,
146 CHINDICATE_UP,
147 CHINDICATE_DOWN
150 #define CHINDICATE_COUNT (CHINDICATE_DOWN + 1)
152 enum SvxChartRegress
154 CHREGRESS_NONE,
155 CHREGRESS_LINEAR,
156 CHREGRESS_LOG,
157 CHREGRESS_EXP,
158 CHREGRESS_POWER,
159 CHREGRESS_POLYNOMIAL,
160 CHREGRESS_MOVING_AVERAGE
163 #define CHREGRESS_COUNT (CHREGRESS_MOVING_AVERAGE + 1)
165 //------------------------------------------------------------------
167 class SVX_DLLPUBLIC SvxChartStyleItem : public SfxEnumItem
169 public:
170 TYPEINFO();
171 SvxChartStyleItem(SvxChartStyle eStyle /*= CHSTYLE_2D_LINE*/,
172 sal_uInt16 nId );
173 SvxChartStyleItem(SvStream& rIn, sal_uInt16 nId );
175 virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const;
176 virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nVer) const;
178 sal_uInt16 GetValueCount() const { return CHSTYLE_COUNT; }
179 SvxChartStyle GetValue() const
180 { return (SvxChartStyle)SfxEnumItem::GetValue(); }
183 //------------------------------------------------------------------
185 class SVX_DLLPUBLIC SvxChartRegressItem : public SfxEnumItem
187 public:
188 TYPEINFO();
189 SvxChartRegressItem(SvxChartRegress eRegress /*= CHREGRESS_LINEAR*/,
190 sal_uInt16 nId );
191 SvxChartRegressItem(SvStream& rIn, sal_uInt16 nId );
193 virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const;
194 virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nVer) const;
196 sal_uInt16 GetValueCount() const { return CHREGRESS_COUNT; }
197 SvxChartRegress GetValue() const
198 { return (SvxChartRegress)SfxEnumItem::GetValue(); }
199 sal_uInt16 GetVersion (sal_uInt16 nFileFormatVersion) const;
202 //------------------------------------------------------------------
204 class SVX_DLLPUBLIC SvxChartDataDescrItem : public SfxEnumItem
206 public:
207 TYPEINFO();
208 SvxChartDataDescrItem(SvStream& rIn,
209 sal_uInt16 nId );
211 virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const;
212 virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nVer) const;
214 sal_uInt16 GetValueCount() const { return CHDESCR_COUNT; }
215 SvxChartDataDescr GetValue() const
216 { return (SvxChartDataDescr)SfxEnumItem::GetValue(); }
219 //------------------------------------------------------------------
221 class SVX_DLLPUBLIC SvxChartTextOrderItem : public SfxEnumItem
223 public:
224 TYPEINFO();
225 SvxChartTextOrderItem(SvxChartTextOrder eOrder /*= CHTXTORDER_SIDEBYSIDE*/,
226 sal_uInt16 nId );
227 SvxChartTextOrderItem(SvStream& rIn,
228 sal_uInt16 nId );
230 virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const;
231 virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nVer) const;
233 virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
234 virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
236 sal_uInt16 GetValueCount() const { return CHTXTORDER_COUNT; }
237 SvxChartTextOrder GetValue() const
238 { return (SvxChartTextOrder)SfxEnumItem::GetValue(); }
241 //------------------------------------------------------------------
243 class SVX_DLLPUBLIC SvxChartTextOrientItem : public SfxEnumItem
245 public:
246 TYPEINFO();
247 SvxChartTextOrientItem(SvStream& rIn,
248 sal_uInt16 nId );
250 virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const;
251 virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nVer) const;
253 sal_uInt16 GetValueCount() const { return CHTXTORDER_COUNT; }
254 SvxChartTextOrient GetValue() const
255 { return (SvxChartTextOrient)SfxEnumItem::GetValue(); }
258 //------------------------------------------------------------------
260 class SVX_DLLPUBLIC SvxChartKindErrorItem : public SfxEnumItem
262 public:
263 TYPEINFO();
264 SvxChartKindErrorItem(SvxChartKindError /*eOrient = CHERROR_NONE*/,
265 sal_uInt16 nId );
266 SvxChartKindErrorItem(SvStream& rIn,
267 sal_uInt16 nId );
269 virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const;
270 virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nVer) const;
272 sal_uInt16 GetValueCount() const { return CHERROR_COUNT; }
273 SvxChartKindError GetValue() const
274 { return (SvxChartKindError)SfxEnumItem::GetValue(); }
276 sal_uInt16 GetVersion (sal_uInt16 nFileFormatVersion) const;
279 //------------------------------------------------------------------
281 class SVX_DLLPUBLIC SvxChartIndicateItem : public SfxEnumItem
283 public:
284 TYPEINFO();
285 SvxChartIndicateItem(SvxChartIndicate eOrient /*= CHINDICATE_NONE*/,
286 sal_uInt16 nId );
287 SvxChartIndicateItem(SvStream& rIn,
288 sal_uInt16 nId );
290 virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const;
291 virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nVer) const;
293 sal_uInt16 GetValueCount() const { return CHINDICATE_COUNT; }
294 SvxChartIndicate GetValue() const
295 { return (SvxChartIndicate)SfxEnumItem::GetValue(); }
297 sal_uInt16 GetVersion (sal_uInt16 nFileFormatVersion) const;
300 //------------------------------------------------------------------
302 class SVX_DLLPUBLIC SvxDoubleItem : public SfxPoolItem
304 double fVal;
306 public:
307 TYPEINFO();
308 SvxDoubleItem(double fValue /*= 0.0*/, sal_uInt16 nId );
309 SvxDoubleItem(const SvxDoubleItem& rItem);
311 virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
312 virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
314 virtual OUString GetValueText() const;
315 virtual SfxItemPresentation GetPresentation(SfxItemPresentation ePres,
316 SfxMapUnit eCoreMetric,
317 SfxMapUnit ePresMetric,
318 OUString &rText, const IntlWrapper * = 0) const;
320 virtual int operator == (const SfxPoolItem&) const;
321 virtual SfxPoolItem* Clone(SfxItemPool *pPool = NULL) const;
322 virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nVersion) const;
323 virtual SvStream& Store(SvStream& rOut, sal_uInt16 nItemVersion ) const;
325 virtual double GetMin() const;
326 virtual double GetMax() const;
328 virtual SfxFieldUnit GetUnit() const;
330 double GetValue() const { return fVal; }
331 void SetValue(double fNewVal) { fVal = fNewVal; }
334 #endif // INCLUDED_SVX_CHRTITEM_HXX
336 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */