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 INCLUDED_SVX_CHRTITEM_HXX
20 #define INCLUDED_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)
159 CHREGRESS_POLYNOMIAL
,
160 CHREGRESS_MOVING_AVERAGE
163 #define CHREGRESS_COUNT (CHREGRESS_MOVING_AVERAGE + 1)
165 //------------------------------------------------------------------
167 class SVX_DLLPUBLIC SvxChartStyleItem
: public SfxEnumItem
171 SvxChartStyleItem(SvxChartStyle eStyle
/*= CHSTYLE_2D_LINE*/,
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
189 SvxChartRegressItem(SvxChartRegress eRegress
/*= CHREGRESS_LINEAR*/,
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
208 SvxChartDataDescrItem(SvStream
& rIn
,
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
225 SvxChartTextOrderItem(SvxChartTextOrder eOrder
/*= CHTXTORDER_SIDEBYSIDE*/,
227 SvxChartTextOrderItem(SvStream
& rIn
,
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
247 SvxChartTextOrientItem(SvStream
& rIn
,
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
264 SvxChartKindErrorItem(SvxChartKindError
/*eOrient = CHERROR_NONE*/,
266 SvxChartKindErrorItem(SvStream
& rIn
,
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
285 SvxChartIndicateItem(SvxChartIndicate eOrient
/*= CHINDICATE_NONE*/,
287 SvxChartIndicateItem(SvStream
& rIn
,
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
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: */