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>
28 CHSTYLE_2D_STACKEDLINE
,
29 CHSTYLE_2D_PERCENTLINE
,
31 CHSTYLE_2D_STACKEDCOLUMN
,
32 CHSTYLE_2D_PERCENTCOLUMN
,
34 CHSTYLE_2D_STACKEDBAR
,
35 CHSTYLE_2D_PERCENTBAR
,
37 CHSTYLE_2D_STACKEDAREA
,
38 CHSTYLE_2D_PERCENTAREA
,
42 CHSTYLE_3D_FLATCOLUMN
,
43 CHSTYLE_3D_STACKEDFLATCOLUMN
,
44 CHSTYLE_3D_PERCENTFLATCOLUMN
,
46 CHSTYLE_3D_STACKEDAREA
,
47 CHSTYLE_3D_PERCENTAREA
,
52 CHSTYLE_2D_LINESYMBOLS
,
53 CHSTYLE_2D_STACKEDLINESYM
,
54 CHSTYLE_2D_PERCENTLINESYM
,
56 CHSTYLE_3D_XYZSYMBOLS
,
61 CHSTYLE_3D_STACKEDFLATBAR
,
62 CHSTYLE_3D_PERCENTFLATBAR
,
63 CHSTYLE_2D_PIE_SEGOF1
,
64 CHSTYLE_2D_PIE_SEGOFALL
,
66 CHSTYLE_2D_NET_SYMBOLS
,
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
,
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
,
80 CHSTYLE_2D_LINE_COLUMN
,
81 CHSTYLE_2D_LINE_STACKEDCOLUMN
,
89 #define CHSTYLE_COUNT (CHSTYLE_ADDIN + 1)
91 enum SvxChartDataDescr
97 CHDESCR_TEXTANDPERCENT
,
98 CHDESCR_NUMFORMAT_PERCENT
,
99 CHDESCR_NUMFORMAT_VALUE
,
103 #define CHDESCR_COUNT (CHDESCR_TEXTANDVALUE + 1)
105 enum SvxChartTextOrder
107 CHTXTORDER_SIDEBYSIDE
,
113 #define CHTXTORDER_COUNT (CHTXTORDER_AUTO + 1)
115 enum SvxChartTextOrient
117 CHTXTORIENT_AUTOMATIC
,
118 CHTXTORIENT_STANDARD
,
119 CHTXTORIENT_BOTTOMTOP
,
121 CHTXTORIENT_TOPBOTTOM
124 #define CHTXTORIENT_COUNT (CHTXTORIENT_TOPBOTTOM + 1)
126 enum SvxChartKindError
138 #define CHERROR_COUNT (CHERROR_RANGE + 1)
140 enum SvxChartIndicate
148 #define CHINDICATE_COUNT (CHINDICATE_DOWN + 1)
157 CHREGRESS_POLYNOMIAL
,
158 CHREGRESS_MOVING_AVERAGE
,
159 CHREGRESS_MEAN_VALUE
,
163 #define CHREGRESS_COUNT (CHREGRESS_UNKNOWN + 1)
165 class SVX_DLLPUBLIC SAL_WARN_UNUSED 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 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
186 SvxChartRegressItem(SvxChartRegress eRegress
/*= CHREGRESS_LINEAR*/,
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
203 SvxChartDataDescrItem(SvStream
& rIn
,
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
218 SvxChartTextOrderItem(SvxChartTextOrder eOrder
/*= CHTXTORDER_SIDEBYSIDE*/,
220 SvxChartTextOrderItem(SvStream
& rIn
,
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
238 SvxChartTextOrientItem(SvStream
& rIn
,
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
253 SvxChartKindErrorItem(SvxChartKindError
/*eOrient = CHERROR_NONE*/,
255 SvxChartKindErrorItem(SvStream
& rIn
,
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
272 SvxChartIndicateItem(SvxChartIndicate eOrient
/*= CHINDICATE_NONE*/,
274 SvxChartIndicateItem(SvStream
& rIn
,
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
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: */