diff options
Diffstat (limited to 'sc/source/ui/vba/vbaaxis.cxx')
-rw-r--r-- | sc/source/ui/vba/vbaaxis.cxx | 120 |
1 files changed, 60 insertions, 60 deletions
diff --git a/sc/source/ui/vba/vbaaxis.cxx b/sc/source/ui/vba/vbaaxis.cxx index d51534264e38..9e17b30135a4 100644 --- a/sc/source/ui/vba/vbaaxis.cxx +++ b/sc/source/ui/vba/vbaaxis.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -42,7 +42,7 @@ const rtl::OUString ORIGIN( RTL_CONSTASCII_USTRINGPARAM("Origin") ); const rtl::OUString AUTOORIGIN( RTL_CONSTASCII_USTRINGPARAM("AutoOrigin") ); const rtl::OUString VBA_MIN( RTL_CONSTASCII_USTRINGPARAM("Max") ); const rtl::OUString VBA_MAX( RTL_CONSTASCII_USTRINGPARAM("Min") ); -ScVbaChart* +ScVbaChart* ScVbaAxis::getChartPtr() throw( uno::RuntimeException ) { ScVbaChart* pChart = static_cast< ScVbaChart* >( moChartParent.get() ); @@ -51,7 +51,7 @@ ScVbaAxis::getChartPtr() throw( uno::RuntimeException ) return pChart; } -sal_Bool +sal_Bool ScVbaAxis::isValueAxis() throw( script::BasicErrorException ) { if ( getType() == xlCategory ) @@ -61,29 +61,29 @@ ScVbaAxis::isValueAxis() throw( script::BasicErrorException ) return sal_True; } -ScVbaAxis::ScVbaAxis( const uno::Reference< XHelperInterface >& xParent,const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< beans::XPropertySet >& _xPropertySet, sal_Int32 _nType, sal_Int32 _nGroup ) : ScVbaAxis_BASE( xParent, xContext ), mxPropertySet( _xPropertySet ), mnType( _nType ), mnGroup( _nGroup ), bCrossesAreCustomized( sal_False ) +ScVbaAxis::ScVbaAxis( const uno::Reference< XHelperInterface >& xParent,const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< beans::XPropertySet >& _xPropertySet, sal_Int32 _nType, sal_Int32 _nGroup ) : ScVbaAxis_BASE( xParent, xContext ), mxPropertySet( _xPropertySet ), mnType( _nType ), mnGroup( _nGroup ), bCrossesAreCustomized( sal_False ) { oShapeHelper.reset( new ShapeHelper( uno::Reference< drawing::XShape >( mxPropertySet, uno::UNO_QUERY ) ) ); moChartParent.set( xParent, uno::UNO_QUERY_THROW ); setType(_nType); - setCrosses(xlAxisCrossesAutomatic); + setCrosses(xlAxisCrossesAutomatic); } -void SAL_CALL +void SAL_CALL ScVbaAxis::Delete( ) throw (script::BasicErrorException, uno::RuntimeException) { uno::Reference< lang::XComponent > xComponent( mxPropertySet, uno::UNO_QUERY_THROW ); xComponent->dispose(); } - uno::Reference< ::ooo::vba::excel::XAxisTitle > SAL_CALL + uno::Reference< ::ooo::vba::excel::XAxisTitle > SAL_CALL ScVbaAxis::getAxisTitle( ) throw (script::BasicErrorException, uno::RuntimeException) { uno::Reference< excel::XAxisTitle > xAxisTitle; try { ScVbaChart* pChart = getChartPtr(); - + if (getHasTitle() ) { int nType = getType(); @@ -98,7 +98,7 @@ ScVbaAxis::getAxisTitle( ) throw (script::BasicErrorException, uno::RuntimeExce default: // xlValue: xAxisTitle = new ScVbaAxisTitle(this, mxContext, pChart->xAxisYSupplier->getYAxisTitle()); break; - } + } } } catch (uno::Exception& e) @@ -109,20 +109,20 @@ ScVbaAxis::getAxisTitle( ) throw (script::BasicErrorException, uno::RuntimeExce } -void SAL_CALL +void SAL_CALL ScVbaAxis::setDisplayUnit( ::sal_Int32 /*DisplayUnit*/ ) throw (script::BasicErrorException, uno::RuntimeException) { DebugHelper::exception(SbERR_NOT_IMPLEMENTED, rtl::OUString()); } -::sal_Int32 SAL_CALL +::sal_Int32 SAL_CALL ScVbaAxis::getDisplayUnit( ) throw (script::BasicErrorException, uno::RuntimeException) { DebugHelper::exception(SbERR_NOT_IMPLEMENTED, rtl::OUString()); return -1; } -void SAL_CALL +void SAL_CALL ScVbaAxis::setCrosses( ::sal_Int32 _nCrosses ) throw (script::BasicErrorException, uno::RuntimeException) { try @@ -130,16 +130,16 @@ ScVbaAxis::setCrosses( ::sal_Int32 _nCrosses ) throw (script::BasicErrorExceptio double fNum = 0.0; switch (_nCrosses) { - case xlAxisCrossesAutomatic: //Microsoft Excel sets the axis crossing point. + case xlAxisCrossesAutomatic: //Microsoft Excel sets the axis crossing point. mxPropertySet->setPropertyValue(AUTOORIGIN, uno::makeAny( sal_True ) ); bCrossesAreCustomized = sal_False; return; - case xlAxisCrossesMinimum: // The axis crosses at the minimum value. + case xlAxisCrossesMinimum: // The axis crosses at the minimum value. mxPropertySet->getPropertyValue(VBA_MIN) >>= fNum; setCrossesAt( fNum ); bCrossesAreCustomized = sal_False; break; - case xlAxisCrossesMaximum: // The axis crosses at the maximum value. + case xlAxisCrossesMaximum: // The axis crosses at the maximum value. mxPropertySet->getPropertyValue(VBA_MAX) >>= fNum; setCrossesAt(fNum); bCrossesAreCustomized = sal_False; @@ -148,14 +148,14 @@ ScVbaAxis::setCrosses( ::sal_Int32 _nCrosses ) throw (script::BasicErrorExceptio bCrossesAreCustomized = sal_True; break; } - mxPropertySet->setPropertyValue(AUTOORIGIN, uno::makeAny(sal_False) ); + mxPropertySet->setPropertyValue(AUTOORIGIN, uno::makeAny(sal_False) ); } catch (uno::Exception& ) { DebugHelper::exception(SbERR_METHOD_FAILED, rtl::OUString()); } } -::sal_Int32 SAL_CALL +::sal_Int32 SAL_CALL ScVbaAxis::getCrosses( ) throw (script::BasicErrorException, uno::RuntimeException) { sal_Int32 nCrosses = xlAxisCrossesCustom; @@ -168,7 +168,7 @@ ScVbaAxis::getCrosses( ) throw (script::BasicErrorException, uno::RuntimeExcept else { if (bCrossesAreCustomized) - nCrosses = xlAxisCrossesCustom; + nCrosses = xlAxisCrossesCustom; else { double forigin = 0.0; @@ -190,7 +190,7 @@ ScVbaAxis::getCrosses( ) throw (script::BasicErrorException, uno::RuntimeExcept return nCrosses; } - void SAL_CALL + void SAL_CALL ScVbaAxis::setCrossesAt( double _fCrossesAt ) throw (script::BasicErrorException, uno::RuntimeException) { try @@ -207,7 +207,7 @@ ScVbaAxis::setCrossesAt( double _fCrossesAt ) throw (script::BasicErrorException } } - double SAL_CALL + double SAL_CALL ScVbaAxis::getCrossesAt( ) throw (script::BasicErrorException, uno::RuntimeException) { double fCrosses = 0.0; @@ -222,19 +222,19 @@ ScVbaAxis::getCrossesAt( ) throw (script::BasicErrorException, uno::RuntimeExce return fCrosses; } -void SAL_CALL +void SAL_CALL ScVbaAxis::setType( ::sal_Int32 _nType ) throw (script::BasicErrorException, uno::RuntimeException) { mnType = _nType; } -::sal_Int32 SAL_CALL +::sal_Int32 SAL_CALL ScVbaAxis::getType( ) throw (script::BasicErrorException, uno::RuntimeException) { return mnType; } -void SAL_CALL +void SAL_CALL ScVbaAxis::setHasTitle( ::sal_Bool _bHasTitle ) throw (script::BasicErrorException, uno::RuntimeException) { try @@ -251,16 +251,16 @@ ScVbaAxis::setHasTitle( ::sal_Bool _bHasTitle ) throw (script::BasicErrorExcepti break; default: // xlValue: pChart->mxDiagramPropertySet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HasYAxisTitle")), uno::makeAny(_bHasTitle)); - } + } } catch (uno::Exception& e) { DebugHelper::exception(e); - } + } } - ::sal_Bool SAL_CALL + ::sal_Bool SAL_CALL ScVbaAxis::getHasTitle( ) throw (script::BasicErrorException, uno::RuntimeException) { sal_Bool bHasTitle = sal_False; @@ -278,7 +278,7 @@ ScVbaAxis::getHasTitle( ) throw (script::BasicErrorException, uno::RuntimeExcep break; default: // xlValue: pChart->mxDiagramPropertySet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HasYAxisTitle")) ) >>= bHasTitle; - } + } } catch (uno::Exception& e) { @@ -287,13 +287,13 @@ ScVbaAxis::getHasTitle( ) throw (script::BasicErrorException, uno::RuntimeExcep return bHasTitle; } -void SAL_CALL +void SAL_CALL ScVbaAxis::setMinorUnit( double _fMinorUnit ) throw (script::BasicErrorException, uno::RuntimeException) { try { if (isValueAxis()) - mxPropertySet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("StepHelp") ), uno::makeAny(_fMinorUnit)); + mxPropertySet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("StepHelp") ), uno::makeAny(_fMinorUnit)); } catch (uno::Exception& ) { @@ -301,7 +301,7 @@ ScVbaAxis::setMinorUnit( double _fMinorUnit ) throw (script::BasicErrorException } } -double SAL_CALL +double SAL_CALL ScVbaAxis::getMinorUnit( ) throw (script::BasicErrorException, uno::RuntimeException) { double fMinor = 1.0; @@ -317,7 +317,7 @@ ScVbaAxis::getMinorUnit( ) throw (script::BasicErrorException, uno::RuntimeExce return fMinor; } -void SAL_CALL +void SAL_CALL ScVbaAxis::setMinorUnitIsAuto( ::sal_Bool _bMinorUnitIsAuto ) throw (script::BasicErrorException, uno::RuntimeException) { try @@ -331,7 +331,7 @@ ScVbaAxis::setMinorUnitIsAuto( ::sal_Bool _bMinorUnitIsAuto ) throw (script::Bas } } - ::sal_Bool SAL_CALL + ::sal_Bool SAL_CALL ScVbaAxis::getMinorUnitIsAuto( ) throw (script::BasicErrorException, uno::RuntimeException) { sal_Bool bIsAuto = sal_False; @@ -349,27 +349,27 @@ ScVbaAxis::getMinorUnitIsAuto( ) throw (script::BasicErrorException, uno::Runti return bIsAuto; } -void SAL_CALL +void SAL_CALL ScVbaAxis::setReversePlotOrder( ::sal_Bool /*ReversePlotOrder*/ ) throw (script::BasicErrorException, uno::RuntimeException) { DebugHelper::exception(SbERR_NOT_IMPLEMENTED, rtl::OUString()); } -::sal_Bool SAL_CALL +::sal_Bool SAL_CALL ScVbaAxis::getReversePlotOrder( ) throw (script::BasicErrorException, uno::RuntimeException) { DebugHelper::exception(SbERR_NOT_IMPLEMENTED, rtl::OUString()); return sal_False; } -void SAL_CALL +void SAL_CALL ScVbaAxis::setMajorUnit( double _fMajorUnit ) throw (script::BasicErrorException, uno::RuntimeException) { try { if (isValueAxis()) { - mxPropertySet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("StepMain")), uno::makeAny(_fMajorUnit)); + mxPropertySet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("StepMain")), uno::makeAny(_fMajorUnit)); } } catch (uno::Exception& ) @@ -378,7 +378,7 @@ ScVbaAxis::setMajorUnit( double _fMajorUnit ) throw (script::BasicErrorException } } -double SAL_CALL +double SAL_CALL ScVbaAxis::getMajorUnit( ) throw (script::BasicErrorException, uno::RuntimeException) { double fMax = 1.0; @@ -394,7 +394,7 @@ ScVbaAxis::getMajorUnit( ) throw (script::BasicErrorException, uno::RuntimeExce return fMax; } -void SAL_CALL +void SAL_CALL ScVbaAxis::setMajorUnitIsAuto( ::sal_Bool _bMajorUnitIsAuto ) throw (script::BasicErrorException, uno::RuntimeException) { try @@ -410,7 +410,7 @@ ScVbaAxis::setMajorUnitIsAuto( ::sal_Bool _bMajorUnitIsAuto ) throw (script::Bas } } -::sal_Bool SAL_CALL +::sal_Bool SAL_CALL ScVbaAxis::getMajorUnitIsAuto( ) throw (script::BasicErrorException, uno::RuntimeException) { sal_Bool bIsAuto = sal_False; @@ -428,14 +428,14 @@ ScVbaAxis::getMajorUnitIsAuto( ) throw (script::BasicErrorException, uno::Runti return bIsAuto; } -void SAL_CALL +void SAL_CALL ScVbaAxis::setMaximumScale( double _fMaximumScale ) throw (script::BasicErrorException, uno::RuntimeException) { try { if ( isValueAxis() ) { - mxPropertySet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Max" ) ), uno::makeAny(_fMaximumScale)); + mxPropertySet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Max" ) ), uno::makeAny(_fMaximumScale)); } } catch ( uno::Exception& ) @@ -444,7 +444,7 @@ ScVbaAxis::setMaximumScale( double _fMaximumScale ) throw (script::BasicErrorExc } } -double SAL_CALL +double SAL_CALL ScVbaAxis::getMaximumScale( ) throw (script::BasicErrorException, uno::RuntimeException) { double fMax = 1.0; @@ -452,7 +452,7 @@ ScVbaAxis::getMaximumScale( ) throw (script::BasicErrorException, uno::RuntimeE { if (isValueAxis()) { - mxPropertySet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Max" ))) >>= fMax; + mxPropertySet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Max" ))) >>= fMax; } } catch (uno::Exception& ) @@ -463,23 +463,23 @@ ScVbaAxis::getMaximumScale( ) throw (script::BasicErrorException, uno::RuntimeE } -void SAL_CALL +void SAL_CALL ScVbaAxis::setMaximumScaleIsAuto( ::sal_Bool _bMaximumScaleIsAuto ) throw (script::BasicErrorException, uno::RuntimeException) { try { if ( isValueAxis() ) mxPropertySet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "AutoMax" ) ), uno::makeAny( _bMaximumScaleIsAuto )); - + } catch ( uno::Exception& ) { DebugHelper::exception(SbERR_METHOD_FAILED, rtl::OUString()); - } + } } -::sal_Bool SAL_CALL +::sal_Bool SAL_CALL ScVbaAxis::getMaximumScaleIsAuto( ) throw (script::BasicErrorException, uno::RuntimeException) { sal_Bool bIsAuto = sal_False; @@ -495,7 +495,7 @@ ScVbaAxis::getMaximumScaleIsAuto( ) throw (script::BasicErrorException, uno::Ru return bIsAuto; } -void SAL_CALL +void SAL_CALL ScVbaAxis::setMinimumScale( double _fMinimumScale ) throw (script::BasicErrorException, uno::RuntimeException) { try @@ -509,7 +509,7 @@ ScVbaAxis::setMinimumScale( double _fMinimumScale ) throw (script::BasicErrorExc } } -double SAL_CALL +double SAL_CALL ScVbaAxis::getMinimumScale( ) throw (script::BasicErrorException, uno::RuntimeException) { double fMin = 0.0; @@ -525,7 +525,7 @@ ScVbaAxis::getMinimumScale( ) throw (script::BasicErrorException, uno::RuntimeE return fMin; } -void SAL_CALL +void SAL_CALL ScVbaAxis::setMinimumScaleIsAuto( ::sal_Bool _bMinimumScaleIsAuto ) throw (script::BasicErrorException, uno::RuntimeException) { try @@ -541,7 +541,7 @@ ScVbaAxis::setMinimumScaleIsAuto( ::sal_Bool _bMinimumScaleIsAuto ) throw (scrip } } -::sal_Bool SAL_CALL +::sal_Bool SAL_CALL ScVbaAxis::getMinimumScaleIsAuto( ) throw (script::BasicErrorException, uno::RuntimeException) { sal_Bool bIsAuto = sal_False; @@ -549,7 +549,7 @@ ScVbaAxis::getMinimumScaleIsAuto( ) throw (script::BasicErrorException, uno::Ru { if (isValueAxis()) { - mxPropertySet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("AutoMin")) ) >>= bIsAuto; + mxPropertySet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("AutoMin")) ) >>= bIsAuto; } } catch (uno::Exception& ) @@ -559,13 +559,13 @@ ScVbaAxis::getMinimumScaleIsAuto( ) throw (script::BasicErrorException, uno::Ru return bIsAuto; } -::sal_Int32 SAL_CALL +::sal_Int32 SAL_CALL ScVbaAxis::getAxisGroup( ) throw (uno::RuntimeException) { return mnGroup; } -void SAL_CALL +void SAL_CALL ScVbaAxis::setScaleType( ::sal_Int32 _nScaleType ) throw (script::BasicErrorException, uno::RuntimeException) { try @@ -592,10 +592,10 @@ ScVbaAxis::setScaleType( ::sal_Int32 _nScaleType ) throw (script::BasicErrorExce } } -::sal_Int32 SAL_CALL +::sal_Int32 SAL_CALL ScVbaAxis::getScaleType( ) throw (script::BasicErrorException, uno::RuntimeException) { - sal_Int32 nScaleType = xlScaleLinear; + sal_Int32 nScaleType = xlScaleLinear; try { if (isValueAxis()) @@ -605,7 +605,7 @@ ScVbaAxis::getScaleType( ) throw (script::BasicErrorException, uno::RuntimeExce if (bisLogarithmic) nScaleType = xlScaleLogarithmic; else - nScaleType = xlScaleLinear; + nScaleType = xlScaleLinear; } } catch (uno::Exception& ) @@ -615,7 +615,7 @@ ScVbaAxis::getScaleType( ) throw (script::BasicErrorException, uno::RuntimeExce return nScaleType; } -double SAL_CALL +double SAL_CALL ScVbaAxis::getHeight( ) throw (css::script::BasicErrorException, css::uno::RuntimeException) { return oShapeHelper->getHeight(); @@ -650,14 +650,14 @@ void SAL_CALL ScVbaAxis::setLeft( double left ) throw (css::script::BasicErrorEx oShapeHelper->setLeft( left ); } -rtl::OUString& +rtl::OUString& ScVbaAxis::getServiceImplName() { static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaAxis") ); return sImplName; } -uno::Sequence< rtl::OUString > +uno::Sequence< rtl::OUString > ScVbaAxis::getServiceNames() { static uno::Sequence< rtl::OUString > aServiceNames; |