diff options
Diffstat (limited to 'sw/source/ui/vba/vbarevisions.cxx')
-rw-r--r-- | sw/source/ui/vba/vbarevisions.cxx | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/sw/source/ui/vba/vbarevisions.cxx b/sw/source/ui/vba/vbarevisions.cxx index 68b6c1560eca..661413f1ed20 100644 --- a/sw/source/ui/vba/vbarevisions.cxx +++ b/sw/source/ui/vba/vbarevisions.cxx @@ -34,11 +34,11 @@ class RedlinesEnumeration : public ::cppu::WeakImplHelper< container::XEnumerati RevisionMap::iterator mIt; public: explicit RedlinesEnumeration( const RevisionMap& sMap ) : mRevisionMap( sMap ), mIt( mRevisionMap.begin() ) {} - virtual sal_Bool SAL_CALL hasMoreElements( ) throw (uno::RuntimeException, std::exception) override + virtual sal_Bool SAL_CALL hasMoreElements( ) override { return ( mIt != mRevisionMap.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() ) throw container::NoSuchElementException(); @@ -53,14 +53,14 @@ class RevisionCollectionHelper : public ::cppu::WeakImplHelper< container::XInde RevisionMap mRevisionMap; public: /// @throws css::uno::RuntimeException -RevisionCollectionHelper( const uno::Reference< frame::XModel >& xModel, const uno::Reference< text::XTextRange >& xTextRange ) throw (uno::RuntimeException); +RevisionCollectionHelper( const uno::Reference< frame::XModel >& xModel, const uno::Reference< text::XTextRange >& xTextRange ); // XElementAccess - virtual uno::Type SAL_CALL getElementType( ) throw (uno::RuntimeException, std::exception) override { return cppu::UnoType<beans::XPropertySet>::get(); } - virtual sal_Bool SAL_CALL hasElements( ) throw (uno::RuntimeException, std::exception) override { return ( !mRevisionMap.empty() ); } + virtual uno::Type SAL_CALL getElementType( ) override { return cppu::UnoType<beans::XPropertySet>::get(); } + virtual sal_Bool SAL_CALL hasElements( ) override { return ( !mRevisionMap.empty() ); } // XIndexAccess - virtual ::sal_Int32 SAL_CALL getCount( ) throw (uno::RuntimeException, std::exception) override { return mRevisionMap.size(); } - virtual uno::Any SAL_CALL getByIndex( ::sal_Int32 Index ) throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException, std::exception ) override + virtual ::sal_Int32 SAL_CALL getCount( ) override { return mRevisionMap.size(); } + virtual uno::Any SAL_CALL getByIndex( ::sal_Int32 Index ) override { if ( Index < 0 || Index >= getCount() ) throw lang::IndexOutOfBoundsException(); @@ -69,13 +69,13 @@ RevisionCollectionHelper( const uno::Reference< frame::XModel >& xModel, const u } // 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 RedlinesEnumeration( mRevisionMap ); } }; -RevisionCollectionHelper::RevisionCollectionHelper( const uno::Reference< frame::XModel >& xModel, const uno::Reference< text::XTextRange >& xTextRange ) throw (uno::RuntimeException) +RevisionCollectionHelper::RevisionCollectionHelper( const uno::Reference< frame::XModel >& xModel, const uno::Reference< text::XTextRange >& xTextRange ) { uno::Reference< text::XTextRangeCompare > xTRC( xTextRange->getText(), uno::UNO_QUERY_THROW ); uno::Reference< document::XRedlinesSupplier > xRedlinesSupp( xModel, uno::UNO_QUERY_THROW ); @@ -96,9 +96,9 @@ class RevisionsEnumeration : public EnumerationHelperImpl uno::Reference< frame::XModel > m_xModel; public: /// @throws uno::RuntimeException - RevisionsEnumeration( 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 ), m_xModel( xModel ) {} + RevisionsEnumeration( 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 ), m_xModel( 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 > xRevision( m_xEnumeration->nextElement(), uno::UNO_QUERY_THROW ); return uno::makeAny( uno::Reference< word::XRevision > ( new SwVbaRevision( m_xParent, m_xContext, m_xModel, xRevision ) ) ); @@ -116,12 +116,12 @@ SwVbaRevisions::SwVbaRevisions( const uno::Reference< XHelperInterface >& xParen // XEnumerationAccess uno::Type -SwVbaRevisions::getElementType() throw (uno::RuntimeException) +SwVbaRevisions::getElementType() { return cppu::UnoType<word::XRevision>::get(); } uno::Reference< container::XEnumeration > -SwVbaRevisions::createEnumeration() throw (uno::RuntimeException) +SwVbaRevisions::createEnumeration() { uno::Reference< container::XEnumerationAccess > xEnumAccess( m_xIndexAccess, uno::UNO_QUERY_THROW ); return new RevisionsEnumeration( this, mxContext, xEnumAccess->createEnumeration(), mxModel ); @@ -134,7 +134,7 @@ SwVbaRevisions::createCollectionObject( const css::uno::Any& aSource ) return uno::makeAny( uno::Reference< word::XRevision > ( new SwVbaRevision( this, mxContext, mxModel, xRevision ) ) ); } -void SAL_CALL SwVbaRevisions::AcceptAll( ) throw (css::uno::RuntimeException, std::exception) +void SAL_CALL SwVbaRevisions::AcceptAll( ) { // First we need to put all the redline into a vector, because if the redline is accepted, // it will auto delete in the document. @@ -154,7 +154,7 @@ void SAL_CALL SwVbaRevisions::AcceptAll( ) throw (css::uno::RuntimeException, s } } -void SAL_CALL SwVbaRevisions::RejectAll( ) throw (css::uno::RuntimeException, std::exception) +void SAL_CALL SwVbaRevisions::RejectAll( ) { throw uno::RuntimeException(); } |