1*cdf0e10cSrcweir /************************************************************************* 2*cdf0e10cSrcweir * 3*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4*cdf0e10cSrcweir * 5*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates. 6*cdf0e10cSrcweir * 7*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite 8*cdf0e10cSrcweir * 9*cdf0e10cSrcweir * This file is part of OpenOffice.org. 10*cdf0e10cSrcweir * 11*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify 12*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3 13*cdf0e10cSrcweir * only, as published by the Free Software Foundation. 14*cdf0e10cSrcweir * 15*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful, 16*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of 17*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details 19*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code). 20*cdf0e10cSrcweir * 21*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License 22*cdf0e10cSrcweir * version 3 along with OpenOffice.org. If not, see 23*cdf0e10cSrcweir * <http://www.openoffice.org/license.html> 24*cdf0e10cSrcweir * for a copy of the LGPLv3 License. 25*cdf0e10cSrcweir * 26*cdf0e10cSrcweir ************************************************************************/ 27*cdf0e10cSrcweir 28*cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove 29*cdf0e10cSrcweir #include "precompiled_svx.hxx" 30*cdf0e10cSrcweir 31*cdf0e10cSrcweir // include --------------------------------------------------------------- 32*cdf0e10cSrcweir #include <tools/stream.hxx> 33*cdf0e10cSrcweir #ifndef __SBX_SBXVARIABLE_HXX 34*cdf0e10cSrcweir #include <basic/sbxvar.hxx> 35*cdf0e10cSrcweir #endif 36*cdf0e10cSrcweir #if defined UNX && !defined LINUX 37*cdf0e10cSrcweir #include <wchar.h> 38*cdf0e10cSrcweir #endif 39*cdf0e10cSrcweir #include <rtl/math.hxx> 40*cdf0e10cSrcweir #include <unotools/intlwrapper.hxx> 41*cdf0e10cSrcweir #include <com/sun/star/chart/ChartAxisArrangeOrderType.hpp> 42*cdf0e10cSrcweir 43*cdf0e10cSrcweir #include <stdio.h> 44*cdf0e10cSrcweir #include <float.h> 45*cdf0e10cSrcweir #include <rtl/math.hxx> 46*cdf0e10cSrcweir 47*cdf0e10cSrcweir #include "svx/chrtitem.hxx" 48*cdf0e10cSrcweir 49*cdf0e10cSrcweir using namespace ::rtl; 50*cdf0e10cSrcweir using namespace ::com::sun::star; 51*cdf0e10cSrcweir // ----------------------------------------------------------------------- 52*cdf0e10cSrcweir 53*cdf0e10cSrcweir TYPEINIT1_FACTORY(SvxChartStyleItem, SfxEnumItem, new SvxChartStyleItem(CHSTYLE_2D_LINE, 0)); 54*cdf0e10cSrcweir TYPEINIT1(SvxChartDataDescrItem, SfxEnumItem); 55*cdf0e10cSrcweir TYPEINIT1(SvxChartTextOrderItem, SfxEnumItem); 56*cdf0e10cSrcweir TYPEINIT1(SvxChartTextOrientItem, SfxEnumItem); 57*cdf0e10cSrcweir TYPEINIT1(SvxChartIndicateItem, SfxEnumItem); 58*cdf0e10cSrcweir TYPEINIT1(SvxChartKindErrorItem, SfxEnumItem); 59*cdf0e10cSrcweir TYPEINIT1(SvxChartRegressItem, SfxEnumItem); 60*cdf0e10cSrcweir TYPEINIT1_FACTORY(SvxDoubleItem, SfxPoolItem, new SvxDoubleItem(0.0, 0)); 61*cdf0e10cSrcweir 62*cdf0e10cSrcweir /************************************************************************* 63*cdf0e10cSrcweir |* 64*cdf0e10cSrcweir |* SvxChartStyleItem 65*cdf0e10cSrcweir |* 66*cdf0e10cSrcweir *************************************************************************/ 67*cdf0e10cSrcweir 68*cdf0e10cSrcweir SvxChartStyleItem::SvxChartStyleItem(SvxChartStyle eStyle, sal_uInt16 nId) : 69*cdf0e10cSrcweir SfxEnumItem(nId, (sal_uInt16)eStyle) 70*cdf0e10cSrcweir { 71*cdf0e10cSrcweir } 72*cdf0e10cSrcweir 73*cdf0e10cSrcweir // ----------------------------------------------------------------------- 74*cdf0e10cSrcweir 75*cdf0e10cSrcweir SvxChartStyleItem::SvxChartStyleItem(SvStream& rIn, sal_uInt16 nId) : 76*cdf0e10cSrcweir SfxEnumItem(nId, rIn) 77*cdf0e10cSrcweir { 78*cdf0e10cSrcweir } 79*cdf0e10cSrcweir 80*cdf0e10cSrcweir // ----------------------------------------------------------------------- 81*cdf0e10cSrcweir 82*cdf0e10cSrcweir SfxPoolItem* SvxChartStyleItem::Clone(SfxItemPool* /*pPool*/) const 83*cdf0e10cSrcweir { 84*cdf0e10cSrcweir return new SvxChartStyleItem(*this); 85*cdf0e10cSrcweir } 86*cdf0e10cSrcweir 87*cdf0e10cSrcweir // ----------------------------------------------------------------------- 88*cdf0e10cSrcweir 89*cdf0e10cSrcweir SfxPoolItem* SvxChartStyleItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const 90*cdf0e10cSrcweir { 91*cdf0e10cSrcweir return new SvxChartStyleItem(rIn, Which()); 92*cdf0e10cSrcweir } 93*cdf0e10cSrcweir 94*cdf0e10cSrcweir /************************************************************************* 95*cdf0e10cSrcweir |* 96*cdf0e10cSrcweir |* SvxChartDataDescrItem 97*cdf0e10cSrcweir |* 98*cdf0e10cSrcweir *************************************************************************/ 99*cdf0e10cSrcweir 100*cdf0e10cSrcweir SvxChartDataDescrItem::SvxChartDataDescrItem(SvxChartDataDescr eDataDescr, 101*cdf0e10cSrcweir sal_uInt16 nId) : 102*cdf0e10cSrcweir SfxEnumItem(nId, (sal_uInt16)eDataDescr) 103*cdf0e10cSrcweir { 104*cdf0e10cSrcweir } 105*cdf0e10cSrcweir 106*cdf0e10cSrcweir // ----------------------------------------------------------------------- 107*cdf0e10cSrcweir 108*cdf0e10cSrcweir SvxChartDataDescrItem::SvxChartDataDescrItem(SvStream& rIn, sal_uInt16 nId) : 109*cdf0e10cSrcweir SfxEnumItem(nId, rIn) 110*cdf0e10cSrcweir { 111*cdf0e10cSrcweir } 112*cdf0e10cSrcweir 113*cdf0e10cSrcweir // ----------------------------------------------------------------------- 114*cdf0e10cSrcweir 115*cdf0e10cSrcweir SfxPoolItem* SvxChartDataDescrItem::Clone(SfxItemPool* /*pPool*/) const 116*cdf0e10cSrcweir { 117*cdf0e10cSrcweir return new SvxChartDataDescrItem(*this); 118*cdf0e10cSrcweir } 119*cdf0e10cSrcweir 120*cdf0e10cSrcweir // ----------------------------------------------------------------------- 121*cdf0e10cSrcweir 122*cdf0e10cSrcweir SfxPoolItem* SvxChartDataDescrItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const 123*cdf0e10cSrcweir { 124*cdf0e10cSrcweir return new SvxChartDataDescrItem(rIn, Which()); 125*cdf0e10cSrcweir } 126*cdf0e10cSrcweir 127*cdf0e10cSrcweir /************************************************************************* 128*cdf0e10cSrcweir |* 129*cdf0e10cSrcweir |* SvxChartTextOrderItem 130*cdf0e10cSrcweir |* 131*cdf0e10cSrcweir *************************************************************************/ 132*cdf0e10cSrcweir 133*cdf0e10cSrcweir SvxChartTextOrderItem::SvxChartTextOrderItem(SvxChartTextOrder eOrder, 134*cdf0e10cSrcweir sal_uInt16 nId) : 135*cdf0e10cSrcweir SfxEnumItem(nId, (sal_uInt16)eOrder) 136*cdf0e10cSrcweir { 137*cdf0e10cSrcweir } 138*cdf0e10cSrcweir 139*cdf0e10cSrcweir // ----------------------------------------------------------------------- 140*cdf0e10cSrcweir 141*cdf0e10cSrcweir SvxChartTextOrderItem::SvxChartTextOrderItem(SvStream& rIn, sal_uInt16 nId) : 142*cdf0e10cSrcweir SfxEnumItem(nId, rIn) 143*cdf0e10cSrcweir { 144*cdf0e10cSrcweir } 145*cdf0e10cSrcweir 146*cdf0e10cSrcweir // ----------------------------------------------------------------------- 147*cdf0e10cSrcweir 148*cdf0e10cSrcweir SfxPoolItem* SvxChartTextOrderItem::Clone(SfxItemPool* /*pPool*/) const 149*cdf0e10cSrcweir { 150*cdf0e10cSrcweir return new SvxChartTextOrderItem(*this); 151*cdf0e10cSrcweir } 152*cdf0e10cSrcweir 153*cdf0e10cSrcweir // ----------------------------------------------------------------------- 154*cdf0e10cSrcweir 155*cdf0e10cSrcweir SfxPoolItem* SvxChartTextOrderItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const 156*cdf0e10cSrcweir { 157*cdf0e10cSrcweir return new SvxChartTextOrderItem(rIn, Which()); 158*cdf0e10cSrcweir } 159*cdf0e10cSrcweir 160*cdf0e10cSrcweir // ----------------------------------------------------------------------- 161*cdf0e10cSrcweir 162*cdf0e10cSrcweir sal_Bool SvxChartTextOrderItem::QueryValue( ::com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) const 163*cdf0e10cSrcweir { 164*cdf0e10cSrcweir // the order of the two enums is not equal, so a mapping is required 165*cdf0e10cSrcweir ::com::sun::star::chart::ChartAxisArrangeOrderType eAO; 166*cdf0e10cSrcweir SvxChartTextOrder eOrder( GetValue()); 167*cdf0e10cSrcweir 168*cdf0e10cSrcweir switch( eOrder ) 169*cdf0e10cSrcweir { 170*cdf0e10cSrcweir case CHTXTORDER_SIDEBYSIDE: 171*cdf0e10cSrcweir eAO = ::com::sun::star::chart::ChartAxisArrangeOrderType_SIDE_BY_SIDE; break; 172*cdf0e10cSrcweir case CHTXTORDER_UPDOWN: 173*cdf0e10cSrcweir eAO = ::com::sun::star::chart::ChartAxisArrangeOrderType_STAGGER_ODD; break; 174*cdf0e10cSrcweir case CHTXTORDER_DOWNUP: 175*cdf0e10cSrcweir eAO = ::com::sun::star::chart::ChartAxisArrangeOrderType_STAGGER_EVEN; break; 176*cdf0e10cSrcweir case CHTXTORDER_AUTO: 177*cdf0e10cSrcweir eAO = ::com::sun::star::chart::ChartAxisArrangeOrderType_AUTO; break; 178*cdf0e10cSrcweir } 179*cdf0e10cSrcweir 180*cdf0e10cSrcweir rVal <<= eAO; 181*cdf0e10cSrcweir 182*cdf0e10cSrcweir return sal_True; 183*cdf0e10cSrcweir } 184*cdf0e10cSrcweir 185*cdf0e10cSrcweir // ----------------------------------------------------------------------- 186*cdf0e10cSrcweir 187*cdf0e10cSrcweir sal_Bool SvxChartTextOrderItem::PutValue( const ::com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) 188*cdf0e10cSrcweir { 189*cdf0e10cSrcweir // the order of the two enums is not equal, so a mapping is required 190*cdf0e10cSrcweir ::com::sun::star::chart::ChartAxisArrangeOrderType eAO; 191*cdf0e10cSrcweir SvxChartTextOrder eOrder; 192*cdf0e10cSrcweir 193*cdf0e10cSrcweir if(!(rVal >>= eAO)) 194*cdf0e10cSrcweir { 195*cdf0e10cSrcweir // also try an int (for Basic) 196*cdf0e10cSrcweir sal_Int32 nAO = 0; 197*cdf0e10cSrcweir if(!(rVal >>= nAO)) 198*cdf0e10cSrcweir return sal_False; 199*cdf0e10cSrcweir eAO = static_cast< ::com::sun::star::chart::ChartAxisArrangeOrderType >( nAO ); 200*cdf0e10cSrcweir } 201*cdf0e10cSrcweir 202*cdf0e10cSrcweir switch( eAO ) 203*cdf0e10cSrcweir { 204*cdf0e10cSrcweir case ::com::sun::star::chart::ChartAxisArrangeOrderType_SIDE_BY_SIDE: 205*cdf0e10cSrcweir eOrder = CHTXTORDER_SIDEBYSIDE; break; 206*cdf0e10cSrcweir case ::com::sun::star::chart::ChartAxisArrangeOrderType_STAGGER_ODD: 207*cdf0e10cSrcweir eOrder = CHTXTORDER_UPDOWN; break; 208*cdf0e10cSrcweir case ::com::sun::star::chart::ChartAxisArrangeOrderType_STAGGER_EVEN: 209*cdf0e10cSrcweir eOrder = CHTXTORDER_DOWNUP; break; 210*cdf0e10cSrcweir case ::com::sun::star::chart::ChartAxisArrangeOrderType_AUTO: 211*cdf0e10cSrcweir eOrder = CHTXTORDER_AUTO; break; 212*cdf0e10cSrcweir default: 213*cdf0e10cSrcweir return sal_False; 214*cdf0e10cSrcweir } 215*cdf0e10cSrcweir 216*cdf0e10cSrcweir SetValue( (sal_uInt16)eOrder ); 217*cdf0e10cSrcweir 218*cdf0e10cSrcweir return sal_True; 219*cdf0e10cSrcweir } 220*cdf0e10cSrcweir 221*cdf0e10cSrcweir /************************************************************************* 222*cdf0e10cSrcweir |* 223*cdf0e10cSrcweir |* SvxChartTextOrientItem 224*cdf0e10cSrcweir |* 225*cdf0e10cSrcweir *************************************************************************/ 226*cdf0e10cSrcweir 227*cdf0e10cSrcweir SvxChartTextOrientItem::SvxChartTextOrientItem(SvxChartTextOrient eOrient, 228*cdf0e10cSrcweir sal_uInt16 nId) : 229*cdf0e10cSrcweir SfxEnumItem(nId, (sal_uInt16)eOrient) 230*cdf0e10cSrcweir { 231*cdf0e10cSrcweir } 232*cdf0e10cSrcweir 233*cdf0e10cSrcweir // ----------------------------------------------------------------------- 234*cdf0e10cSrcweir 235*cdf0e10cSrcweir SvxChartTextOrientItem::SvxChartTextOrientItem(SvStream& rIn, sal_uInt16 nId) : 236*cdf0e10cSrcweir SfxEnumItem(nId, rIn) 237*cdf0e10cSrcweir { 238*cdf0e10cSrcweir } 239*cdf0e10cSrcweir 240*cdf0e10cSrcweir // ----------------------------------------------------------------------- 241*cdf0e10cSrcweir 242*cdf0e10cSrcweir SfxPoolItem* SvxChartTextOrientItem::Clone(SfxItemPool* /*pPool*/) const 243*cdf0e10cSrcweir { 244*cdf0e10cSrcweir return new SvxChartTextOrientItem(*this); 245*cdf0e10cSrcweir } 246*cdf0e10cSrcweir 247*cdf0e10cSrcweir // ----------------------------------------------------------------------- 248*cdf0e10cSrcweir 249*cdf0e10cSrcweir SfxPoolItem* SvxChartTextOrientItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const 250*cdf0e10cSrcweir { 251*cdf0e10cSrcweir return new SvxChartTextOrientItem(rIn, Which()); 252*cdf0e10cSrcweir } 253*cdf0e10cSrcweir 254*cdf0e10cSrcweir /************************************************************************* 255*cdf0e10cSrcweir |* 256*cdf0e10cSrcweir |* SvxDoubleItem 257*cdf0e10cSrcweir |* 258*cdf0e10cSrcweir *************************************************************************/ 259*cdf0e10cSrcweir 260*cdf0e10cSrcweir SvxDoubleItem::SvxDoubleItem(double fValue, sal_uInt16 nId) : 261*cdf0e10cSrcweir SfxPoolItem(nId), 262*cdf0e10cSrcweir fVal(fValue) 263*cdf0e10cSrcweir { 264*cdf0e10cSrcweir } 265*cdf0e10cSrcweir 266*cdf0e10cSrcweir // ----------------------------------------------------------------------- 267*cdf0e10cSrcweir 268*cdf0e10cSrcweir SvxDoubleItem::SvxDoubleItem(SvStream& rIn, sal_uInt16 nId) : 269*cdf0e10cSrcweir SfxPoolItem(nId) 270*cdf0e10cSrcweir { 271*cdf0e10cSrcweir rIn >> fVal; 272*cdf0e10cSrcweir } 273*cdf0e10cSrcweir 274*cdf0e10cSrcweir // ----------------------------------------------------------------------- 275*cdf0e10cSrcweir 276*cdf0e10cSrcweir SvxDoubleItem::SvxDoubleItem(const SvxDoubleItem& rItem) : 277*cdf0e10cSrcweir SfxPoolItem(rItem), 278*cdf0e10cSrcweir fVal(rItem.fVal) 279*cdf0e10cSrcweir { 280*cdf0e10cSrcweir } 281*cdf0e10cSrcweir 282*cdf0e10cSrcweir // ----------------------------------------------------------------------- 283*cdf0e10cSrcweir 284*cdf0e10cSrcweir XubString SvxDoubleItem::GetValueText() const 285*cdf0e10cSrcweir { 286*cdf0e10cSrcweir rtl::OString aOStr( rtl::math::doubleToString( fVal, rtl_math_StringFormat_E, 4, '.', false ) ); 287*cdf0e10cSrcweir return String( aOStr.getStr(), (sal_uInt16)aOStr.getLength() ); 288*cdf0e10cSrcweir } 289*cdf0e10cSrcweir 290*cdf0e10cSrcweir // ----------------------------------------------------------------------- 291*cdf0e10cSrcweir 292*cdf0e10cSrcweir SfxItemPresentation SvxDoubleItem::GetPresentation 293*cdf0e10cSrcweir ( SfxItemPresentation /*ePresentation*/, SfxMapUnit /*eCoreMetric*/, 294*cdf0e10cSrcweir SfxMapUnit /*ePresentationMetric*/, XubString& rText, 295*cdf0e10cSrcweir const IntlWrapper * pIntlWrapper) const 296*cdf0e10cSrcweir { 297*cdf0e10cSrcweir DBG_ASSERT( pIntlWrapper, "SvxDoubleItem::GetPresentation: no IntlWrapper" ); 298*cdf0e10cSrcweir if ( pIntlWrapper ) 299*cdf0e10cSrcweir { 300*cdf0e10cSrcweir rText = ::rtl::math::doubleToUString( fVal, rtl_math_StringFormat_E, 4, 301*cdf0e10cSrcweir pIntlWrapper->getLocaleData()->getNumDecimalSep().GetChar(0), true ); 302*cdf0e10cSrcweir } 303*cdf0e10cSrcweir else 304*cdf0e10cSrcweir rText = GetValueText(); 305*cdf0e10cSrcweir return SFX_ITEM_PRESENTATION_NAMELESS; 306*cdf0e10cSrcweir } 307*cdf0e10cSrcweir 308*cdf0e10cSrcweir // ----------------------------------------------------------------------- 309*cdf0e10cSrcweir 310*cdf0e10cSrcweir int SvxDoubleItem::operator == (const SfxPoolItem& rItem) const 311*cdf0e10cSrcweir { 312*cdf0e10cSrcweir return (((SvxDoubleItem&)rItem).fVal == fVal); 313*cdf0e10cSrcweir } 314*cdf0e10cSrcweir 315*cdf0e10cSrcweir // ----------------------------------------------------------------------- 316*cdf0e10cSrcweir 317*cdf0e10cSrcweir SfxPoolItem* SvxDoubleItem::Clone(SfxItemPool* /*pPool*/) const 318*cdf0e10cSrcweir { 319*cdf0e10cSrcweir return new SvxDoubleItem(*this); 320*cdf0e10cSrcweir } 321*cdf0e10cSrcweir 322*cdf0e10cSrcweir // ----------------------------------------------------------------------- 323*cdf0e10cSrcweir 324*cdf0e10cSrcweir SfxPoolItem* SvxDoubleItem::Create(SvStream& rIn, sal_uInt16 /*nVersion*/) const 325*cdf0e10cSrcweir { 326*cdf0e10cSrcweir double _fVal; 327*cdf0e10cSrcweir rIn >> _fVal; 328*cdf0e10cSrcweir return new SvxDoubleItem(_fVal, Which()); 329*cdf0e10cSrcweir } 330*cdf0e10cSrcweir 331*cdf0e10cSrcweir // ----------------------------------------------------------------------- 332*cdf0e10cSrcweir 333*cdf0e10cSrcweir SvStream& SvxDoubleItem::Store(SvStream& rOut, sal_uInt16 /*nItemVersion*/) const 334*cdf0e10cSrcweir { 335*cdf0e10cSrcweir rOut << fVal; 336*cdf0e10cSrcweir return rOut; 337*cdf0e10cSrcweir } 338*cdf0e10cSrcweir 339*cdf0e10cSrcweir // ----------------------------------------------------------------------- 340*cdf0e10cSrcweir 341*cdf0e10cSrcweir double SvxDoubleItem::GetMin() const 342*cdf0e10cSrcweir { 343*cdf0e10cSrcweir return DBL_MIN; 344*cdf0e10cSrcweir } 345*cdf0e10cSrcweir 346*cdf0e10cSrcweir // ----------------------------------------------------------------------- 347*cdf0e10cSrcweir 348*cdf0e10cSrcweir double SvxDoubleItem::GetMax() const 349*cdf0e10cSrcweir { 350*cdf0e10cSrcweir return DBL_MAX; 351*cdf0e10cSrcweir } 352*cdf0e10cSrcweir 353*cdf0e10cSrcweir // ----------------------------------------------------------------------- 354*cdf0e10cSrcweir 355*cdf0e10cSrcweir SfxFieldUnit SvxDoubleItem::GetUnit() const 356*cdf0e10cSrcweir { 357*cdf0e10cSrcweir return SFX_FUNIT_NONE; 358*cdf0e10cSrcweir } 359*cdf0e10cSrcweir 360*cdf0e10cSrcweir 361*cdf0e10cSrcweir 362*cdf0e10cSrcweir 363*cdf0e10cSrcweir // ----------------------------------------------------------------------- 364*cdf0e10cSrcweir sal_Bool SvxDoubleItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) const 365*cdf0e10cSrcweir { 366*cdf0e10cSrcweir rVal <<= fVal; 367*cdf0e10cSrcweir return sal_True; 368*cdf0e10cSrcweir } 369*cdf0e10cSrcweir 370*cdf0e10cSrcweir // ----------------------------------------------------------------------- 371*cdf0e10cSrcweir sal_Bool SvxDoubleItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) 372*cdf0e10cSrcweir { 373*cdf0e10cSrcweir return rVal >>= fVal; 374*cdf0e10cSrcweir } 375*cdf0e10cSrcweir 376*cdf0e10cSrcweir 377*cdf0e10cSrcweir 378*cdf0e10cSrcweir /************************************************************************* 379*cdf0e10cSrcweir |* 380*cdf0e10cSrcweir |* SvxChartKindErrorItem 381*cdf0e10cSrcweir |* 382*cdf0e10cSrcweir *************************************************************************/ 383*cdf0e10cSrcweir 384*cdf0e10cSrcweir SvxChartKindErrorItem::SvxChartKindErrorItem(SvxChartKindError eOrient, 385*cdf0e10cSrcweir sal_uInt16 nId) : 386*cdf0e10cSrcweir SfxEnumItem(nId, (sal_uInt16)eOrient) 387*cdf0e10cSrcweir { 388*cdf0e10cSrcweir } 389*cdf0e10cSrcweir 390*cdf0e10cSrcweir // ----------------------------------------------------------------------- 391*cdf0e10cSrcweir 392*cdf0e10cSrcweir SvxChartKindErrorItem::SvxChartKindErrorItem(SvStream& rIn, sal_uInt16 nId) : 393*cdf0e10cSrcweir SfxEnumItem(nId, rIn) 394*cdf0e10cSrcweir { 395*cdf0e10cSrcweir } 396*cdf0e10cSrcweir 397*cdf0e10cSrcweir // ----------------------------------------------------------------------- 398*cdf0e10cSrcweir 399*cdf0e10cSrcweir SfxPoolItem* SvxChartKindErrorItem::Clone(SfxItemPool* /*pPool*/) const 400*cdf0e10cSrcweir { 401*cdf0e10cSrcweir return new SvxChartKindErrorItem(*this); 402*cdf0e10cSrcweir } 403*cdf0e10cSrcweir 404*cdf0e10cSrcweir // ----------------------------------------------------------------------- 405*cdf0e10cSrcweir 406*cdf0e10cSrcweir SfxPoolItem* SvxChartKindErrorItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const 407*cdf0e10cSrcweir { 408*cdf0e10cSrcweir return new SvxChartKindErrorItem(rIn, Which()); 409*cdf0e10cSrcweir } 410*cdf0e10cSrcweir 411*cdf0e10cSrcweir // ----------------------------------------------------------------------- 412*cdf0e10cSrcweir 413*cdf0e10cSrcweir sal_uInt16 SvxChartKindErrorItem::GetVersion (sal_uInt16 nFileFormatVersion) const 414*cdf0e10cSrcweir { 415*cdf0e10cSrcweir return (nFileFormatVersion == SOFFICE_FILEFORMAT_31) 416*cdf0e10cSrcweir ? USHRT_MAX 417*cdf0e10cSrcweir : 0; 418*cdf0e10cSrcweir } 419*cdf0e10cSrcweir 420*cdf0e10cSrcweir /************************************************************************* 421*cdf0e10cSrcweir |* 422*cdf0e10cSrcweir |* SvxChartIndicateItem 423*cdf0e10cSrcweir |* 424*cdf0e10cSrcweir *************************************************************************/ 425*cdf0e10cSrcweir 426*cdf0e10cSrcweir SvxChartIndicateItem::SvxChartIndicateItem(SvxChartIndicate eOrient, 427*cdf0e10cSrcweir sal_uInt16 nId) : 428*cdf0e10cSrcweir SfxEnumItem(nId, (sal_uInt16)eOrient) 429*cdf0e10cSrcweir { 430*cdf0e10cSrcweir } 431*cdf0e10cSrcweir 432*cdf0e10cSrcweir // ----------------------------------------------------------------------- 433*cdf0e10cSrcweir 434*cdf0e10cSrcweir SvxChartIndicateItem::SvxChartIndicateItem(SvStream& rIn, sal_uInt16 nId) : 435*cdf0e10cSrcweir SfxEnumItem(nId, rIn) 436*cdf0e10cSrcweir { 437*cdf0e10cSrcweir } 438*cdf0e10cSrcweir 439*cdf0e10cSrcweir // ----------------------------------------------------------------------- 440*cdf0e10cSrcweir 441*cdf0e10cSrcweir SfxPoolItem* SvxChartIndicateItem::Clone(SfxItemPool* /*pPool*/) const 442*cdf0e10cSrcweir { 443*cdf0e10cSrcweir return new SvxChartIndicateItem(*this); 444*cdf0e10cSrcweir } 445*cdf0e10cSrcweir 446*cdf0e10cSrcweir // ----------------------------------------------------------------------- 447*cdf0e10cSrcweir 448*cdf0e10cSrcweir SfxPoolItem* SvxChartIndicateItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const 449*cdf0e10cSrcweir { 450*cdf0e10cSrcweir return new SvxChartIndicateItem(rIn, Which()); 451*cdf0e10cSrcweir } 452*cdf0e10cSrcweir 453*cdf0e10cSrcweir // ----------------------------------------------------------------------- 454*cdf0e10cSrcweir 455*cdf0e10cSrcweir sal_uInt16 SvxChartIndicateItem::GetVersion (sal_uInt16 nFileFormatVersion) const 456*cdf0e10cSrcweir { 457*cdf0e10cSrcweir return (nFileFormatVersion == SOFFICE_FILEFORMAT_31) 458*cdf0e10cSrcweir ? USHRT_MAX 459*cdf0e10cSrcweir : 0; 460*cdf0e10cSrcweir } 461*cdf0e10cSrcweir 462*cdf0e10cSrcweir /************************************************************************* 463*cdf0e10cSrcweir |* 464*cdf0e10cSrcweir |* SvxChartRegressItem 465*cdf0e10cSrcweir |* 466*cdf0e10cSrcweir *************************************************************************/ 467*cdf0e10cSrcweir 468*cdf0e10cSrcweir SvxChartRegressItem::SvxChartRegressItem(SvxChartRegress eOrient, 469*cdf0e10cSrcweir sal_uInt16 nId) : 470*cdf0e10cSrcweir SfxEnumItem(nId, (sal_uInt16)eOrient) 471*cdf0e10cSrcweir { 472*cdf0e10cSrcweir } 473*cdf0e10cSrcweir 474*cdf0e10cSrcweir // ----------------------------------------------------------------------- 475*cdf0e10cSrcweir 476*cdf0e10cSrcweir SvxChartRegressItem::SvxChartRegressItem(SvStream& rIn, sal_uInt16 nId) : 477*cdf0e10cSrcweir SfxEnumItem(nId, rIn) 478*cdf0e10cSrcweir { 479*cdf0e10cSrcweir } 480*cdf0e10cSrcweir 481*cdf0e10cSrcweir // ----------------------------------------------------------------------- 482*cdf0e10cSrcweir 483*cdf0e10cSrcweir SfxPoolItem* SvxChartRegressItem::Clone(SfxItemPool* /*pPool*/) const 484*cdf0e10cSrcweir { 485*cdf0e10cSrcweir return new SvxChartRegressItem(*this); 486*cdf0e10cSrcweir } 487*cdf0e10cSrcweir 488*cdf0e10cSrcweir // ----------------------------------------------------------------------- 489*cdf0e10cSrcweir 490*cdf0e10cSrcweir SfxPoolItem* SvxChartRegressItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const 491*cdf0e10cSrcweir { 492*cdf0e10cSrcweir return new SvxChartRegressItem(rIn, Which()); 493*cdf0e10cSrcweir } 494*cdf0e10cSrcweir 495*cdf0e10cSrcweir // ----------------------------------------------------------------------- 496*cdf0e10cSrcweir 497*cdf0e10cSrcweir sal_uInt16 SvxChartRegressItem::GetVersion (sal_uInt16 nFileFormatVersion) const 498*cdf0e10cSrcweir { 499*cdf0e10cSrcweir return (nFileFormatVersion == SOFFICE_FILEFORMAT_31) 500*cdf0e10cSrcweir ? USHRT_MAX 501*cdf0e10cSrcweir : 0; 502*cdf0e10cSrcweir } 503*cdf0e10cSrcweir 504*cdf0e10cSrcweir 505