diff options
Diffstat (limited to 'sc/source/ui/vba/vbarange.cxx')
-rw-r--r-- | sc/source/ui/vba/vbarange.cxx | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx index ba05f979daad..f8472f4b25dc 100644 --- a/sc/source/ui/vba/vbarange.cxx +++ b/sc/source/ui/vba/vbarange.cxx @@ -298,8 +298,8 @@ class SingleRangeEnumeration : public EnumerationHelper_BASE public: SingleRangeEnumeration( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< css::uno::XComponentContext >& xContext, const uno::Reference< table::XCellRange >& xRange ) throw ( uno::RuntimeException ) : m_xParent( xParent ), m_xRange( xRange ), mxContext( xContext ), bHasMore( true ) { } - virtual sal_Bool SAL_CALL hasMoreElements( ) throw (uno::RuntimeException, std::exception) SAL_OVERRIDE { return bHasMore; } - virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException, std::exception) SAL_OVERRIDE + virtual sal_Bool SAL_CALL hasMoreElements( ) throw (uno::RuntimeException, std::exception) override { return bHasMore; } + virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException, std::exception) override { if ( !bHasMore ) throw container::NoSuchElementException(); @@ -322,19 +322,19 @@ private: public: SingleRangeIndexAccess( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< table::XCellRange >& xRange ):mxParent( xParent ), m_xRange( xRange ), mxContext( xContext ) {} // XIndexAccess - virtual ::sal_Int32 SAL_CALL getCount() throw (::uno::RuntimeException, std::exception) SAL_OVERRIDE { return 1; } - virtual uno::Any SAL_CALL getByIndex( ::sal_Int32 Index ) throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException, std::exception) SAL_OVERRIDE + virtual ::sal_Int32 SAL_CALL getCount() throw (::uno::RuntimeException, std::exception) override { return 1; } + virtual uno::Any SAL_CALL getByIndex( ::sal_Int32 Index ) throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException, std::exception) override { if ( Index != 0 ) throw lang::IndexOutOfBoundsException(); return uno::makeAny( m_xRange ); } // XElementAccess - virtual uno::Type SAL_CALL getElementType() throw (uno::RuntimeException, std::exception) SAL_OVERRIDE { return cppu::UnoType<table::XCellRange>::get(); } + virtual uno::Type SAL_CALL getElementType() throw (uno::RuntimeException, std::exception) override { return cppu::UnoType<table::XCellRange>::get(); } - virtual sal_Bool SAL_CALL hasElements() throw (uno::RuntimeException, std::exception) SAL_OVERRIDE { return sal_True; } + virtual sal_Bool SAL_CALL hasElements() throw (uno::RuntimeException, std::exception) override { return sal_True; } // XEnumerationAccess - virtual uno::Reference< container::XEnumeration > SAL_CALL createEnumeration() throw (uno::RuntimeException, std::exception) SAL_OVERRIDE { return new SingleRangeEnumeration( mxParent, mxContext, m_xRange ); } + virtual uno::Reference< container::XEnumeration > SAL_CALL createEnumeration() throw (uno::RuntimeException, std::exception) override { return new SingleRangeEnumeration( mxParent, mxContext, m_xRange ); } }; @@ -345,7 +345,7 @@ class RangesEnumerationImpl : public EnumerationHelperImpl public: RangesEnumerationImpl( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration, bool bIsRows, bool bIsColumns ) throw ( uno::RuntimeException ) : EnumerationHelperImpl( xParent, xContext, xEnumeration ), mbIsRows( bIsRows ), mbIsColumns( bIsColumns ) {} - virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException, std::exception) SAL_OVERRIDE + virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException, std::exception) override { return lcl_makeRange( m_xParent, m_xContext, m_xEnumeration->nextElement(), mbIsRows, mbIsColumns ); } @@ -359,16 +359,16 @@ public: ScVbaRangeAreas( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XIndexAccess >& xIndexAccess, bool bIsRows, bool bIsColumns ) : ScVbaCollectionBaseImpl( xParent, xContext, xIndexAccess ), mbIsRows( bIsRows ), mbIsColumns( bIsColumns ) {} // XEnumerationAccess - virtual uno::Reference< container::XEnumeration > SAL_CALL createEnumeration() throw (uno::RuntimeException) SAL_OVERRIDE; + virtual uno::Reference< container::XEnumeration > SAL_CALL createEnumeration() throw (uno::RuntimeException) override; // XElementAccess - virtual uno::Type SAL_CALL getElementType() throw (uno::RuntimeException) SAL_OVERRIDE { return cppu::UnoType<excel::XRange>::get(); } + virtual uno::Type SAL_CALL getElementType() throw (uno::RuntimeException) override { return cppu::UnoType<excel::XRange>::get(); } - virtual uno::Any createCollectionObject( const uno::Any& aSource ) SAL_OVERRIDE; + virtual uno::Any createCollectionObject( const uno::Any& aSource ) override; - virtual OUString getServiceImplName() SAL_OVERRIDE { return OUString(); } + virtual OUString getServiceImplName() override { return OUString(); } - virtual uno::Sequence< OUString > getServiceNames() SAL_OVERRIDE { return uno::Sequence< OUString >(); } + virtual uno::Sequence< OUString > getServiceNames() override { return uno::Sequence< OUString >(); } }; @@ -625,9 +625,9 @@ public: { } - virtual sal_Bool SAL_CALL hasMoreElements() throw (::uno::RuntimeException, std::exception) SAL_OVERRIDE { return mCurElem < mMaxElems; } + virtual sal_Bool SAL_CALL hasMoreElements() throw (::uno::RuntimeException, std::exception) override { return mCurElem < mMaxElems; } - virtual uno::Any SAL_CALL nextElement() throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException, std::exception) SAL_OVERRIDE + virtual uno::Any SAL_CALL nextElement() throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException, std::exception) override { if ( !hasMoreElements() ) throw container::NoSuchElementException(); @@ -675,9 +675,9 @@ public: } m_it = m_CellPositions.begin(); } - virtual sal_Bool SAL_CALL hasMoreElements() throw (::uno::RuntimeException, std::exception) SAL_OVERRIDE { return m_it != m_CellPositions.end(); } + virtual sal_Bool SAL_CALL hasMoreElements() throw (::uno::RuntimeException, std::exception) override { return m_it != m_CellPositions.end(); } - virtual uno::Any SAL_CALL nextElement() throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException, std::exception) SAL_OVERRIDE + virtual uno::Any SAL_CALL nextElement() throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException, std::exception) override { if ( !hasMoreElements() ) throw container::NoSuchElementException(); @@ -710,8 +710,8 @@ protected: uno::Any maValue; public: CellValueSetter( const uno::Any& aValue ); - virtual bool processValue( const uno::Any& aValue, const uno::Reference< table::XCell >& xCell ) SAL_OVERRIDE; - virtual void visitNode( sal_Int32 x, sal_Int32 y, const uno::Reference< table::XCell >& xCell ) SAL_OVERRIDE; + virtual bool processValue( const uno::Any& aValue, const uno::Reference< table::XCell >& xCell ) override; + virtual void visitNode( sal_Int32 x, sal_Int32 y, const uno::Reference< table::XCell >& xCell ) override; }; @@ -804,9 +804,9 @@ protected: uno::Any maValue; public: CellValueGetter() {} - virtual void visitNode( sal_Int32 x, sal_Int32 y, const uno::Reference< table::XCell >& xCell ) SAL_OVERRIDE; - virtual void processValue( sal_Int32 x, sal_Int32 y, const uno::Any& aValue ) SAL_OVERRIDE; - const uno::Any& getValue() const SAL_OVERRIDE { return maValue; } + virtual void visitNode( sal_Int32 x, sal_Int32 y, const uno::Reference< table::XCell >& xCell ) override; + virtual void processValue( sal_Int32 x, sal_Int32 y, const uno::Any& aValue ) override; + const uno::Any& getValue() const override { return maValue; } }; @@ -874,7 +874,7 @@ private: public: CellFormulaValueSetter( const uno::Any& aValue, ScDocument* pDoc, formula::FormulaGrammar::Grammar eGram ):CellValueSetter( aValue ), m_pDoc( pDoc ), m_eGrammar( eGram ){} protected: - bool processValue( const uno::Any& aValue, const uno::Reference< table::XCell >& xCell ) SAL_OVERRIDE + bool processValue( const uno::Any& aValue, const uno::Reference< table::XCell >& xCell ) override { OUString sFormula; double aDblValue = 0.0; @@ -923,7 +923,7 @@ private: formula::FormulaGrammar::Grammar m_eGrammar; public: CellFormulaValueGetter(ScDocument* pDoc, formula::FormulaGrammar::Grammar eGram ) : CellValueGetter( ), m_pDoc( pDoc ), m_eGrammar( eGram ) {} - virtual void visitNode( sal_Int32 x, sal_Int32 y, const uno::Reference< table::XCell >& xCell ) SAL_OVERRIDE + virtual void visitNode( sal_Int32 x, sal_Int32 y, const uno::Reference< table::XCell >& xCell ) override { uno::Any aValue; aValue <<= xCell->getFormula(); @@ -971,7 +971,7 @@ public: aMatrix[index].realloc( nColCount ); maValue <<= aMatrix; } - void visitNode( sal_Int32 x, sal_Int32 y, const uno::Reference< table::XCell >& xCell ) SAL_OVERRIDE + void visitNode( sal_Int32 x, sal_Int32 y, const uno::Reference< table::XCell >& xCell ) override { mValueGetter.visitNode( x, y, xCell ); @@ -994,7 +994,7 @@ public: aValue >>= aMatrix; nColCount = aMatrix.getLength(); } - virtual void visitNode( sal_Int32 /*x*/, sal_Int32 y, const uno::Reference< table::XCell >& xCell ) SAL_OVERRIDE + virtual void visitNode( sal_Int32 /*x*/, sal_Int32 y, const uno::Reference< table::XCell >& xCell ) override { if ( y < nColCount ) mCellValueSetter.processValue( aMatrix[ y ], xCell ); @@ -1017,7 +1017,7 @@ public: nColCount = aMatrix[0].getLength(); } - virtual void visitNode( sal_Int32 x, sal_Int32 y, const uno::Reference< table::XCell >& xCell ) SAL_OVERRIDE + virtual void visitNode( sal_Int32 x, sal_Int32 y, const uno::Reference< table::XCell >& xCell ) override { if ( x < nRowCount && y < nColCount ) mCellValueSetter.processValue( aMatrix[ x ][ y ], xCell ); @@ -1042,7 +1042,7 @@ class RangeValueProcessor : public RangeProcessor public: RangeValueProcessor( const uno::Any& rVal ):m_aVal( rVal ) {} virtual ~RangeValueProcessor() {} - virtual void process( const uno::Reference< excel::XRange >& xRange ) SAL_OVERRIDE + virtual void process( const uno::Reference< excel::XRange >& xRange ) override { xRange->setValue( m_aVal ); } @@ -1054,7 +1054,7 @@ class RangeFormulaProcessor : public RangeProcessor public: RangeFormulaProcessor( const uno::Any& rVal ):m_aVal( rVal ) {} virtual ~RangeFormulaProcessor() {} - virtual void process( const uno::Reference< excel::XRange >& xRange ) SAL_OVERRIDE + virtual void process( const uno::Reference< excel::XRange >& xRange ) override { xRange->setFormula( m_aVal ); } @@ -1066,7 +1066,7 @@ class RangeCountProcessor : public RangeProcessor public: RangeCountProcessor():nCount(0){} virtual ~RangeCountProcessor() {} - virtual void process( const uno::Reference< excel::XRange >& xRange ) SAL_OVERRIDE + virtual void process( const uno::Reference< excel::XRange >& xRange ) override { nCount = nCount + xRange->getCount(); } |