Branch libreoffice-5-0-4
[LibreOffice.git] / include / svx / chrtitem.hxx
blob4d51b032776c5af856923315478f2803347eabff
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 enum SvxChartStyle
27 CHSTYLE_2D_LINE,
28 CHSTYLE_2D_STACKEDLINE,
29 CHSTYLE_2D_PERCENTLINE,
30 CHSTYLE_2D_COLUMN,
31 CHSTYLE_2D_STACKEDCOLUMN,
32 CHSTYLE_2D_PERCENTCOLUMN,
33 CHSTYLE_2D_BAR,
34 CHSTYLE_2D_STACKEDBAR,
35 CHSTYLE_2D_PERCENTBAR,
36 CHSTYLE_2D_AREA,
37 CHSTYLE_2D_STACKEDAREA,
38 CHSTYLE_2D_PERCENTAREA,
39 CHSTYLE_2D_PIE,
40 CHSTYLE_3D_STRIPE,
41 CHSTYLE_3D_COLUMN,
42 CHSTYLE_3D_FLATCOLUMN,
43 CHSTYLE_3D_STACKEDFLATCOLUMN,
44 CHSTYLE_3D_PERCENTFLATCOLUMN,
45 CHSTYLE_3D_AREA,
46 CHSTYLE_3D_STACKEDAREA,
47 CHSTYLE_3D_PERCENTAREA,
48 CHSTYLE_3D_SURFACE,
49 CHSTYLE_3D_PIE,
50 CHSTYLE_2D_XY,
51 CHSTYLE_3D_XYZ,
52 CHSTYLE_2D_LINESYMBOLS,
53 CHSTYLE_2D_STACKEDLINESYM,
54 CHSTYLE_2D_PERCENTLINESYM,
55 CHSTYLE_2D_XYSYMBOLS,
56 CHSTYLE_3D_XYZSYMBOLS,
57 CHSTYLE_2D_DONUT1,
58 CHSTYLE_2D_DONUT2,
59 CHSTYLE_3D_BAR,
60 CHSTYLE_3D_FLATBAR,
61 CHSTYLE_3D_STACKEDFLATBAR,
62 CHSTYLE_3D_PERCENTFLATBAR,
63 CHSTYLE_2D_PIE_SEGOF1,
64 CHSTYLE_2D_PIE_SEGOFALL,
65 CHSTYLE_2D_NET,
66 CHSTYLE_2D_NET_SYMBOLS,
67 CHSTYLE_2D_NET_STACK,
68 CHSTYLE_2D_NET_SYMBOLS_STACK,
69 CHSTYLE_2D_NET_PERCENT,
70 CHSTYLE_2D_NET_SYMBOLS_PERCENT,
71 CHSTYLE_2D_CUBIC_SPLINE,
72 CHSTYLE_2D_CUBIC_SPLINE_SYMBOL,
73 CHSTYLE_2D_B_SPLINE,
74 CHSTYLE_2D_B_SPLINE_SYMBOL,
75 CHSTYLE_2D_CUBIC_SPLINE_XY,
76 CHSTYLE_2D_CUBIC_SPLINE_SYMBOL_XY,
77 CHSTYLE_2D_B_SPLINE_XY,
78 CHSTYLE_2D_B_SPLINE_SYMBOL_XY,
79 CHSTYLE_2D_XY_LINE,
80 CHSTYLE_2D_LINE_COLUMN,
81 CHSTYLE_2D_LINE_STACKEDCOLUMN,
82 CHSTYLE_2D_STOCK_1,
83 CHSTYLE_2D_STOCK_2,
84 CHSTYLE_2D_STOCK_3,
85 CHSTYLE_2D_STOCK_4,
86 CHSTYLE_ADDIN
89 #define CHSTYLE_COUNT (CHSTYLE_ADDIN + 1)
91 enum SvxChartDataDescr
93 CHDESCR_NONE,
94 CHDESCR_VALUE,
95 CHDESCR_PERCENT,
96 CHDESCR_TEXT,
97 CHDESCR_TEXTANDPERCENT,
98 CHDESCR_NUMFORMAT_PERCENT,
99 CHDESCR_NUMFORMAT_VALUE,
100 CHDESCR_TEXTANDVALUE
103 #define CHDESCR_COUNT (CHDESCR_TEXTANDVALUE + 1)
105 enum SvxChartTextOrder
107 CHTXTORDER_SIDEBYSIDE,
108 CHTXTORDER_UPDOWN,
109 CHTXTORDER_DOWNUP,
110 CHTXTORDER_AUTO
113 #define CHTXTORDER_COUNT (CHTXTORDER_AUTO + 1)
115 enum SvxChartTextOrient
117 CHTXTORIENT_AUTOMATIC,
118 CHTXTORIENT_STANDARD,
119 CHTXTORIENT_BOTTOMTOP,
120 CHTXTORIENT_STACKED,
121 CHTXTORIENT_TOPBOTTOM
124 #define CHTXTORIENT_COUNT (CHTXTORIENT_TOPBOTTOM + 1)
126 enum SvxChartKindError
128 CHERROR_NONE,
129 CHERROR_VARIANT,
130 CHERROR_SIGMA,
131 CHERROR_PERCENT,
132 CHERROR_BIGERROR,
133 CHERROR_CONST,
134 CHERROR_STDERROR,
135 CHERROR_RANGE
138 #define CHERROR_COUNT (CHERROR_RANGE + 1)
140 enum SvxChartIndicate
142 CHINDICATE_NONE,
143 CHINDICATE_BOTH,
144 CHINDICATE_UP,
145 CHINDICATE_DOWN
148 #define CHINDICATE_COUNT (CHINDICATE_DOWN + 1)
150 enum SvxChartRegress
152 CHREGRESS_NONE,
153 CHREGRESS_LINEAR,
154 CHREGRESS_LOG,
155 CHREGRESS_EXP,
156 CHREGRESS_POWER,
157 CHREGRESS_POLYNOMIAL,
158 CHREGRESS_MOVING_AVERAGE,
159 CHREGRESS_MEAN_VALUE,
160 CHREGRESS_UNKNOWN
163 #define CHREGRESS_COUNT (CHREGRESS_UNKNOWN + 1)
165 class SVX_DLLPUBLIC SAL_WARN_UNUSED SvxChartStyleItem : public SfxEnumItem
167 public:
168 TYPEINFO_OVERRIDE();
169 SvxChartStyleItem(SvxChartStyle eStyle /*= CHSTYLE_2D_LINE*/,
170 sal_uInt16 nId );
171 SvxChartStyleItem(SvStream& rIn, sal_uInt16 nId );
173 virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const SAL_OVERRIDE;
174 virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nVer) const SAL_OVERRIDE;
176 sal_uInt16 GetValueCount() const SAL_OVERRIDE { return CHSTYLE_COUNT; }
177 SvxChartStyle GetValue() const
178 { return (SvxChartStyle)SfxEnumItem::GetValue(); }
182 class SVX_DLLPUBLIC SAL_WARN_UNUSED SvxChartRegressItem : public SfxEnumItem
184 public:
185 TYPEINFO_OVERRIDE();
186 SvxChartRegressItem(SvxChartRegress eRegress /*= CHREGRESS_LINEAR*/,
187 sal_uInt16 nId );
188 SvxChartRegressItem(SvStream& rIn, sal_uInt16 nId );
190 virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const SAL_OVERRIDE;
191 virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nVer) const SAL_OVERRIDE;
193 sal_uInt16 GetValueCount() const SAL_OVERRIDE { return CHREGRESS_COUNT; }
194 SvxChartRegress GetValue() const
195 { return (SvxChartRegress)SfxEnumItem::GetValue(); }
196 sal_uInt16 GetVersion (sal_uInt16 nFileFormatVersion) const SAL_OVERRIDE;
199 class SVX_DLLPUBLIC SAL_WARN_UNUSED SvxChartDataDescrItem : public SfxEnumItem
201 public:
202 TYPEINFO_OVERRIDE();
203 SvxChartDataDescrItem(SvStream& rIn,
204 sal_uInt16 nId );
206 virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const SAL_OVERRIDE;
207 virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nVer) const SAL_OVERRIDE;
209 sal_uInt16 GetValueCount() const SAL_OVERRIDE { return CHDESCR_COUNT; }
210 SvxChartDataDescr GetValue() const
211 { return (SvxChartDataDescr)SfxEnumItem::GetValue(); }
214 class SVX_DLLPUBLIC SAL_WARN_UNUSED SvxChartTextOrderItem : public SfxEnumItem
216 public:
217 TYPEINFO_OVERRIDE();
218 SvxChartTextOrderItem(SvxChartTextOrder eOrder /*= CHTXTORDER_SIDEBYSIDE*/,
219 sal_uInt16 nId );
220 SvxChartTextOrderItem(SvStream& rIn,
221 sal_uInt16 nId );
223 virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const SAL_OVERRIDE;
224 virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nVer) const SAL_OVERRIDE;
226 virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const SAL_OVERRIDE;
227 virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) SAL_OVERRIDE;
229 sal_uInt16 GetValueCount() const SAL_OVERRIDE { return CHTXTORDER_COUNT; }
230 SvxChartTextOrder GetValue() const
231 { return (SvxChartTextOrder)SfxEnumItem::GetValue(); }
234 class SVX_DLLPUBLIC SAL_WARN_UNUSED SvxChartTextOrientItem : public SfxEnumItem
236 public:
237 TYPEINFO_OVERRIDE();
238 SvxChartTextOrientItem(SvStream& rIn,
239 sal_uInt16 nId );
241 virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const SAL_OVERRIDE;
242 virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nVer) const SAL_OVERRIDE;
244 sal_uInt16 GetValueCount() const SAL_OVERRIDE { return CHTXTORDER_COUNT; }
245 SvxChartTextOrient GetValue() const
246 { return (SvxChartTextOrient)SfxEnumItem::GetValue(); }
249 class SVX_DLLPUBLIC SAL_WARN_UNUSED SvxChartKindErrorItem : public SfxEnumItem
251 public:
252 TYPEINFO_OVERRIDE();
253 SvxChartKindErrorItem(SvxChartKindError /*eOrient = CHERROR_NONE*/,
254 sal_uInt16 nId );
255 SvxChartKindErrorItem(SvStream& rIn,
256 sal_uInt16 nId );
258 virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const SAL_OVERRIDE;
259 virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nVer) const SAL_OVERRIDE;
261 sal_uInt16 GetValueCount() const SAL_OVERRIDE { return CHERROR_COUNT; }
262 SvxChartKindError GetValue() const
263 { return (SvxChartKindError)SfxEnumItem::GetValue(); }
265 sal_uInt16 GetVersion (sal_uInt16 nFileFormatVersion) const SAL_OVERRIDE;
268 class SVX_DLLPUBLIC SAL_WARN_UNUSED SvxChartIndicateItem : public SfxEnumItem
270 public:
271 TYPEINFO_OVERRIDE();
272 SvxChartIndicateItem(SvxChartIndicate eOrient /*= CHINDICATE_NONE*/,
273 sal_uInt16 nId );
274 SvxChartIndicateItem(SvStream& rIn,
275 sal_uInt16 nId );
277 virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const SAL_OVERRIDE;
278 virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nVer) const SAL_OVERRIDE;
280 sal_uInt16 GetValueCount() const SAL_OVERRIDE { return CHINDICATE_COUNT; }
281 SvxChartIndicate GetValue() const
282 { return (SvxChartIndicate)SfxEnumItem::GetValue(); }
284 sal_uInt16 GetVersion (sal_uInt16 nFileFormatVersion) const SAL_OVERRIDE;
287 class SVX_DLLPUBLIC SAL_WARN_UNUSED SvxDoubleItem : public SfxPoolItem
289 double fVal;
291 public:
292 TYPEINFO_OVERRIDE();
293 SvxDoubleItem(double fValue /*= 0.0*/, sal_uInt16 nId );
294 SvxDoubleItem(const SvxDoubleItem& rItem);
296 virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const SAL_OVERRIDE;
297 virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) SAL_OVERRIDE;
299 OUString GetValueText() const;
300 virtual bool GetPresentation(SfxItemPresentation ePres,
301 SfxMapUnit eCoreMetric,
302 SfxMapUnit ePresMetric,
303 OUString &rText, const IntlWrapper * = 0) const SAL_OVERRIDE;
305 virtual bool operator == (const SfxPoolItem&) const SAL_OVERRIDE;
306 virtual SfxPoolItem* Clone(SfxItemPool *pPool = NULL) const SAL_OVERRIDE;
307 virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nVersion) const SAL_OVERRIDE;
308 virtual SvStream& Store(SvStream& rOut, sal_uInt16 nItemVersion ) const SAL_OVERRIDE;
310 double GetValue() const { return fVal; }
311 void SetValue(double fNewVal) { fVal = fNewVal; }
314 #endif // INCLUDED_SVX_CHRTITEM_HXX
316 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */