1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 _SVX_CHRTITEM_HXX
20 #define _SVX_CHRTITEM_HXX
22 #include <svl/eitem.hxx>
23 #include "svx/svxdllapi.h"
25 //------------------------------------------------------------------------
30 CHSTYLE_2D_STACKEDLINE
,
31 CHSTYLE_2D_PERCENTLINE
,
33 CHSTYLE_2D_STACKEDCOLUMN
,
34 CHSTYLE_2D_PERCENTCOLUMN
,
36 CHSTYLE_2D_STACKEDBAR
,
37 CHSTYLE_2D_PERCENTBAR
,
39 CHSTYLE_2D_STACKEDAREA
,
40 CHSTYLE_2D_PERCENTAREA
,
44 CHSTYLE_3D_FLATCOLUMN
,
45 CHSTYLE_3D_STACKEDFLATCOLUMN
,
46 CHSTYLE_3D_PERCENTFLATCOLUMN
,
48 CHSTYLE_3D_STACKEDAREA
,
49 CHSTYLE_3D_PERCENTAREA
,
54 CHSTYLE_2D_LINESYMBOLS
,
55 CHSTYLE_2D_STACKEDLINESYM
,
56 CHSTYLE_2D_PERCENTLINESYM
,
58 CHSTYLE_3D_XYZSYMBOLS
,
63 CHSTYLE_3D_STACKEDFLATBAR
,
64 CHSTYLE_3D_PERCENTFLATBAR
,
65 CHSTYLE_2D_PIE_SEGOF1
,
66 CHSTYLE_2D_PIE_SEGOFALL
,
68 CHSTYLE_2D_NET_SYMBOLS
,
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
,
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
,
82 CHSTYLE_2D_LINE_COLUMN
,
83 CHSTYLE_2D_LINE_STACKEDCOLUMN
,
91 #define CHSTYLE_COUNT (CHSTYLE_ADDIN + 1)
93 enum SvxChartDataDescr
99 CHDESCR_TEXTANDPERCENT
,
100 CHDESCR_NUMFORMAT_PERCENT
,
101 CHDESCR_NUMFORMAT_VALUE
,
105 #define CHDESCR_COUNT (CHDESCR_TEXTANDVALUE + 1)
107 enum SvxChartTextOrder
109 CHTXTORDER_SIDEBYSIDE
,
115 #define CHTXTORDER_COUNT (CHTXTORDER_AUTO + 1)
117 enum SvxChartTextOrient
119 CHTXTORIENT_AUTOMATIC
,
120 CHTXTORIENT_STANDARD
,
121 CHTXTORIENT_BOTTOMTOP
,
123 CHTXTORIENT_TOPBOTTOM
126 #define CHTXTORIENT_COUNT (CHTXTORIENT_TOPBOTTOM + 1)
128 enum SvxChartKindError
140 #define CHERROR_COUNT (CHERROR_RANGE + 1)
142 enum SvxChartIndicate
150 #define CHINDICATE_COUNT (CHINDICATE_DOWN + 1)
161 #define CHREGRESS_COUNT (CHREGRESS_POWER + 1)
163 //------------------------------------------------------------------
165 class SVX_DLLPUBLIC SvxChartStyleItem
: public SfxEnumItem
169 SvxChartStyleItem(SvxChartStyle eStyle
/*= CHSTYLE_2D_LINE*/,
171 SvxChartStyleItem(SvStream
& rIn
, sal_uInt16 nId
);
173 virtual SfxPoolItem
* Clone(SfxItemPool
* pPool
= 0) const;
174 virtual SfxPoolItem
* Create(SvStream
& rIn
, sal_uInt16 nVer
) const;
176 sal_uInt16
GetValueCount() const { return CHSTYLE_COUNT
; }
177 SvxChartStyle
GetValue() const
178 { return (SvxChartStyle
)SfxEnumItem::GetValue(); }
181 //------------------------------------------------------------------
183 class SVX_DLLPUBLIC SvxChartRegressItem
: public SfxEnumItem
187 SvxChartRegressItem(SvxChartRegress eRegress
/*= CHREGRESS_LINEAR*/,
189 SvxChartRegressItem(SvStream
& rIn
, sal_uInt16 nId
);
191 virtual SfxPoolItem
* Clone(SfxItemPool
* pPool
= 0) const;
192 virtual SfxPoolItem
* Create(SvStream
& rIn
, sal_uInt16 nVer
) const;
194 sal_uInt16
GetValueCount() const { return CHREGRESS_COUNT
; }
195 SvxChartRegress
GetValue() const
196 { return (SvxChartRegress
)SfxEnumItem::GetValue(); }
197 sal_uInt16
GetVersion (sal_uInt16 nFileFormatVersion
) const;
200 //------------------------------------------------------------------
202 class SVX_DLLPUBLIC SvxChartDataDescrItem
: public SfxEnumItem
206 SvxChartDataDescrItem(SvStream
& rIn
,
209 virtual SfxPoolItem
* Clone(SfxItemPool
* pPool
= 0) const;
210 virtual SfxPoolItem
* Create(SvStream
& rIn
, sal_uInt16 nVer
) const;
212 sal_uInt16
GetValueCount() const { return CHDESCR_COUNT
; }
213 SvxChartDataDescr
GetValue() const
214 { return (SvxChartDataDescr
)SfxEnumItem::GetValue(); }
217 //------------------------------------------------------------------
219 class SVX_DLLPUBLIC SvxChartTextOrderItem
: public SfxEnumItem
223 SvxChartTextOrderItem(SvxChartTextOrder eOrder
/*= CHTXTORDER_SIDEBYSIDE*/,
225 SvxChartTextOrderItem(SvStream
& rIn
,
228 virtual SfxPoolItem
* Clone(SfxItemPool
* pPool
= 0) const;
229 virtual SfxPoolItem
* Create(SvStream
& rIn
, sal_uInt16 nVer
) const;
231 virtual bool QueryValue( com::sun::star::uno::Any
& rVal
, sal_uInt8 nMemberId
= 0 ) const;
232 virtual bool PutValue( const com::sun::star::uno::Any
& rVal
, sal_uInt8 nMemberId
= 0 );
234 sal_uInt16
GetValueCount() const { return CHTXTORDER_COUNT
; }
235 SvxChartTextOrder
GetValue() const
236 { return (SvxChartTextOrder
)SfxEnumItem::GetValue(); }
239 //------------------------------------------------------------------
241 class SVX_DLLPUBLIC SvxChartTextOrientItem
: public SfxEnumItem
245 SvxChartTextOrientItem(SvStream
& rIn
,
248 virtual SfxPoolItem
* Clone(SfxItemPool
* pPool
= 0) const;
249 virtual SfxPoolItem
* Create(SvStream
& rIn
, sal_uInt16 nVer
) const;
251 sal_uInt16
GetValueCount() const { return CHTXTORDER_COUNT
; }
252 SvxChartTextOrient
GetValue() const
253 { return (SvxChartTextOrient
)SfxEnumItem::GetValue(); }
256 //------------------------------------------------------------------
258 class SVX_DLLPUBLIC SvxChartKindErrorItem
: public SfxEnumItem
262 SvxChartKindErrorItem(SvxChartKindError
/*eOrient = CHERROR_NONE*/,
264 SvxChartKindErrorItem(SvStream
& rIn
,
267 virtual SfxPoolItem
* Clone(SfxItemPool
* pPool
= 0) const;
268 virtual SfxPoolItem
* Create(SvStream
& rIn
, sal_uInt16 nVer
) const;
270 sal_uInt16
GetValueCount() const { return CHERROR_COUNT
; }
271 SvxChartKindError
GetValue() const
272 { return (SvxChartKindError
)SfxEnumItem::GetValue(); }
274 sal_uInt16
GetVersion (sal_uInt16 nFileFormatVersion
) const;
277 //------------------------------------------------------------------
279 class SVX_DLLPUBLIC SvxChartIndicateItem
: public SfxEnumItem
283 SvxChartIndicateItem(SvxChartIndicate eOrient
/*= CHINDICATE_NONE*/,
285 SvxChartIndicateItem(SvStream
& rIn
,
288 virtual SfxPoolItem
* Clone(SfxItemPool
* pPool
= 0) const;
289 virtual SfxPoolItem
* Create(SvStream
& rIn
, sal_uInt16 nVer
) const;
291 sal_uInt16
GetValueCount() const { return CHINDICATE_COUNT
; }
292 SvxChartIndicate
GetValue() const
293 { return (SvxChartIndicate
)SfxEnumItem::GetValue(); }
295 sal_uInt16
GetVersion (sal_uInt16 nFileFormatVersion
) const;
298 //------------------------------------------------------------------
300 class SVX_DLLPUBLIC SvxDoubleItem
: public SfxPoolItem
306 SvxDoubleItem(double fValue
/*= 0.0*/, sal_uInt16 nId
);
307 SvxDoubleItem(const SvxDoubleItem
& rItem
);
309 virtual bool QueryValue( com::sun::star::uno::Any
& rVal
, sal_uInt8 nMemberId
= 0 ) const;
310 virtual bool PutValue( const com::sun::star::uno::Any
& rVal
, sal_uInt8 nMemberId
= 0 );
312 virtual String
GetValueText() const;
313 virtual SfxItemPresentation
GetPresentation(SfxItemPresentation ePres
,
314 SfxMapUnit eCoreMetric
,
315 SfxMapUnit ePresMetric
,
316 OUString
&rText
, const IntlWrapper
* = 0) const;
318 virtual int operator == (const SfxPoolItem
&) const;
319 virtual SfxPoolItem
* Clone(SfxItemPool
*pPool
= NULL
) const;
320 virtual SfxPoolItem
* Create(SvStream
& rIn
, sal_uInt16 nVersion
) const;
321 virtual SvStream
& Store(SvStream
& rOut
, sal_uInt16 nItemVersion
) const;
323 virtual double GetMin() const;
324 virtual double GetMax() const;
326 virtual SfxFieldUnit
GetUnit() const;
328 double GetValue() const { return fVal
; }
329 void SetValue(double fNewVal
) { fVal
= fNewVal
; }
332 #endif // _SVX_CHRTITEM_HXX
334 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */