diff options
Diffstat (limited to 'sw/source/ui/vba/vbaheadersfooters.cxx')
-rw-r--r-- | sw/source/ui/vba/vbaheadersfooters.cxx | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/sw/source/ui/vba/vbaheadersfooters.cxx b/sw/source/ui/vba/vbaheadersfooters.cxx index db97153c44a4..c4cedf3f3a14 100644 --- a/sw/source/ui/vba/vbaheadersfooters.cxx +++ b/sw/source/ui/vba/vbaheadersfooters.cxx @@ -38,22 +38,22 @@ public: HeadersFootersIndexAccess( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< frame::XModel >& xModel, const uno::Reference< beans::XPropertySet >& xPageStyleProps, bool bHeader ) : mxParent( xParent ), mxContext( xContext ), mxModel( xModel ), mxPageStyleProps( xPageStyleProps ), mbHeader( bHeader ) {} // XIndexAccess - virtual sal_Int32 SAL_CALL getCount( ) throw (uno::RuntimeException, std::exception) override + virtual sal_Int32 SAL_CALL getCount( ) override { // first page, even pages and primary page return 3; } - 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 < 1 || Index > 3 ) throw lang::IndexOutOfBoundsException(); return uno::makeAny( uno::Reference< word::XHeaderFooter >( new SwVbaHeaderFooter( mxParent, mxContext, mxModel, mxPageStyleProps, mbHeader, Index ) ) ); } - virtual uno::Type SAL_CALL getElementType( ) throw (uno::RuntimeException, std::exception) override + virtual uno::Type SAL_CALL getElementType( ) override { return cppu::UnoType<word::XHeaderFooter>::get(); } - virtual sal_Bool SAL_CALL hasElements( ) throw (uno::RuntimeException, std::exception) override + virtual sal_Bool SAL_CALL hasElements( ) override { return true; } @@ -65,12 +65,12 @@ class HeadersFootersEnumWrapper : public EnumerationHelper_BASE sal_Int32 nIndex; public: explicit HeadersFootersEnumWrapper( SwVbaHeadersFooters* _pHeadersFooters ) : pHeadersFooters( _pHeadersFooters ), nIndex( 0 ) {} - virtual sal_Bool SAL_CALL hasMoreElements( ) throw (uno::RuntimeException, std::exception) override + virtual sal_Bool SAL_CALL hasMoreElements( ) override { return ( nIndex < pHeadersFooters->getCount() ); } - virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException, std::exception) override + virtual uno::Any SAL_CALL nextElement( ) override { if ( nIndex < pHeadersFooters->getCount() ) return pHeadersFooters->Item( uno::makeAny( ++nIndex ), uno::Any() ); @@ -82,13 +82,13 @@ SwVbaHeadersFooters::SwVbaHeadersFooters( const uno::Reference< XHelperInterface { } -::sal_Int32 SAL_CALL SwVbaHeadersFooters::getCount() throw (uno::RuntimeException) +::sal_Int32 SAL_CALL SwVbaHeadersFooters::getCount() { // wdHeaderFooterFirstPage, wdHeaderFooterPrimary and wdHeaderFooterEvenPages return 3; } -uno::Any SAL_CALL SwVbaHeadersFooters::Item( const uno::Any& Index1, const uno::Any& ) throw (lang::IndexOutOfBoundsException, uno::RuntimeException) +uno::Any SAL_CALL SwVbaHeadersFooters::Item( const uno::Any& Index1, const uno::Any& ) { sal_Int32 nIndex = 0; Index1 >>= nIndex; @@ -101,13 +101,13 @@ uno::Any SAL_CALL SwVbaHeadersFooters::Item( const uno::Any& Index1, const uno:: // XEnumerationAccess uno::Type -SwVbaHeadersFooters::getElementType() throw (uno::RuntimeException) +SwVbaHeadersFooters::getElementType() { return cppu::UnoType<word::XHeaderFooter>::get(); } uno::Reference< container::XEnumeration > -SwVbaHeadersFooters::createEnumeration() throw (uno::RuntimeException) +SwVbaHeadersFooters::createEnumeration() { return new HeadersFootersEnumWrapper( this ); } |