1*f6e50924SAndrew Rist /**************************************************************
2cdf0e10cSrcweir *
3*f6e50924SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
4*f6e50924SAndrew Rist * or more contributor license agreements. See the NOTICE file
5*f6e50924SAndrew Rist * distributed with this work for additional information
6*f6e50924SAndrew Rist * regarding copyright ownership. The ASF licenses this file
7*f6e50924SAndrew Rist * to you under the Apache License, Version 2.0 (the
8*f6e50924SAndrew Rist * "License"); you may not use this file except in compliance
9*f6e50924SAndrew Rist * with the License. You may obtain a copy of the License at
10*f6e50924SAndrew Rist *
11*f6e50924SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0
12*f6e50924SAndrew Rist *
13*f6e50924SAndrew Rist * Unless required by applicable law or agreed to in writing,
14*f6e50924SAndrew Rist * software distributed under the License is distributed on an
15*f6e50924SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*f6e50924SAndrew Rist * KIND, either express or implied. See the License for the
17*f6e50924SAndrew Rist * specific language governing permissions and limitations
18*f6e50924SAndrew Rist * under the License.
19*f6e50924SAndrew Rist *
20*f6e50924SAndrew Rist *************************************************************/
21*f6e50924SAndrew Rist
22*f6e50924SAndrew Rist
23cdf0e10cSrcweir
24cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
25cdf0e10cSrcweir #include "precompiled_svx.hxx"
26cdf0e10cSrcweir
27cdf0e10cSrcweir // include ---------------------------------------------------------------
28cdf0e10cSrcweir #include <tools/stream.hxx>
29cdf0e10cSrcweir #ifndef __SBX_SBXVARIABLE_HXX
30cdf0e10cSrcweir #include <basic/sbxvar.hxx>
31cdf0e10cSrcweir #endif
32cdf0e10cSrcweir #if defined UNX && !defined LINUX
33cdf0e10cSrcweir #include <wchar.h>
34cdf0e10cSrcweir #endif
35cdf0e10cSrcweir #include <rtl/math.hxx>
36cdf0e10cSrcweir #include <unotools/intlwrapper.hxx>
37cdf0e10cSrcweir #include <com/sun/star/chart/ChartAxisArrangeOrderType.hpp>
38cdf0e10cSrcweir
39cdf0e10cSrcweir #include <stdio.h>
40cdf0e10cSrcweir #include <float.h>
41cdf0e10cSrcweir #include <rtl/math.hxx>
42cdf0e10cSrcweir
43cdf0e10cSrcweir #include "svx/chrtitem.hxx"
44cdf0e10cSrcweir
45cdf0e10cSrcweir using namespace ::rtl;
46cdf0e10cSrcweir using namespace ::com::sun::star;
47cdf0e10cSrcweir // -----------------------------------------------------------------------
48cdf0e10cSrcweir
49cdf0e10cSrcweir TYPEINIT1_FACTORY(SvxChartStyleItem, SfxEnumItem, new SvxChartStyleItem(CHSTYLE_2D_LINE, 0));
50cdf0e10cSrcweir TYPEINIT1(SvxChartDataDescrItem, SfxEnumItem);
51cdf0e10cSrcweir TYPEINIT1(SvxChartTextOrderItem, SfxEnumItem);
52cdf0e10cSrcweir TYPEINIT1(SvxChartTextOrientItem, SfxEnumItem);
53cdf0e10cSrcweir TYPEINIT1(SvxChartIndicateItem, SfxEnumItem);
54cdf0e10cSrcweir TYPEINIT1(SvxChartKindErrorItem, SfxEnumItem);
55cdf0e10cSrcweir TYPEINIT1(SvxChartRegressItem, SfxEnumItem);
56cdf0e10cSrcweir TYPEINIT1_FACTORY(SvxDoubleItem, SfxPoolItem, new SvxDoubleItem(0.0, 0));
57cdf0e10cSrcweir
58cdf0e10cSrcweir /*************************************************************************
59cdf0e10cSrcweir |*
60cdf0e10cSrcweir |* SvxChartStyleItem
61cdf0e10cSrcweir |*
62cdf0e10cSrcweir *************************************************************************/
63cdf0e10cSrcweir
SvxChartStyleItem(SvxChartStyle eStyle,sal_uInt16 nId)64cdf0e10cSrcweir SvxChartStyleItem::SvxChartStyleItem(SvxChartStyle eStyle, sal_uInt16 nId) :
65cdf0e10cSrcweir SfxEnumItem(nId, (sal_uInt16)eStyle)
66cdf0e10cSrcweir {
67cdf0e10cSrcweir }
68cdf0e10cSrcweir
69cdf0e10cSrcweir // -----------------------------------------------------------------------
70cdf0e10cSrcweir
SvxChartStyleItem(SvStream & rIn,sal_uInt16 nId)71cdf0e10cSrcweir SvxChartStyleItem::SvxChartStyleItem(SvStream& rIn, sal_uInt16 nId) :
72cdf0e10cSrcweir SfxEnumItem(nId, rIn)
73cdf0e10cSrcweir {
74cdf0e10cSrcweir }
75cdf0e10cSrcweir
76cdf0e10cSrcweir // -----------------------------------------------------------------------
77cdf0e10cSrcweir
Clone(SfxItemPool *) const78cdf0e10cSrcweir SfxPoolItem* SvxChartStyleItem::Clone(SfxItemPool* /*pPool*/) const
79cdf0e10cSrcweir {
80cdf0e10cSrcweir return new SvxChartStyleItem(*this);
81cdf0e10cSrcweir }
82cdf0e10cSrcweir
83cdf0e10cSrcweir // -----------------------------------------------------------------------
84cdf0e10cSrcweir
Create(SvStream & rIn,sal_uInt16) const85cdf0e10cSrcweir SfxPoolItem* SvxChartStyleItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const
86cdf0e10cSrcweir {
87cdf0e10cSrcweir return new SvxChartStyleItem(rIn, Which());
88cdf0e10cSrcweir }
89cdf0e10cSrcweir
90cdf0e10cSrcweir /*************************************************************************
91cdf0e10cSrcweir |*
92cdf0e10cSrcweir |* SvxChartDataDescrItem
93cdf0e10cSrcweir |*
94cdf0e10cSrcweir *************************************************************************/
95cdf0e10cSrcweir
SvxChartDataDescrItem(SvxChartDataDescr eDataDescr,sal_uInt16 nId)96cdf0e10cSrcweir SvxChartDataDescrItem::SvxChartDataDescrItem(SvxChartDataDescr eDataDescr,
97cdf0e10cSrcweir sal_uInt16 nId) :
98cdf0e10cSrcweir SfxEnumItem(nId, (sal_uInt16)eDataDescr)
99cdf0e10cSrcweir {
100cdf0e10cSrcweir }
101cdf0e10cSrcweir
102cdf0e10cSrcweir // -----------------------------------------------------------------------
103cdf0e10cSrcweir
SvxChartDataDescrItem(SvStream & rIn,sal_uInt16 nId)104cdf0e10cSrcweir SvxChartDataDescrItem::SvxChartDataDescrItem(SvStream& rIn, sal_uInt16 nId) :
105cdf0e10cSrcweir SfxEnumItem(nId, rIn)
106cdf0e10cSrcweir {
107cdf0e10cSrcweir }
108cdf0e10cSrcweir
109cdf0e10cSrcweir // -----------------------------------------------------------------------
110cdf0e10cSrcweir
Clone(SfxItemPool *) const111cdf0e10cSrcweir SfxPoolItem* SvxChartDataDescrItem::Clone(SfxItemPool* /*pPool*/) const
112cdf0e10cSrcweir {
113cdf0e10cSrcweir return new SvxChartDataDescrItem(*this);
114cdf0e10cSrcweir }
115cdf0e10cSrcweir
116cdf0e10cSrcweir // -----------------------------------------------------------------------
117cdf0e10cSrcweir
Create(SvStream & rIn,sal_uInt16) const118cdf0e10cSrcweir SfxPoolItem* SvxChartDataDescrItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const
119cdf0e10cSrcweir {
120cdf0e10cSrcweir return new SvxChartDataDescrItem(rIn, Which());
121cdf0e10cSrcweir }
122cdf0e10cSrcweir
123cdf0e10cSrcweir /*************************************************************************
124cdf0e10cSrcweir |*
125cdf0e10cSrcweir |* SvxChartTextOrderItem
126cdf0e10cSrcweir |*
127cdf0e10cSrcweir *************************************************************************/
128cdf0e10cSrcweir
SvxChartTextOrderItem(SvxChartTextOrder eOrder,sal_uInt16 nId)129cdf0e10cSrcweir SvxChartTextOrderItem::SvxChartTextOrderItem(SvxChartTextOrder eOrder,
130cdf0e10cSrcweir sal_uInt16 nId) :
131cdf0e10cSrcweir SfxEnumItem(nId, (sal_uInt16)eOrder)
132cdf0e10cSrcweir {
133cdf0e10cSrcweir }
134cdf0e10cSrcweir
135cdf0e10cSrcweir // -----------------------------------------------------------------------
136cdf0e10cSrcweir
SvxChartTextOrderItem(SvStream & rIn,sal_uInt16 nId)137cdf0e10cSrcweir SvxChartTextOrderItem::SvxChartTextOrderItem(SvStream& rIn, sal_uInt16 nId) :
138cdf0e10cSrcweir SfxEnumItem(nId, rIn)
139cdf0e10cSrcweir {
140cdf0e10cSrcweir }
141cdf0e10cSrcweir
142cdf0e10cSrcweir // -----------------------------------------------------------------------
143cdf0e10cSrcweir
Clone(SfxItemPool *) const144cdf0e10cSrcweir SfxPoolItem* SvxChartTextOrderItem::Clone(SfxItemPool* /*pPool*/) const
145cdf0e10cSrcweir {
146cdf0e10cSrcweir return new SvxChartTextOrderItem(*this);
147cdf0e10cSrcweir }
148cdf0e10cSrcweir
149cdf0e10cSrcweir // -----------------------------------------------------------------------
150cdf0e10cSrcweir
Create(SvStream & rIn,sal_uInt16) const151cdf0e10cSrcweir SfxPoolItem* SvxChartTextOrderItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const
152cdf0e10cSrcweir {
153cdf0e10cSrcweir return new SvxChartTextOrderItem(rIn, Which());
154cdf0e10cSrcweir }
155cdf0e10cSrcweir
156cdf0e10cSrcweir // -----------------------------------------------------------------------
157cdf0e10cSrcweir
QueryValue(::com::sun::star::uno::Any & rVal,sal_uInt8) const158cdf0e10cSrcweir sal_Bool SvxChartTextOrderItem::QueryValue( ::com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) const
159cdf0e10cSrcweir {
160cdf0e10cSrcweir // the order of the two enums is not equal, so a mapping is required
161cdf0e10cSrcweir ::com::sun::star::chart::ChartAxisArrangeOrderType eAO;
162cdf0e10cSrcweir SvxChartTextOrder eOrder( GetValue());
163cdf0e10cSrcweir
164cdf0e10cSrcweir switch( eOrder )
165cdf0e10cSrcweir {
166cdf0e10cSrcweir case CHTXTORDER_SIDEBYSIDE:
167cdf0e10cSrcweir eAO = ::com::sun::star::chart::ChartAxisArrangeOrderType_SIDE_BY_SIDE; break;
168cdf0e10cSrcweir case CHTXTORDER_UPDOWN:
169cdf0e10cSrcweir eAO = ::com::sun::star::chart::ChartAxisArrangeOrderType_STAGGER_ODD; break;
170cdf0e10cSrcweir case CHTXTORDER_DOWNUP:
171cdf0e10cSrcweir eAO = ::com::sun::star::chart::ChartAxisArrangeOrderType_STAGGER_EVEN; break;
172cdf0e10cSrcweir case CHTXTORDER_AUTO:
173cdf0e10cSrcweir eAO = ::com::sun::star::chart::ChartAxisArrangeOrderType_AUTO; break;
174cdf0e10cSrcweir }
175cdf0e10cSrcweir
176cdf0e10cSrcweir rVal <<= eAO;
177cdf0e10cSrcweir
178cdf0e10cSrcweir return sal_True;
179cdf0e10cSrcweir }
180cdf0e10cSrcweir
181cdf0e10cSrcweir // -----------------------------------------------------------------------
182cdf0e10cSrcweir
PutValue(const::com::sun::star::uno::Any & rVal,sal_uInt8)183cdf0e10cSrcweir sal_Bool SvxChartTextOrderItem::PutValue( const ::com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/ )
184cdf0e10cSrcweir {
185cdf0e10cSrcweir // the order of the two enums is not equal, so a mapping is required
186cdf0e10cSrcweir ::com::sun::star::chart::ChartAxisArrangeOrderType eAO;
187cdf0e10cSrcweir SvxChartTextOrder eOrder;
188cdf0e10cSrcweir
189cdf0e10cSrcweir if(!(rVal >>= eAO))
190cdf0e10cSrcweir {
191cdf0e10cSrcweir // also try an int (for Basic)
192cdf0e10cSrcweir sal_Int32 nAO = 0;
193cdf0e10cSrcweir if(!(rVal >>= nAO))
194cdf0e10cSrcweir return sal_False;
195cdf0e10cSrcweir eAO = static_cast< ::com::sun::star::chart::ChartAxisArrangeOrderType >( nAO );
196cdf0e10cSrcweir }
197cdf0e10cSrcweir
198cdf0e10cSrcweir switch( eAO )
199cdf0e10cSrcweir {
200cdf0e10cSrcweir case ::com::sun::star::chart::ChartAxisArrangeOrderType_SIDE_BY_SIDE:
201cdf0e10cSrcweir eOrder = CHTXTORDER_SIDEBYSIDE; break;
202cdf0e10cSrcweir case ::com::sun::star::chart::ChartAxisArrangeOrderType_STAGGER_ODD:
203cdf0e10cSrcweir eOrder = CHTXTORDER_UPDOWN; break;
204cdf0e10cSrcweir case ::com::sun::star::chart::ChartAxisArrangeOrderType_STAGGER_EVEN:
205cdf0e10cSrcweir eOrder = CHTXTORDER_DOWNUP; break;
206cdf0e10cSrcweir case ::com::sun::star::chart::ChartAxisArrangeOrderType_AUTO:
207cdf0e10cSrcweir eOrder = CHTXTORDER_AUTO; break;
208cdf0e10cSrcweir default:
209cdf0e10cSrcweir return sal_False;
210cdf0e10cSrcweir }
211cdf0e10cSrcweir
212cdf0e10cSrcweir SetValue( (sal_uInt16)eOrder );
213cdf0e10cSrcweir
214cdf0e10cSrcweir return sal_True;
215cdf0e10cSrcweir }
216cdf0e10cSrcweir
217cdf0e10cSrcweir /*************************************************************************
218cdf0e10cSrcweir |*
219cdf0e10cSrcweir |* SvxChartTextOrientItem
220cdf0e10cSrcweir |*
221cdf0e10cSrcweir *************************************************************************/
222cdf0e10cSrcweir
SvxChartTextOrientItem(SvxChartTextOrient eOrient,sal_uInt16 nId)223cdf0e10cSrcweir SvxChartTextOrientItem::SvxChartTextOrientItem(SvxChartTextOrient eOrient,
224cdf0e10cSrcweir sal_uInt16 nId) :
225cdf0e10cSrcweir SfxEnumItem(nId, (sal_uInt16)eOrient)
226cdf0e10cSrcweir {
227cdf0e10cSrcweir }
228cdf0e10cSrcweir
229cdf0e10cSrcweir // -----------------------------------------------------------------------
230cdf0e10cSrcweir
SvxChartTextOrientItem(SvStream & rIn,sal_uInt16 nId)231cdf0e10cSrcweir SvxChartTextOrientItem::SvxChartTextOrientItem(SvStream& rIn, sal_uInt16 nId) :
232cdf0e10cSrcweir SfxEnumItem(nId, rIn)
233cdf0e10cSrcweir {
234cdf0e10cSrcweir }
235cdf0e10cSrcweir
236cdf0e10cSrcweir // -----------------------------------------------------------------------
237cdf0e10cSrcweir
Clone(SfxItemPool *) const238cdf0e10cSrcweir SfxPoolItem* SvxChartTextOrientItem::Clone(SfxItemPool* /*pPool*/) const
239cdf0e10cSrcweir {
240cdf0e10cSrcweir return new SvxChartTextOrientItem(*this);
241cdf0e10cSrcweir }
242cdf0e10cSrcweir
243cdf0e10cSrcweir // -----------------------------------------------------------------------
244cdf0e10cSrcweir
Create(SvStream & rIn,sal_uInt16) const245cdf0e10cSrcweir SfxPoolItem* SvxChartTextOrientItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const
246cdf0e10cSrcweir {
247cdf0e10cSrcweir return new SvxChartTextOrientItem(rIn, Which());
248cdf0e10cSrcweir }
249cdf0e10cSrcweir
250cdf0e10cSrcweir /*************************************************************************
251cdf0e10cSrcweir |*
252cdf0e10cSrcweir |* SvxDoubleItem
253cdf0e10cSrcweir |*
254cdf0e10cSrcweir *************************************************************************/
255cdf0e10cSrcweir
SvxDoubleItem(double fValue,sal_uInt16 nId)256cdf0e10cSrcweir SvxDoubleItem::SvxDoubleItem(double fValue, sal_uInt16 nId) :
257cdf0e10cSrcweir SfxPoolItem(nId),
258cdf0e10cSrcweir fVal(fValue)
259cdf0e10cSrcweir {
260cdf0e10cSrcweir }
261cdf0e10cSrcweir
262cdf0e10cSrcweir // -----------------------------------------------------------------------
263cdf0e10cSrcweir
SvxDoubleItem(SvStream & rIn,sal_uInt16 nId)264cdf0e10cSrcweir SvxDoubleItem::SvxDoubleItem(SvStream& rIn, sal_uInt16 nId) :
265cdf0e10cSrcweir SfxPoolItem(nId)
266cdf0e10cSrcweir {
267cdf0e10cSrcweir rIn >> fVal;
268cdf0e10cSrcweir }
269cdf0e10cSrcweir
270cdf0e10cSrcweir // -----------------------------------------------------------------------
271cdf0e10cSrcweir
SvxDoubleItem(const SvxDoubleItem & rItem)272cdf0e10cSrcweir SvxDoubleItem::SvxDoubleItem(const SvxDoubleItem& rItem) :
273cdf0e10cSrcweir SfxPoolItem(rItem),
274cdf0e10cSrcweir fVal(rItem.fVal)
275cdf0e10cSrcweir {
276cdf0e10cSrcweir }
277cdf0e10cSrcweir
278cdf0e10cSrcweir // -----------------------------------------------------------------------
279cdf0e10cSrcweir
GetValueText() const280cdf0e10cSrcweir XubString SvxDoubleItem::GetValueText() const
281cdf0e10cSrcweir {
282cdf0e10cSrcweir rtl::OString aOStr( rtl::math::doubleToString( fVal, rtl_math_StringFormat_E, 4, '.', false ) );
283cdf0e10cSrcweir return String( aOStr.getStr(), (sal_uInt16)aOStr.getLength() );
284cdf0e10cSrcweir }
285cdf0e10cSrcweir
286cdf0e10cSrcweir // -----------------------------------------------------------------------
287cdf0e10cSrcweir
GetPresentation(SfxItemPresentation,SfxMapUnit,SfxMapUnit,XubString & rText,const IntlWrapper * pIntlWrapper) const288cdf0e10cSrcweir SfxItemPresentation SvxDoubleItem::GetPresentation
289cdf0e10cSrcweir ( SfxItemPresentation /*ePresentation*/, SfxMapUnit /*eCoreMetric*/,
290cdf0e10cSrcweir SfxMapUnit /*ePresentationMetric*/, XubString& rText,
291cdf0e10cSrcweir const IntlWrapper * pIntlWrapper) const
292cdf0e10cSrcweir {
293cdf0e10cSrcweir DBG_ASSERT( pIntlWrapper, "SvxDoubleItem::GetPresentation: no IntlWrapper" );
294cdf0e10cSrcweir if ( pIntlWrapper )
295cdf0e10cSrcweir {
296cdf0e10cSrcweir rText = ::rtl::math::doubleToUString( fVal, rtl_math_StringFormat_E, 4,
297cdf0e10cSrcweir pIntlWrapper->getLocaleData()->getNumDecimalSep().GetChar(0), true );
298cdf0e10cSrcweir }
299cdf0e10cSrcweir else
300cdf0e10cSrcweir rText = GetValueText();
301cdf0e10cSrcweir return SFX_ITEM_PRESENTATION_NAMELESS;
302cdf0e10cSrcweir }
303cdf0e10cSrcweir
304cdf0e10cSrcweir // -----------------------------------------------------------------------
305cdf0e10cSrcweir
operator ==(const SfxPoolItem & rItem) const306cdf0e10cSrcweir int SvxDoubleItem::operator == (const SfxPoolItem& rItem) const
307cdf0e10cSrcweir {
308cdf0e10cSrcweir return (((SvxDoubleItem&)rItem).fVal == fVal);
309cdf0e10cSrcweir }
310cdf0e10cSrcweir
311cdf0e10cSrcweir // -----------------------------------------------------------------------
312cdf0e10cSrcweir
Clone(SfxItemPool *) const313cdf0e10cSrcweir SfxPoolItem* SvxDoubleItem::Clone(SfxItemPool* /*pPool*/) const
314cdf0e10cSrcweir {
315cdf0e10cSrcweir return new SvxDoubleItem(*this);
316cdf0e10cSrcweir }
317cdf0e10cSrcweir
318cdf0e10cSrcweir // -----------------------------------------------------------------------
319cdf0e10cSrcweir
Create(SvStream & rIn,sal_uInt16) const320cdf0e10cSrcweir SfxPoolItem* SvxDoubleItem::Create(SvStream& rIn, sal_uInt16 /*nVersion*/) const
321cdf0e10cSrcweir {
322cdf0e10cSrcweir double _fVal;
323cdf0e10cSrcweir rIn >> _fVal;
324cdf0e10cSrcweir return new SvxDoubleItem(_fVal, Which());
325cdf0e10cSrcweir }
326cdf0e10cSrcweir
327cdf0e10cSrcweir // -----------------------------------------------------------------------
328cdf0e10cSrcweir
Store(SvStream & rOut,sal_uInt16) const329cdf0e10cSrcweir SvStream& SvxDoubleItem::Store(SvStream& rOut, sal_uInt16 /*nItemVersion*/) const
330cdf0e10cSrcweir {
331cdf0e10cSrcweir rOut << fVal;
332cdf0e10cSrcweir return rOut;
333cdf0e10cSrcweir }
334cdf0e10cSrcweir
335cdf0e10cSrcweir // -----------------------------------------------------------------------
336cdf0e10cSrcweir
GetMin() const337cdf0e10cSrcweir double SvxDoubleItem::GetMin() const
338cdf0e10cSrcweir {
339cdf0e10cSrcweir return DBL_MIN;
340cdf0e10cSrcweir }
341cdf0e10cSrcweir
342cdf0e10cSrcweir // -----------------------------------------------------------------------
343cdf0e10cSrcweir
GetMax() const344cdf0e10cSrcweir double SvxDoubleItem::GetMax() const
345cdf0e10cSrcweir {
346cdf0e10cSrcweir return DBL_MAX;
347cdf0e10cSrcweir }
348cdf0e10cSrcweir
349cdf0e10cSrcweir // -----------------------------------------------------------------------
350cdf0e10cSrcweir
GetUnit() const351cdf0e10cSrcweir SfxFieldUnit SvxDoubleItem::GetUnit() const
352cdf0e10cSrcweir {
353cdf0e10cSrcweir return SFX_FUNIT_NONE;
354cdf0e10cSrcweir }
355cdf0e10cSrcweir
356cdf0e10cSrcweir
357cdf0e10cSrcweir
358cdf0e10cSrcweir
359cdf0e10cSrcweir // -----------------------------------------------------------------------
QueryValue(uno::Any & rVal,sal_uInt8) const360cdf0e10cSrcweir sal_Bool SvxDoubleItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) const
361cdf0e10cSrcweir {
362cdf0e10cSrcweir rVal <<= fVal;
363cdf0e10cSrcweir return sal_True;
364cdf0e10cSrcweir }
365cdf0e10cSrcweir
366cdf0e10cSrcweir // -----------------------------------------------------------------------
PutValue(const uno::Any & rVal,sal_uInt8)367cdf0e10cSrcweir sal_Bool SvxDoubleItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/ )
368cdf0e10cSrcweir {
369cdf0e10cSrcweir return rVal >>= fVal;
370cdf0e10cSrcweir }
371cdf0e10cSrcweir
372cdf0e10cSrcweir
373cdf0e10cSrcweir
374cdf0e10cSrcweir /*************************************************************************
375cdf0e10cSrcweir |*
376cdf0e10cSrcweir |* SvxChartKindErrorItem
377cdf0e10cSrcweir |*
378cdf0e10cSrcweir *************************************************************************/
379cdf0e10cSrcweir
SvxChartKindErrorItem(SvxChartKindError eOrient,sal_uInt16 nId)380cdf0e10cSrcweir SvxChartKindErrorItem::SvxChartKindErrorItem(SvxChartKindError eOrient,
381cdf0e10cSrcweir sal_uInt16 nId) :
382cdf0e10cSrcweir SfxEnumItem(nId, (sal_uInt16)eOrient)
383cdf0e10cSrcweir {
384cdf0e10cSrcweir }
385cdf0e10cSrcweir
386cdf0e10cSrcweir // -----------------------------------------------------------------------
387cdf0e10cSrcweir
SvxChartKindErrorItem(SvStream & rIn,sal_uInt16 nId)388cdf0e10cSrcweir SvxChartKindErrorItem::SvxChartKindErrorItem(SvStream& rIn, sal_uInt16 nId) :
389cdf0e10cSrcweir SfxEnumItem(nId, rIn)
390cdf0e10cSrcweir {
391cdf0e10cSrcweir }
392cdf0e10cSrcweir
393cdf0e10cSrcweir // -----------------------------------------------------------------------
394cdf0e10cSrcweir
Clone(SfxItemPool *) const395cdf0e10cSrcweir SfxPoolItem* SvxChartKindErrorItem::Clone(SfxItemPool* /*pPool*/) const
396cdf0e10cSrcweir {
397cdf0e10cSrcweir return new SvxChartKindErrorItem(*this);
398cdf0e10cSrcweir }
399cdf0e10cSrcweir
400cdf0e10cSrcweir // -----------------------------------------------------------------------
401cdf0e10cSrcweir
Create(SvStream & rIn,sal_uInt16) const402cdf0e10cSrcweir SfxPoolItem* SvxChartKindErrorItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const
403cdf0e10cSrcweir {
404cdf0e10cSrcweir return new SvxChartKindErrorItem(rIn, Which());
405cdf0e10cSrcweir }
406cdf0e10cSrcweir
407cdf0e10cSrcweir // -----------------------------------------------------------------------
408cdf0e10cSrcweir
GetVersion(sal_uInt16 nFileFormatVersion) const409cdf0e10cSrcweir sal_uInt16 SvxChartKindErrorItem::GetVersion (sal_uInt16 nFileFormatVersion) const
410cdf0e10cSrcweir {
411cdf0e10cSrcweir return (nFileFormatVersion == SOFFICE_FILEFORMAT_31)
412cdf0e10cSrcweir ? USHRT_MAX
413cdf0e10cSrcweir : 0;
414cdf0e10cSrcweir }
415cdf0e10cSrcweir
416cdf0e10cSrcweir /*************************************************************************
417cdf0e10cSrcweir |*
418cdf0e10cSrcweir |* SvxChartIndicateItem
419cdf0e10cSrcweir |*
420cdf0e10cSrcweir *************************************************************************/
421cdf0e10cSrcweir
SvxChartIndicateItem(SvxChartIndicate eOrient,sal_uInt16 nId)422cdf0e10cSrcweir SvxChartIndicateItem::SvxChartIndicateItem(SvxChartIndicate eOrient,
423cdf0e10cSrcweir sal_uInt16 nId) :
424cdf0e10cSrcweir SfxEnumItem(nId, (sal_uInt16)eOrient)
425cdf0e10cSrcweir {
426cdf0e10cSrcweir }
427cdf0e10cSrcweir
428cdf0e10cSrcweir // -----------------------------------------------------------------------
429cdf0e10cSrcweir
SvxChartIndicateItem(SvStream & rIn,sal_uInt16 nId)430cdf0e10cSrcweir SvxChartIndicateItem::SvxChartIndicateItem(SvStream& rIn, sal_uInt16 nId) :
431cdf0e10cSrcweir SfxEnumItem(nId, rIn)
432cdf0e10cSrcweir {
433cdf0e10cSrcweir }
434cdf0e10cSrcweir
435cdf0e10cSrcweir // -----------------------------------------------------------------------
436cdf0e10cSrcweir
Clone(SfxItemPool *) const437cdf0e10cSrcweir SfxPoolItem* SvxChartIndicateItem::Clone(SfxItemPool* /*pPool*/) const
438cdf0e10cSrcweir {
439cdf0e10cSrcweir return new SvxChartIndicateItem(*this);
440cdf0e10cSrcweir }
441cdf0e10cSrcweir
442cdf0e10cSrcweir // -----------------------------------------------------------------------
443cdf0e10cSrcweir
Create(SvStream & rIn,sal_uInt16) const444cdf0e10cSrcweir SfxPoolItem* SvxChartIndicateItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const
445cdf0e10cSrcweir {
446cdf0e10cSrcweir return new SvxChartIndicateItem(rIn, Which());
447cdf0e10cSrcweir }
448cdf0e10cSrcweir
449cdf0e10cSrcweir // -----------------------------------------------------------------------
450cdf0e10cSrcweir
GetVersion(sal_uInt16 nFileFormatVersion) const451cdf0e10cSrcweir sal_uInt16 SvxChartIndicateItem::GetVersion (sal_uInt16 nFileFormatVersion) const
452cdf0e10cSrcweir {
453cdf0e10cSrcweir return (nFileFormatVersion == SOFFICE_FILEFORMAT_31)
454cdf0e10cSrcweir ? USHRT_MAX
455cdf0e10cSrcweir : 0;
456cdf0e10cSrcweir }
457cdf0e10cSrcweir
458cdf0e10cSrcweir /*************************************************************************
459cdf0e10cSrcweir |*
460cdf0e10cSrcweir |* SvxChartRegressItem
461cdf0e10cSrcweir |*
462cdf0e10cSrcweir *************************************************************************/
463cdf0e10cSrcweir
SvxChartRegressItem(SvxChartRegress eOrient,sal_uInt16 nId)464cdf0e10cSrcweir SvxChartRegressItem::SvxChartRegressItem(SvxChartRegress eOrient,
465cdf0e10cSrcweir sal_uInt16 nId) :
466cdf0e10cSrcweir SfxEnumItem(nId, (sal_uInt16)eOrient)
467cdf0e10cSrcweir {
468cdf0e10cSrcweir }
469cdf0e10cSrcweir
470cdf0e10cSrcweir // -----------------------------------------------------------------------
471cdf0e10cSrcweir
SvxChartRegressItem(SvStream & rIn,sal_uInt16 nId)472cdf0e10cSrcweir SvxChartRegressItem::SvxChartRegressItem(SvStream& rIn, sal_uInt16 nId) :
473cdf0e10cSrcweir SfxEnumItem(nId, rIn)
474cdf0e10cSrcweir {
475cdf0e10cSrcweir }
476cdf0e10cSrcweir
477cdf0e10cSrcweir // -----------------------------------------------------------------------
478cdf0e10cSrcweir
Clone(SfxItemPool *) const479cdf0e10cSrcweir SfxPoolItem* SvxChartRegressItem::Clone(SfxItemPool* /*pPool*/) const
480cdf0e10cSrcweir {
481cdf0e10cSrcweir return new SvxChartRegressItem(*this);
482cdf0e10cSrcweir }
483cdf0e10cSrcweir
484cdf0e10cSrcweir // -----------------------------------------------------------------------
485cdf0e10cSrcweir
Create(SvStream & rIn,sal_uInt16) const486cdf0e10cSrcweir SfxPoolItem* SvxChartRegressItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const
487cdf0e10cSrcweir {
488cdf0e10cSrcweir return new SvxChartRegressItem(rIn, Which());
489cdf0e10cSrcweir }
490cdf0e10cSrcweir
491cdf0e10cSrcweir // -----------------------------------------------------------------------
492cdf0e10cSrcweir
GetVersion(sal_uInt16 nFileFormatVersion) const493cdf0e10cSrcweir sal_uInt16 SvxChartRegressItem::GetVersion (sal_uInt16 nFileFormatVersion) const
494cdf0e10cSrcweir {
495cdf0e10cSrcweir return (nFileFormatVersion == SOFFICE_FILEFORMAT_31)
496cdf0e10cSrcweir ? USHRT_MAX
497cdf0e10cSrcweir : 0;
498cdf0e10cSrcweir }
499cdf0e10cSrcweir
500cdf0e10cSrcweir
501