diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-02-25 21:31:58 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-02-26 18:22:20 +0100 |
commit | 5e21a413c788f839a66d9e4c14e745ed18058db8 (patch) | |
tree | d4451246461346a425ad6f796e08bf1514cdd942 /sw/source/ui/vba/vbadocument.cxx | |
parent | 6fc2bd0094a23aafadeef3f4a8c2803d621a588d (diff) |
cppuhelper: retrofit std::exception into overriding exception specs
Change-Id: I56e32131b7991ee9948ce46765632eb823d463b3
Diffstat (limited to 'sw/source/ui/vba/vbadocument.cxx')
-rw-r--r-- | sw/source/ui/vba/vbadocument.cxx | 80 |
1 files changed, 40 insertions, 40 deletions
diff --git a/sw/source/ui/vba/vbadocument.cxx b/sw/source/ui/vba/vbadocument.cxx index 9752dde5c088..6099964ce13c 100644 --- a/sw/source/ui/vba/vbadocument.cxx +++ b/sw/source/ui/vba/vbadocument.cxx @@ -73,7 +73,7 @@ void SwVbaDocument::Initialize() } uno::Reference< word::XRange > SAL_CALL -SwVbaDocument::getContent() throw ( uno::RuntimeException ) +SwVbaDocument::getContent() throw ( uno::RuntimeException, std::exception ) { uno::Reference< text::XTextRange > xStart = mxTextDocument->getText()->getStart(); uno::Reference< text::XTextRange > xEnd; @@ -81,7 +81,7 @@ SwVbaDocument::getContent() throw ( uno::RuntimeException ) } uno::Reference< word::XRange > SAL_CALL -SwVbaDocument::Range( const uno::Any& rStart, const uno::Any& rEnd ) throw ( uno::RuntimeException ) +SwVbaDocument::Range( const uno::Any& rStart, const uno::Any& rEnd ) throw ( uno::RuntimeException, std::exception ) { if( !rStart.hasValue() && !rEnd.hasValue() ) return getContent(); @@ -125,7 +125,7 @@ SwVbaDocument::Range( const uno::Any& rStart, const uno::Any& rEnd ) throw ( uno } uno::Any SAL_CALL -SwVbaDocument::BuiltInDocumentProperties( const uno::Any& index ) throw (uno::RuntimeException) +SwVbaDocument::BuiltInDocumentProperties( const uno::Any& index ) throw (uno::RuntimeException, std::exception) { uno::Reference< XCollection > xCol( new SwVbaBuiltinDocumentProperties( mxParent, mxContext, getModel() ) ); if ( index.hasValue() ) @@ -134,7 +134,7 @@ SwVbaDocument::BuiltInDocumentProperties( const uno::Any& index ) throw (uno::Ru } uno::Any SAL_CALL -SwVbaDocument::CustomDocumentProperties( const uno::Any& index ) throw (uno::RuntimeException) +SwVbaDocument::CustomDocumentProperties( const uno::Any& index ) throw (uno::RuntimeException, std::exception) { uno::Reference< XCollection > xCol( new SwVbaCustomDocumentProperties( mxParent, mxContext, getModel() ) ); if ( index.hasValue() ) @@ -143,7 +143,7 @@ SwVbaDocument::CustomDocumentProperties( const uno::Any& index ) throw (uno::Run } uno::Any SAL_CALL -SwVbaDocument::Bookmarks( const uno::Any& rIndex ) throw ( uno::RuntimeException ) +SwVbaDocument::Bookmarks( const uno::Any& rIndex ) throw ( uno::RuntimeException, std::exception ) { uno::Reference< text::XBookmarksSupplier > xBookmarksSupplier( getModel(),uno::UNO_QUERY_THROW ); uno::Reference<container::XIndexAccess > xBookmarks( xBookmarksSupplier->getBookmarks(), uno::UNO_QUERY_THROW ); @@ -155,7 +155,7 @@ SwVbaDocument::Bookmarks( const uno::Any& rIndex ) throw ( uno::RuntimeException } uno::Any SAL_CALL -SwVbaDocument::Variables( const uno::Any& rIndex ) throw ( uno::RuntimeException ) +SwVbaDocument::Variables( const uno::Any& rIndex ) throw ( uno::RuntimeException, std::exception ) { uno::Reference< document::XDocumentPropertiesSupplier > xDocumentPropertiesSupplier( getModel(),uno::UNO_QUERY_THROW ); uno::Reference< document::XDocumentProperties > xDocumentProperties = xDocumentPropertiesSupplier->getDocumentProperties(); @@ -169,7 +169,7 @@ SwVbaDocument::Variables( const uno::Any& rIndex ) throw ( uno::RuntimeException } uno::Any SAL_CALL -SwVbaDocument::Paragraphs( const uno::Any& index ) throw (uno::RuntimeException) +SwVbaDocument::Paragraphs( const uno::Any& index ) throw (uno::RuntimeException, std::exception) { uno::Reference< XCollection > xCol( new SwVbaParagraphs( mxParent, mxContext, mxTextDocument ) ); if ( index.hasValue() ) @@ -178,7 +178,7 @@ SwVbaDocument::Paragraphs( const uno::Any& index ) throw (uno::RuntimeException) } uno::Any SAL_CALL -SwVbaDocument::Styles( const uno::Any& index ) throw (uno::RuntimeException) +SwVbaDocument::Styles( const uno::Any& index ) throw (uno::RuntimeException, std::exception) { uno::Reference< XCollection > xCol( new SwVbaStyles( mxParent, mxContext, getModel() ) ); if ( index.hasValue() ) @@ -187,7 +187,7 @@ SwVbaDocument::Styles( const uno::Any& index ) throw (uno::RuntimeException) } uno::Any SAL_CALL -SwVbaDocument::Fields( const uno::Any& index ) throw (uno::RuntimeException) +SwVbaDocument::Fields( const uno::Any& index ) throw (uno::RuntimeException, std::exception) { uno::Reference< XCollection > xCol( new SwVbaFields( mxParent, mxContext, getModel() ) ); if ( index.hasValue() ) @@ -196,7 +196,7 @@ SwVbaDocument::Fields( const uno::Any& index ) throw (uno::RuntimeException) } uno::Any SAL_CALL -SwVbaDocument::Shapes( const uno::Any& index ) throw (uno::RuntimeException) +SwVbaDocument::Shapes( const uno::Any& index ) throw (uno::RuntimeException, std::exception) { uno::Reference< drawing::XDrawPageSupplier > xDrawPageSupplier( getModel(), uno::UNO_QUERY_THROW ); uno::Reference< container::XIndexAccess > xIndexAccess( xDrawPageSupplier->getDrawPage(), uno::UNO_QUERY_THROW ); @@ -209,7 +209,7 @@ SwVbaDocument::Shapes( const uno::Any& index ) throw (uno::RuntimeException) } uno::Any SAL_CALL -SwVbaDocument::Sections( const uno::Any& index ) throw (uno::RuntimeException) +SwVbaDocument::Sections( const uno::Any& index ) throw (uno::RuntimeException, std::exception) { uno::Reference< XCollection > xCol( new SwVbaSections( mxParent, mxContext, getModel() ) ); if ( index.hasValue() ) @@ -218,7 +218,7 @@ SwVbaDocument::Sections( const uno::Any& index ) throw (uno::RuntimeException) } uno::Any SAL_CALL -SwVbaDocument::TablesOfContents( const uno::Any& index ) throw (uno::RuntimeException) +SwVbaDocument::TablesOfContents( const uno::Any& index ) throw (uno::RuntimeException, std::exception) { uno::Reference< XCollection > xCol( new SwVbaTablesOfContents( this, mxContext, mxTextDocument ) ); if ( index.hasValue() ) @@ -227,14 +227,14 @@ SwVbaDocument::TablesOfContents( const uno::Any& index ) throw (uno::RuntimeExce } uno::Any SAL_CALL -SwVbaDocument::FormFields( const uno::Any& /*index*/ ) throw (uno::RuntimeException) +SwVbaDocument::FormFields( const uno::Any& /*index*/ ) throw (uno::RuntimeException, std::exception) { uno::Reference< XCollection > xCol; return uno::makeAny( xCol ); } uno::Any SAL_CALL -SwVbaDocument::PageSetup( ) throw (uno::RuntimeException) +SwVbaDocument::PageSetup( ) throw (uno::RuntimeException, std::exception) { uno::Reference< beans::XPropertySet > xPageProps( word::getCurrentPageStyle( mxModel ), uno::UNO_QUERY_THROW ); return uno::makeAny( uno::Reference< word::XPageSetup >( new SwVbaPageSetup( this, mxContext, mxModel, xPageProps ) ) ); @@ -247,7 +247,7 @@ SwVbaDocument::getServiceImplName() } uno::Any SAL_CALL -SwVbaDocument::getAttachedTemplate() throw (uno::RuntimeException) +SwVbaDocument::getAttachedTemplate() throw (uno::RuntimeException, std::exception) { uno::Reference< word::XTemplate > xTemplate; uno::Reference<document::XDocumentPropertiesSupplier> const xDocPropSupp( @@ -260,7 +260,7 @@ SwVbaDocument::getAttachedTemplate() throw (uno::RuntimeException) } void SAL_CALL -SwVbaDocument::setAttachedTemplate( const css::uno::Any& _attachedtemplate ) throw (uno::RuntimeException) +SwVbaDocument::setAttachedTemplate( const css::uno::Any& _attachedtemplate ) throw (uno::RuntimeException, std::exception) { OUString sTemplate; if( !( _attachedtemplate >>= sTemplate ) ) @@ -284,7 +284,7 @@ SwVbaDocument::setAttachedTemplate( const css::uno::Any& _attachedtemplate ) thr } uno::Any SAL_CALL -SwVbaDocument::Tables( const css::uno::Any& aIndex ) throw (uno::RuntimeException) +SwVbaDocument::Tables( const css::uno::Any& aIndex ) throw (uno::RuntimeException, std::exception) { uno::Reference< frame::XModel > xModel( mxTextDocument, uno::UNO_QUERY_THROW ); uno::Reference< XCollection > xColl( new SwVbaTables( mxParent, mxContext, xModel ) ); @@ -294,34 +294,34 @@ SwVbaDocument::Tables( const css::uno::Any& aIndex ) throw (uno::RuntimeExceptio return uno::makeAny( xColl ); } -void SAL_CALL SwVbaDocument::Activate() throw (uno::RuntimeException) +void SAL_CALL SwVbaDocument::Activate() throw (uno::RuntimeException, std::exception) { VbaDocumentBase::Activate(); } -::sal_Int32 SAL_CALL SwVbaDocument::getProtectionType() throw (css::uno::RuntimeException) +::sal_Int32 SAL_CALL SwVbaDocument::getProtectionType() throw (css::uno::RuntimeException, std::exception) { //TODO return word::WdProtectionType::wdNoProtection; } -void SAL_CALL SwVbaDocument::setProtectionType( ::sal_Int32 /*_protectiontype*/ ) throw (css::uno::RuntimeException) +void SAL_CALL SwVbaDocument::setProtectionType( ::sal_Int32 /*_protectiontype*/ ) throw (css::uno::RuntimeException, std::exception) { //TODO } -::sal_Bool SAL_CALL SwVbaDocument::getUpdateStylesOnOpen() throw (css::uno::RuntimeException) +::sal_Bool SAL_CALL SwVbaDocument::getUpdateStylesOnOpen() throw (css::uno::RuntimeException, std::exception) { //TODO return sal_False; } -void SAL_CALL SwVbaDocument::setUpdateStylesOnOpen( ::sal_Bool /*_updatestylesonopen*/ ) throw (uno::RuntimeException) +void SAL_CALL SwVbaDocument::setUpdateStylesOnOpen( ::sal_Bool /*_updatestylesonopen*/ ) throw (uno::RuntimeException, std::exception) { //TODO } -::sal_Bool SAL_CALL SwVbaDocument::getAutoHyphenation() throw (uno::RuntimeException) +::sal_Bool SAL_CALL SwVbaDocument::getAutoHyphenation() throw (uno::RuntimeException, std::exception) { // check this property only in default paragraph style sal_Bool IsAutoHyphenation = sal_False; @@ -330,25 +330,25 @@ void SAL_CALL SwVbaDocument::setUpdateStylesOnOpen( ::sal_Bool /*_updatestyleson return IsAutoHyphenation; } -void SAL_CALL SwVbaDocument::setAutoHyphenation( ::sal_Bool _autohyphenation ) throw (uno::RuntimeException) +void SAL_CALL SwVbaDocument::setAutoHyphenation( ::sal_Bool _autohyphenation ) throw (uno::RuntimeException, std::exception) { //TODO uno::Reference< beans::XPropertySet > xParaProps( word::getDefaultParagraphStyle( getModel() ), uno::UNO_QUERY_THROW ); xParaProps->setPropertyValue("ParaIsHyphenation", uno::makeAny( _autohyphenation ) ); } -::sal_Int32 SAL_CALL SwVbaDocument::getHyphenationZone() throw (uno::RuntimeException) +::sal_Int32 SAL_CALL SwVbaDocument::getHyphenationZone() throw (uno::RuntimeException, std::exception) { //TODO return 0; } -void SAL_CALL SwVbaDocument::setHyphenationZone( ::sal_Int32 /*_hyphenationzone*/ ) throw (uno::RuntimeException) +void SAL_CALL SwVbaDocument::setHyphenationZone( ::sal_Int32 /*_hyphenationzone*/ ) throw (uno::RuntimeException, std::exception) { //TODO } -::sal_Int32 SAL_CALL SwVbaDocument::getConsecutiveHyphensLimit() throw (uno::RuntimeException) +::sal_Int32 SAL_CALL SwVbaDocument::getConsecutiveHyphensLimit() throw (uno::RuntimeException, std::exception) { //TODO sal_Int16 nHyphensLimit = 0; @@ -357,38 +357,38 @@ void SAL_CALL SwVbaDocument::setHyphenationZone( ::sal_Int32 /*_hyphenationzone* return nHyphensLimit; } -void SAL_CALL SwVbaDocument::setConsecutiveHyphensLimit( ::sal_Int32 _consecutivehyphenslimit ) throw (uno::RuntimeException) +void SAL_CALL SwVbaDocument::setConsecutiveHyphensLimit( ::sal_Int32 _consecutivehyphenslimit ) throw (uno::RuntimeException, std::exception) { sal_Int16 nHyphensLimit = static_cast< sal_Int16 >( _consecutivehyphenslimit ); uno::Reference< beans::XPropertySet > xParaProps( word::getDefaultParagraphStyle( getModel() ), uno::UNO_QUERY_THROW ); xParaProps->setPropertyValue("ParaHyphenationMaxHyphens", uno::makeAny( nHyphensLimit ) ); } -void SAL_CALL SwVbaDocument::Protect( ::sal_Int32 /*Type*/, const uno::Any& /*NOReset*/, const uno::Any& /*Password*/, const uno::Any& /*UseIRM*/, const uno::Any& /*EnforceStyleLock*/ ) throw (uno::RuntimeException) +void SAL_CALL SwVbaDocument::Protect( ::sal_Int32 /*Type*/, const uno::Any& /*NOReset*/, const uno::Any& /*Password*/, const uno::Any& /*UseIRM*/, const uno::Any& /*EnforceStyleLock*/ ) throw (uno::RuntimeException, std::exception) { // Seems not support in Writer // VbaDocumentBase::Protect( Password ); } -void SAL_CALL SwVbaDocument::PrintOut( const uno::Any& /*Background*/, const uno::Any& /*Append*/, const uno::Any& /*Range*/, const uno::Any& /*OutputFileName*/, const uno::Any& /*From*/, const uno::Any& /*To*/, const uno::Any& /*Item*/, const uno::Any& /*Copies*/, const uno::Any& /*Pages*/, const uno::Any& /*PageType*/, const uno::Any& /*PrintToFile*/, const uno::Any& /*Collate*/, const uno::Any& /*FileName*/, const uno::Any& /*ActivePrinterMacGX*/, const uno::Any& /*ManualDuplexPrint*/, const uno::Any& /*PrintZoomColumn*/, const uno::Any& /*PrintZoomRow*/, const uno::Any& /*PrintZoomPaperWidth*/, const uno::Any& /*PrintZoomPaperHeight*/ ) throw (uno::RuntimeException) +void SAL_CALL SwVbaDocument::PrintOut( const uno::Any& /*Background*/, const uno::Any& /*Append*/, const uno::Any& /*Range*/, const uno::Any& /*OutputFileName*/, const uno::Any& /*From*/, const uno::Any& /*To*/, const uno::Any& /*Item*/, const uno::Any& /*Copies*/, const uno::Any& /*Pages*/, const uno::Any& /*PageType*/, const uno::Any& /*PrintToFile*/, const uno::Any& /*Collate*/, const uno::Any& /*FileName*/, const uno::Any& /*ActivePrinterMacGX*/, const uno::Any& /*ManualDuplexPrint*/, const uno::Any& /*PrintZoomColumn*/, const uno::Any& /*PrintZoomRow*/, const uno::Any& /*PrintZoomPaperWidth*/, const uno::Any& /*PrintZoomPaperHeight*/ ) throw (uno::RuntimeException, std::exception) { //TODO } -void SAL_CALL SwVbaDocument::PrintPreview( ) throw (uno::RuntimeException) +void SAL_CALL SwVbaDocument::PrintPreview( ) throw (uno::RuntimeException, std::exception) { OUString url = ".uno:PrintPreview"; dispatchRequests( mxModel,url ); } -void SAL_CALL SwVbaDocument::ClosePrintPreview( ) throw (uno::RuntimeException) +void SAL_CALL SwVbaDocument::ClosePrintPreview( ) throw (uno::RuntimeException, std::exception) { OUString url = ".uno:ClosePreview"; dispatchRequests( mxModel,url ); } uno::Any SAL_CALL -SwVbaDocument::Revisions( const uno::Any& index ) throw (uno::RuntimeException) +SwVbaDocument::Revisions( const uno::Any& index ) throw (uno::RuntimeException, std::exception) { uno::Reference< document::XRedlinesSupplier > xRedlinesSupp( mxTextDocument, uno::UNO_QUERY_THROW ); uno::Reference< container::XIndexAccess > xRedlines( xRedlinesSupp->getRedlines(), uno::UNO_QUERY_THROW ); @@ -399,7 +399,7 @@ SwVbaDocument::Revisions( const uno::Any& index ) throw (uno::RuntimeException) } uno::Any SAL_CALL -SwVbaDocument::Frames( const uno::Any& index ) throw (uno::RuntimeException) +SwVbaDocument::Frames( const uno::Any& index ) throw (uno::RuntimeException, std::exception) { uno::Reference< text::XTextFramesSupplier > xTextFramesSupp( mxTextDocument, uno::UNO_QUERY_THROW ); uno::Reference< container::XIndexAccess > xFrames( xTextFramesSupp->getTextFrames(), uno::UNO_QUERY_THROW ); @@ -434,13 +434,13 @@ SwVbaDocument::getControlShape( const OUString& sName ) } uno::Reference< beans::XIntrospectionAccess > SAL_CALL -SwVbaDocument::getIntrospection( ) throw (uno::RuntimeException) +SwVbaDocument::getIntrospection( ) throw (uno::RuntimeException, std::exception) { return uno::Reference< beans::XIntrospectionAccess >(); } uno::Any SAL_CALL -SwVbaDocument::invoke( const OUString& aFunctionName, const uno::Sequence< uno::Any >& /*aParams*/, uno::Sequence< ::sal_Int16 >& /*aOutParamIndex*/, uno::Sequence< uno::Any >& /*aOutParam*/ ) throw (lang::IllegalArgumentException, script::CannotConvertException, reflection::InvocationTargetException, uno::RuntimeException) +SwVbaDocument::invoke( const OUString& aFunctionName, const uno::Sequence< uno::Any >& /*aParams*/, uno::Sequence< ::sal_Int16 >& /*aOutParamIndex*/, uno::Sequence< uno::Any >& /*aOutParam*/ ) throw (lang::IllegalArgumentException, script::CannotConvertException, reflection::InvocationTargetException, uno::RuntimeException, std::exception) { OSL_TRACE("** SwVbaDocument::invoke( %s ), will barf", OUStringToOString( aFunctionName, RTL_TEXTENCODING_UTF8 ).getStr() ); @@ -449,12 +449,12 @@ SwVbaDocument::invoke( const OUString& aFunctionName, const uno::Sequence< uno:: } void SAL_CALL -SwVbaDocument::setValue( const OUString& /*aPropertyName*/, const uno::Any& /*aValue*/ ) throw (beans::UnknownPropertyException, script::CannotConvertException, reflection::InvocationTargetException, uno::RuntimeException) +SwVbaDocument::setValue( const OUString& /*aPropertyName*/, const uno::Any& /*aValue*/ ) throw (beans::UnknownPropertyException, script::CannotConvertException, reflection::InvocationTargetException, uno::RuntimeException, std::exception) { throw uno::RuntimeException(); // unsupported operation } uno::Any SAL_CALL -SwVbaDocument::getValue( const OUString& aPropertyName ) throw (beans::UnknownPropertyException, uno::RuntimeException) +SwVbaDocument::getValue( const OUString& aPropertyName ) throw (beans::UnknownPropertyException, uno::RuntimeException, std::exception) { uno::Reference< drawing::XControlShape > xControlShape( getControlShape( aPropertyName ), uno::UNO_QUERY_THROW ); @@ -465,13 +465,13 @@ SwVbaDocument::getValue( const OUString& aPropertyName ) throw (beans::UnknownPr } ::sal_Bool SAL_CALL -SwVbaDocument::hasMethod( const OUString& /*aName*/ ) throw (uno::RuntimeException) +SwVbaDocument::hasMethod( const OUString& /*aName*/ ) throw (uno::RuntimeException, std::exception) { return sal_False; } ::sal_Bool SAL_CALL -SwVbaDocument::hasProperty( const OUString& aName ) throw (uno::RuntimeException) +SwVbaDocument::hasProperty( const OUString& aName ) throw (uno::RuntimeException, std::exception) { uno::Reference< container::XNameAccess > xFormControls( getFormControls() ); if ( xFormControls.is() ) |