1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: chrtitem.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _SVX_CHRTITEM_HXX
31 #define _SVX_CHRTITEM_HXX
33 // include ---------------------------------------------------------------
35 #include <svtools/eitem.hxx>
36 #include "svx/svxdllapi.h"
38 //------------------------------------------------------------------------
43 CHSTYLE_2D_STACKEDLINE
,
44 CHSTYLE_2D_PERCENTLINE
,
46 CHSTYLE_2D_STACKEDCOLUMN
,
47 CHSTYLE_2D_PERCENTCOLUMN
,
49 CHSTYLE_2D_STACKEDBAR
,
50 CHSTYLE_2D_PERCENTBAR
,
52 CHSTYLE_2D_STACKEDAREA
,
53 CHSTYLE_2D_PERCENTAREA
,
57 CHSTYLE_3D_FLATCOLUMN
,
58 CHSTYLE_3D_STACKEDFLATCOLUMN
,
59 CHSTYLE_3D_PERCENTFLATCOLUMN
,
61 CHSTYLE_3D_STACKEDAREA
,
62 CHSTYLE_3D_PERCENTAREA
,
67 CHSTYLE_2D_LINESYMBOLS
,
68 CHSTYLE_2D_STACKEDLINESYM
,
69 CHSTYLE_2D_PERCENTLINESYM
,
71 CHSTYLE_3D_XYZSYMBOLS
,
76 CHSTYLE_3D_STACKEDFLATBAR
,
77 CHSTYLE_3D_PERCENTFLATBAR
,
78 CHSTYLE_2D_PIE_SEGOF1
,
79 CHSTYLE_2D_PIE_SEGOFALL
,
81 CHSTYLE_2D_NET_SYMBOLS
,
83 CHSTYLE_2D_NET_SYMBOLS_STACK
,
84 CHSTYLE_2D_NET_PERCENT
,
85 CHSTYLE_2D_NET_SYMBOLS_PERCENT
,
86 CHSTYLE_2D_CUBIC_SPLINE
,
87 CHSTYLE_2D_CUBIC_SPLINE_SYMBOL
,
89 CHSTYLE_2D_B_SPLINE_SYMBOL
,
90 CHSTYLE_2D_CUBIC_SPLINE_XY
,
91 CHSTYLE_2D_CUBIC_SPLINE_SYMBOL_XY
,
92 CHSTYLE_2D_B_SPLINE_XY
,
93 CHSTYLE_2D_B_SPLINE_SYMBOL_XY
,
95 CHSTYLE_2D_LINE_COLUMN
,
96 CHSTYLE_2D_LINE_STACKEDCOLUMN
,
104 #define CHSTYLE_COUNT (CHSTYLE_ADDIN + 1)
106 enum SvxChartDataDescr
112 CHDESCR_TEXTANDPERCENT
,
113 CHDESCR_NUMFORMAT_PERCENT
,
114 CHDESCR_NUMFORMAT_VALUE
,
118 #define CHDESCR_COUNT (CHDESCR_TEXTANDVALUE + 1)
120 enum SvxChartLegendPos
133 #define CHLEGEND_COUNT (CHLEGEND_BOTTOM + 1)
135 enum SvxChartTextOrder
137 CHTXTORDER_SIDEBYSIDE
,
143 #define CHTXTORDER_COUNT (CHTXTORDER_AUTO + 1)
145 enum SvxChartTextOrient
147 CHTXTORIENT_AUTOMATIC
,
148 CHTXTORIENT_STANDARD
,
149 CHTXTORIENT_BOTTOMTOP
,
151 CHTXTORIENT_TOPBOTTOM
154 #define CHTXTORIENT_COUNT (CHTXTORIENT_TOPBOTTOM + 1)
156 enum SvxChartKindError
168 #define CHERROR_COUNT (CHERROR_RANGE + 1)
170 enum SvxChartIndicate
178 #define CHINDICATE_COUNT (CHINDICATE_DOWN + 1)
189 #define CHREGRESS_COUNT (CHREGRESS_POWER + 1)
191 //------------------------------------------------------------------
193 class SVX_DLLPUBLIC SvxChartStyleItem
: public SfxEnumItem
197 SvxChartStyleItem(SvxChartStyle eStyle
/*= CHSTYLE_2D_LINE*/,
199 SvxChartStyleItem(SvStream
& rIn
, USHORT nId
);
201 virtual SfxPoolItem
* Clone(SfxItemPool
* pPool
= 0) const;
202 virtual SfxPoolItem
* Create(SvStream
& rIn
, USHORT nVer
) const;
204 USHORT
GetValueCount() const { return CHSTYLE_COUNT
; }
205 SvxChartStyle
GetValue() const
206 { return (SvxChartStyle
)SfxEnumItem::GetValue(); }
209 //------------------------------------------------------------------
211 class SVX_DLLPUBLIC SvxChartRegressItem
: public SfxEnumItem
215 SvxChartRegressItem(SvxChartRegress eRegress
/*= CHREGRESS_LINEAR*/,
217 SvxChartRegressItem(SvStream
& rIn
, USHORT nId
);
219 virtual SfxPoolItem
* Clone(SfxItemPool
* pPool
= 0) const;
220 virtual SfxPoolItem
* Create(SvStream
& rIn
, USHORT nVer
) const;
222 USHORT
GetValueCount() const { return CHREGRESS_COUNT
; }
223 SvxChartRegress
GetValue() const
224 { return (SvxChartRegress
)SfxEnumItem::GetValue(); }
225 USHORT
GetVersion (USHORT nFileFormatVersion
) const;
228 //------------------------------------------------------------------
230 class SVX_DLLPUBLIC SvxChartDataDescrItem
: public SfxEnumItem
234 SvxChartDataDescrItem(SvxChartDataDescr eDataDescr
/*= CHDESCR_NONE*/,
236 SvxChartDataDescrItem(SvStream
& rIn
,
239 virtual SfxPoolItem
* Clone(SfxItemPool
* pPool
= 0) const;
240 virtual SfxPoolItem
* Create(SvStream
& rIn
, USHORT nVer
) const;
242 USHORT
GetValueCount() const { return CHDESCR_COUNT
; }
243 SvxChartDataDescr
GetValue() const
244 { return (SvxChartDataDescr
)SfxEnumItem::GetValue(); }
247 //------------------------------------------------------------------
249 class SVX_DLLPUBLIC SvxChartLegendPosItem
: public SfxEnumItem
253 SvxChartLegendPosItem(SvxChartLegendPos eLegendPos
/*= CHLEGEND_NONE*/,
255 SvxChartLegendPosItem(SvStream
& rIn
,
258 virtual SfxPoolItem
* Clone(SfxItemPool
* pPool
= 0) const;
259 virtual SfxPoolItem
* Create(SvStream
& rIn
, USHORT nVer
) const;
261 USHORT
GetValueCount() const { return CHLEGEND_COUNT
; }
262 SvxChartLegendPos
GetValue() const
263 { return (SvxChartLegendPos
)SfxEnumItem::GetValue(); }
266 //------------------------------------------------------------------
268 class SVX_DLLPUBLIC SvxChartTextOrderItem
: public SfxEnumItem
272 SvxChartTextOrderItem(SvxChartTextOrder eOrder
/*= CHTXTORDER_SIDEBYSIDE*/,
274 SvxChartTextOrderItem(SvStream
& rIn
,
277 virtual SfxPoolItem
* Clone(SfxItemPool
* pPool
= 0) const;
278 virtual SfxPoolItem
* Create(SvStream
& rIn
, USHORT nVer
) const;
280 virtual sal_Bool
QueryValue( com::sun::star::uno::Any
& rVal
, BYTE nMemberId
= 0 ) const;
281 virtual sal_Bool
PutValue( const com::sun::star::uno::Any
& rVal
, BYTE nMemberId
= 0 );
283 USHORT
GetValueCount() const { return CHTXTORDER_COUNT
; }
284 SvxChartTextOrder
GetValue() const
285 { return (SvxChartTextOrder
)SfxEnumItem::GetValue(); }
288 //------------------------------------------------------------------
290 class SVX_DLLPUBLIC SvxChartTextOrientItem
: public SfxEnumItem
294 SvxChartTextOrientItem(SvxChartTextOrient
/*eOrient = CHTXTORIENT_STANDARD*/,
296 SvxChartTextOrientItem(SvStream
& rIn
,
299 virtual SfxPoolItem
* Clone(SfxItemPool
* pPool
= 0) const;
300 virtual SfxPoolItem
* Create(SvStream
& rIn
, USHORT nVer
) const;
302 USHORT
GetValueCount() const { return CHTXTORDER_COUNT
; }
303 SvxChartTextOrient
GetValue() const
304 { return (SvxChartTextOrient
)SfxEnumItem::GetValue(); }
307 //------------------------------------------------------------------
309 class SVX_DLLPUBLIC SvxChartKindErrorItem
: public SfxEnumItem
313 SvxChartKindErrorItem(SvxChartKindError
/*eOrient = CHERROR_NONE*/,
315 SvxChartKindErrorItem(SvStream
& rIn
,
318 virtual SfxPoolItem
* Clone(SfxItemPool
* pPool
= 0) const;
319 virtual SfxPoolItem
* Create(SvStream
& rIn
, USHORT nVer
) const;
321 USHORT
GetValueCount() const { return CHERROR_COUNT
; }
322 SvxChartKindError
GetValue() const
323 { return (SvxChartKindError
)SfxEnumItem::GetValue(); }
325 USHORT
GetVersion (USHORT nFileFormatVersion
) const;
328 //------------------------------------------------------------------
330 class SVX_DLLPUBLIC SvxChartIndicateItem
: public SfxEnumItem
334 SvxChartIndicateItem(SvxChartIndicate eOrient
/*= CHINDICATE_NONE*/,
336 SvxChartIndicateItem(SvStream
& rIn
,
339 virtual SfxPoolItem
* Clone(SfxItemPool
* pPool
= 0) const;
340 virtual SfxPoolItem
* Create(SvStream
& rIn
, USHORT nVer
) const;
342 USHORT
GetValueCount() const { return CHINDICATE_COUNT
; }
343 SvxChartIndicate
GetValue() const
344 { return (SvxChartIndicate
)SfxEnumItem::GetValue(); }
346 USHORT
GetVersion (USHORT nFileFormatVersion
) const;
349 //------------------------------------------------------------------
351 class SVX_DLLPUBLIC SvxDoubleItem
: public SfxPoolItem
357 SvxDoubleItem(double fValue
/*= 0.0*/, USHORT nId
);
358 SvxDoubleItem(SvStream
& rIn
, USHORT nId
);
359 SvxDoubleItem(const SvxDoubleItem
& rItem
);
362 virtual sal_Bool
QueryValue( com::sun::star::uno::Any
& rVal
, BYTE nMemberId
= 0 ) const;
363 virtual sal_Bool
PutValue( const com::sun::star::uno::Any
& rVal
, BYTE nMemberId
= 0 );
367 virtual String
GetValueText() const;
368 virtual SfxItemPresentation
GetPresentation(SfxItemPresentation ePres
,
369 SfxMapUnit eCoreMetric
,
370 SfxMapUnit ePresMetric
,
371 String
&rText
, const IntlWrapper
* = 0) const;
373 virtual int operator == (const SfxPoolItem
&) const;
374 virtual SfxPoolItem
* Clone(SfxItemPool
*pPool
= NULL
) const;
375 virtual SfxPoolItem
* Create(SvStream
& rIn
, USHORT nVersion
) const;
376 virtual SvStream
& Store(SvStream
& rOut
, USHORT nItemVersion
) const;
378 virtual double GetMin() const;
379 virtual double GetMax() const;
381 virtual SfxFieldUnit
GetUnit() const;
383 double GetValue() const { return fVal
; }
384 void SetValue(double fNewVal
) { fVal
= fNewVal
; }
387 #endif // _SVX_CHRTITEM_HXX