diff options
Diffstat (limited to 'sw/source/ui/vba/vbasections.cxx')
-rw-r--r-- | sw/source/ui/vba/vbasections.cxx | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/sw/source/ui/vba/vbasections.cxx b/sw/source/ui/vba/vbasections.cxx index bf5847574e4e..74f5b7bb05a0 100644 --- a/sw/source/ui/vba/vbasections.cxx +++ b/sw/source/ui/vba/vbasections.cxx @@ -37,12 +37,12 @@ class SectionEnumeration : public ::cppu::WeakImplHelper< container::XEnumeratio public: explicit SectionEnumeration( const XSectionVec& rVec ) : mxSections( rVec ), mIt( mxSections.begin() ) {} - virtual sal_Bool SAL_CALL hasMoreElements( ) throw (uno::RuntimeException, std::exception) override + virtual sal_Bool SAL_CALL hasMoreElements( ) override { return ( mIt != mxSections.end() ); } - virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException, std::exception) override + virtual uno::Any SAL_CALL nextElement( ) override { if ( hasMoreElements() ) return uno::makeAny( *mIt++ ); @@ -62,7 +62,7 @@ private: public: /// @throws uno::RuntimeException - SectionCollectionHelper( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< frame::XModel >& xModel ) throw (uno::RuntimeException) : mxParent( xParent ), mxContext( xContext ), mxModel( xModel ) + SectionCollectionHelper( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< frame::XModel >& xModel ) : mxParent( xParent ), mxContext( xContext ), mxModel( xModel ) { uno::Reference< style::XStyleFamiliesSupplier > xSytleFamSupp( mxModel, uno::UNO_QUERY_THROW ); uno::Reference< container::XNameAccess > xSytleFamNames( xSytleFamSupp->getStyleFamilies(), uno::UNO_QUERY_THROW ); @@ -81,7 +81,7 @@ public: } /// @throws uno::RuntimeException - SectionCollectionHelper( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< frame::XModel >& xModel, const uno::Reference< text::XTextRange >& xTextRange ) throw (uno::RuntimeException) : mxParent( xParent ), mxContext( xContext ), mxModel( xModel ) + SectionCollectionHelper( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< frame::XModel >& xModel, const uno::Reference< text::XTextRange >& xTextRange ) : mxParent( xParent ), mxContext( xContext ), mxModel( xModel ) { // Hacky implementation of Range.Sections, only support 1 section uno::Reference< beans::XPropertySet > xRangeProps( xTextRange, uno::UNO_QUERY_THROW ); @@ -91,11 +91,11 @@ public: } // XIndexAccess - virtual sal_Int32 SAL_CALL getCount( ) throw (uno::RuntimeException, std::exception) override + virtual sal_Int32 SAL_CALL getCount( ) override { return mxSections.size(); } - virtual uno::Any SAL_CALL getByIndex( sal_Int32 Index ) throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException, std::exception) override + virtual uno::Any SAL_CALL getByIndex( sal_Int32 Index ) override { if ( Index < 0 || Index >= getCount() ) throw css::lang::IndexOutOfBoundsException(); @@ -103,16 +103,16 @@ public: uno::Reference< beans::XPropertySet > xPageProps( mxSections[ Index ], uno::UNO_QUERY_THROW ); return uno::makeAny( uno::Reference< word::XSection >( new SwVbaSection( mxParent, mxContext, mxModel, xPageProps ) ) ); } - virtual uno::Type SAL_CALL getElementType( ) throw (uno::RuntimeException, std::exception) override + virtual uno::Type SAL_CALL getElementType( ) override { return cppu::UnoType<word::XSection>::get(); } - virtual sal_Bool SAL_CALL hasElements( ) throw (uno::RuntimeException, std::exception) override + virtual sal_Bool SAL_CALL hasElements( ) override { return true; } // XEnumerationAccess - virtual uno::Reference< container::XEnumeration > SAL_CALL createEnumeration( ) throw (uno::RuntimeException, std::exception) override + virtual uno::Reference< container::XEnumeration > SAL_CALL createEnumeration( ) override { return new SectionEnumeration( mxSections ); } @@ -123,9 +123,9 @@ class SectionsEnumWrapper : public EnumerationHelperImpl uno::Reference< frame::XModel > mxModel; public: /// @throws uno::RuntimeException - SectionsEnumWrapper( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration, const uno::Reference< frame::XModel >& xModel ) throw ( uno::RuntimeException ) : EnumerationHelperImpl( xParent, xContext, xEnumeration ), mxModel( xModel ){} + SectionsEnumWrapper( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration, const uno::Reference< frame::XModel >& xModel ) : EnumerationHelperImpl( xParent, xContext, xEnumeration ), mxModel( xModel ){} - virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException, std::exception) override + virtual uno::Any SAL_CALL nextElement( ) override { uno::Reference< beans::XPropertySet > xPageProps( m_xEnumeration->nextElement(), uno::UNO_QUERY_THROW ); return uno::makeAny( uno::Reference< word::XSection > ( new SwVbaSection( m_xParent, m_xContext, mxModel, xPageProps ) ) ); @@ -141,7 +141,7 @@ SwVbaSections::SwVbaSections( const uno::Reference< XHelperInterface >& xParent, } uno::Any SAL_CALL -SwVbaSections::PageSetup( ) throw (uno::RuntimeException, std::exception) +SwVbaSections::PageSetup( ) { if( m_xIndexAccess->getCount() ) { @@ -154,13 +154,13 @@ SwVbaSections::PageSetup( ) throw (uno::RuntimeException, std::exception) // XEnumerationAccess uno::Type SAL_CALL -SwVbaSections::getElementType() throw (uno::RuntimeException) +SwVbaSections::getElementType() { return cppu::UnoType<word::XSection>::get(); } uno::Reference< container::XEnumeration > SAL_CALL -SwVbaSections::createEnumeration() throw (uno::RuntimeException) +SwVbaSections::createEnumeration() { uno::Reference< container::XEnumerationAccess > xEnumAccess( m_xIndexAccess, uno::UNO_QUERY_THROW ); return new SectionsEnumWrapper( this, mxContext, xEnumAccess->createEnumeration(), mxModel ); |