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 ---------------------------------------------------------------
37 //------------------------------------------------------------------------
42 CHSTYLE_2D_STACKEDLINE
,
43 CHSTYLE_2D_PERCENTLINE
,
45 CHSTYLE_2D_STACKEDCOLUMN
,
46 CHSTYLE_2D_PERCENTCOLUMN
,
48 CHSTYLE_2D_STACKEDBAR
,
49 CHSTYLE_2D_PERCENTBAR
,
51 CHSTYLE_2D_STACKEDAREA
,
52 CHSTYLE_2D_PERCENTAREA
,
56 CHSTYLE_3D_FLATCOLUMN
,
57 CHSTYLE_3D_STACKEDFLATCOLUMN
,
58 CHSTYLE_3D_PERCENTFLATCOLUMN
,
60 CHSTYLE_3D_STACKEDAREA
,
61 CHSTYLE_3D_PERCENTAREA
,
66 CHSTYLE_2D_LINESYMBOLS
,
67 CHSTYLE_2D_STACKEDLINESYM
,
68 CHSTYLE_2D_PERCENTLINESYM
,
70 CHSTYLE_3D_XYZSYMBOLS
,
75 CHSTYLE_3D_STACKEDFLATBAR
,
76 CHSTYLE_3D_PERCENTFLATBAR
,
77 CHSTYLE_2D_PIE_SEGOF1
,
78 CHSTYLE_2D_PIE_SEGOFALL
,
80 CHSTYLE_2D_NET_SYMBOLS
,
82 CHSTYLE_2D_NET_SYMBOLS_STACK
,
83 CHSTYLE_2D_NET_PERCENT
,
84 CHSTYLE_2D_NET_SYMBOLS_PERCENT
,
85 CHSTYLE_2D_CUBIC_SPLINE
,
86 CHSTYLE_2D_CUBIC_SPLINE_SYMBOL
,
88 CHSTYLE_2D_B_SPLINE_SYMBOL
,
89 CHSTYLE_2D_CUBIC_SPLINE_XY
,
90 CHSTYLE_2D_CUBIC_SPLINE_SYMBOL_XY
,
91 CHSTYLE_2D_B_SPLINE_XY
,
92 CHSTYLE_2D_B_SPLINE_SYMBOL_XY
,
94 CHSTYLE_2D_LINE_COLUMN
,
95 CHSTYLE_2D_LINE_STACKEDCOLUMN
,
103 #define CHSTYLE_COUNT (CHSTYLE_ADDIN + 1)
105 enum SvxChartDataDescr
111 CHDESCR_TEXTANDPERCENT
,
112 CHDESCR_NUMFORMAT_PERCENT
,
113 CHDESCR_NUMFORMAT_VALUE
,
117 #define CHDESCR_COUNT (CHDESCR_TEXTANDVALUE + 1)
119 enum SvxChartLegendPos
132 #define CHLEGEND_COUNT (CHLEGEND_BOTTOM + 1)
134 enum SvxChartTextOrder
136 CHTXTORDER_SIDEBYSIDE
,
142 #define CHTXTORDER_COUNT (CHTXTORDER_AUTO + 1)
144 enum SvxChartTextOrient
146 CHTXTORIENT_AUTOMATIC
,
147 CHTXTORIENT_STANDARD
,
148 CHTXTORIENT_BOTTOMTOP
,
150 CHTXTORIENT_TOPBOTTOM
153 #define CHTXTORIENT_COUNT (CHTXTORIENT_TOPBOTTOM + 1)
155 enum SvxChartKindError
165 #define CHERROR_COUNT (CHERROR_CONST + 1)
167 enum SvxChartIndicate
175 #define CHINDICATE_COUNT (CHINDICATE_DOWN + 1)
186 #define CHREGRESS_COUNT (CHREGRESS_POWER + 1)
188 //------------------------------------------------------------------
190 #ifdef ITEMID_CHARTSTYLE
192 class SvxChartStyleItem
: public SfxEnumItem
196 SvxChartStyleItem(SvxChartStyle eStyle
= CHSTYLE_2D_LINE
,
197 USHORT nId
= ITEMID_CHARTSTYLE
);
199 virtual SfxPoolItem
* Clone(SfxItemPool
* pPool
= 0) const;
201 USHORT
GetValueCount() const { return CHSTYLE_COUNT
; }
202 SvxChartStyle
GetValue() const
203 { return (SvxChartStyle
)SfxEnumItem::GetValue(); }
208 //------------------------------------------------------------------
210 #ifdef ITEMID_CHARTREGRESS
215 //------------------------------------------------------------------
217 #ifdef ITEMID_CHARTDATADESCR
219 class SvxChartDataDescrItem
: public SfxEnumItem
223 SvxChartDataDescrItem(SvxChartDataDescr eDataDescr
= CHDESCR_NONE
,
224 USHORT nId
= ITEMID_CHARTDATADESCR
);
225 SvxChartDataDescrItem(SvStream
& rIn
,
226 USHORT nId
= ITEMID_CHARTDATADESCR
);
228 virtual SfxPoolItem
* Clone(SfxItemPool
* pPool
= 0) const;
229 virtual SfxPoolItem
* Create(SvStream
& rIn
, USHORT nVer
) const;
231 USHORT
GetValueCount() const { return CHDESCR_COUNT
; }
232 SvxChartDataDescr
GetValue() const
233 { return (SvxChartDataDescr
)SfxEnumItem::GetValue(); }
238 //------------------------------------------------------------------
240 #ifdef ITEMID_CHARTLEGENDPOS
242 class SvxChartLegendPosItem
: public SfxEnumItem
246 SvxChartLegendPosItem(SvxChartLegendPos eLegendPos
= CHLEGEND_NONE
,
247 USHORT nId
= ITEMID_CHARTLEGENDPOS
);
248 SvxChartLegendPosItem(SvStream
& rIn
,
249 USHORT nId
= ITEMID_CHARTLEGENDPOS
);
251 virtual SfxPoolItem
* Clone(SfxItemPool
* pPool
= 0) const;
252 virtual SfxPoolItem
* Create(SvStream
& rIn
, USHORT nVer
) const;
254 USHORT
GetValueCount() const { return CHLEGEND_COUNT
; }
255 SvxChartLegendPos
GetValue() const
256 { return (SvxChartLegendPos
)SfxEnumItem::GetValue(); }
261 //------------------------------------------------------------------
263 #ifdef ITEMID_CHARTTEXTORDER
265 class SvxChartTextOrderItem
: public SfxEnumItem
269 SvxChartTextOrderItem(SvxChartTextOrder eOrder
= CHTXTORDER_SIDEBYSIDE
,
270 USHORT nId
= ITEMID_CHARTTEXTORDER
);
271 SvxChartTextOrderItem(SvStream
& rIn
,
272 USHORT nId
= ITEMID_CHARTTEXTORDER
);
274 virtual SfxPoolItem
* Clone(SfxItemPool
* pPool
= 0) const;
275 virtual SfxPoolItem
* Create(SvStream
& rIn
, USHORT nVer
) const;
277 USHORT
GetValueCount() const { return CHTXTORDER_COUNT
; }
278 SvxChartTextOrder
GetValue() const
279 { return (SvxChartTextOrder
)SfxEnumItem::GetValue(); }
284 //------------------------------------------------------------------
286 #ifdef ITEMID_CHARTTEXTORIENT
288 class SvxChartTextOrientItem
: public SfxEnumItem
292 SvxChartTextOrientItem(SvxChartTextOrient eOrient
= CHTXTORIENT_STANDARD
,
293 USHORT nId
= ITEMID_CHARTTEXTORIENT
);
294 SvxChartTextOrientItem(SvStream
& rIn
,
295 USHORT nId
= ITEMID_CHARTTEXTORIENT
);
297 virtual SfxPoolItem
* Clone(SfxItemPool
* pPool
= 0) const;
298 virtual SfxPoolItem
* Create(SvStream
& rIn
, USHORT nVer
) const;
300 USHORT
GetValueCount() const { return CHTXTORDER_COUNT
; }
301 SvxChartTextOrient
GetValue() const
302 { return (SvxChartTextOrient
)SfxEnumItem::GetValue(); }
307 //------------------------------------------------------------------
309 #ifdef ITEMID_CHARTKINDERROR
314 //------------------------------------------------------------------
316 #ifdef ITEMID_CHARTINDICATE
321 //------------------------------------------------------------------
325 class SvxDoubleItem
: public SfxPoolItem
331 SvxDoubleItem(double fValue
= 0.0, USHORT nId
= ITEMID_DOUBLE
);
332 SvxDoubleItem(const SvxDoubleItem
& rItem
);
334 virtual sal_Bool
QueryValue( ::com::sun::star::uno::Any
& rVal
, BYTE nMemberId
= 0 ) const;
335 virtual sal_Bool
PutValue( const ::com::sun::star::uno::Any
& rVal
, BYTE nMemberId
= 0 );
338 virtual int operator == (const SfxPoolItem
&) const;
339 virtual SfxPoolItem
* Clone(SfxItemPool
*pPool
= NULL
) const;
340 virtual SfxPoolItem
* Create(SvStream
& rIn
, USHORT nVersion
) const;
341 virtual SvStream
& Store(SvStream
& rOut
, USHORT nItemVersion
) const;
345 double GetValue() const { return fVal
; }
346 void SetValue(double fNewVal
) { fVal
= fNewVal
; }
351 }//end of namespace binfilter
352 #endif // _SVX_CHRTITEM_HXX