diff options
author | Noel Grandin <noel@peralex.com> | 2014-05-23 12:03:21 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-05-23 15:06:00 +0200 |
commit | e7bc3cab019fbf040f9fb8b53ae2cf3f977d200b (patch) | |
tree | bc507bccee9fb71134e362b72d22991561e32aa0 /sw/source/ui | |
parent | c5d47c327a57df55fa3dac0fff6b65888d0345e4 (diff) |
remove boilerplate in UNO Exception constructor calls
Now that we have default values for Exception constructor params,
remove lots of boilerplate code.
Change-Id: I620bd641eecfed38e6123873b3b94aaf47922e74
Diffstat (limited to 'sw/source/ui')
25 files changed, 51 insertions, 54 deletions
diff --git a/sw/source/ui/vba/vbaaddin.cxx b/sw/source/ui/vba/vbaaddin.cxx index 2153b5800ca3..4547af5bfd0b 100644 --- a/sw/source/ui/vba/vbaaddin.cxx +++ b/sw/source/ui/vba/vbaaddin.cxx @@ -45,7 +45,7 @@ OUString SAL_CALL SwVbaAddin::getName() throw (uno::RuntimeException, std::excep void SAL_CALL SwVbaAddin::setName( const OUString& ) throw ( css::uno::RuntimeException, std::exception ) { - throw uno::RuntimeException(" Fail to set name", uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException(" Fail to set name" ); } OUString SAL_CALL SwVbaAddin::getPath() throw (uno::RuntimeException, std::exception) diff --git a/sw/source/ui/vba/vbaautotextentry.cxx b/sw/source/ui/vba/vbaautotextentry.cxx index 44c0ca61681d..5d57e3008a6c 100644 --- a/sw/source/ui/vba/vbaautotextentry.cxx +++ b/sw/source/ui/vba/vbaautotextentry.cxx @@ -106,7 +106,7 @@ SwVbaAutoTextEntries::getElementType() throw (uno::RuntimeException) uno::Reference< container::XEnumeration > SwVbaAutoTextEntries::createEnumeration() throw (uno::RuntimeException) { - throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented" ); } uno::Any diff --git a/sw/source/ui/vba/vbabookmark.cxx b/sw/source/ui/vba/vbabookmark.cxx index 1a44ac378a27..1cf332c123a2 100644 --- a/sw/source/ui/vba/vbabookmark.cxx +++ b/sw/source/ui/vba/vbabookmark.cxx @@ -46,7 +46,7 @@ SwVbaBookmark::~SwVbaBookmark() void SwVbaBookmark::checkVality() throw ( uno::RuntimeException ) { if( !mbValid ) - throw uno::RuntimeException("The bookmark is not valid", uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("The bookmark is not valid" ); } void SAL_CALL SwVbaBookmark::Delete() throw ( uno::RuntimeException, std::exception ) diff --git a/sw/source/ui/vba/vbaborders.cxx b/sw/source/ui/vba/vbaborders.cxx index d52141baeb83..907d578097e4 100644 --- a/sw/source/ui/vba/vbaborders.cxx +++ b/sw/source/ui/vba/vbaborders.cxx @@ -220,12 +220,12 @@ public: break; } default: - throw uno::RuntimeException("Bad param", uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Bad param" ); } setBorderLine( aBorderLine ); } else - throw uno::RuntimeException("Method failed", uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Method failed" ); } }; diff --git a/sw/source/ui/vba/vbacheckbox.cxx b/sw/source/ui/vba/vbacheckbox.cxx index 235dd1029e1b..f15f3be9a254 100644 --- a/sw/source/ui/vba/vbacheckbox.cxx +++ b/sw/source/ui/vba/vbacheckbox.cxx @@ -33,8 +33,7 @@ SwVbaCheckBox::SwVbaCheckBox( const uno::Reference< ooo::vba::XHelperInterface > OUString sType = mxFormField->getFieldType(); if( !sType.equalsIgnoreAsciiCaseAscii( ECMA_FORMCHECKBOX ) ) { - throw uno::RuntimeException( OUString( - "It is not a CheckBox"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( "It is not a CheckBox" ); } } diff --git a/sw/source/ui/vba/vbacolumns.cxx b/sw/source/ui/vba/vbacolumns.cxx index c81b3fc6a493..ac78b08e5531 100644 --- a/sw/source/ui/vba/vbacolumns.cxx +++ b/sw/source/ui/vba/vbacolumns.cxx @@ -104,11 +104,11 @@ uno::Any SAL_CALL SwVbaColumns::Item( const uno::Any& Index1, const uno::Any& /* { if( nIndex <= 0 || nIndex > getCount() ) { - throw lang::IndexOutOfBoundsException("Index out of bounds", uno::Reference< uno::XInterface >() ); + throw lang::IndexOutOfBoundsException("Index out of bounds" ); } return uno::makeAny( uno::Reference< word::XColumn >( new SwVbaColumn( this, mxContext, mxTextTable, nIndex - 1 ) ) ); } - throw uno::RuntimeException("Index out of bounds", uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Index out of bounds" ); } // XEnumerationAccess diff --git a/sw/source/ui/vba/vbadocumentproperties.cxx b/sw/source/ui/vba/vbadocumentproperties.cxx index 4c931e5e24c7..eec6963b1d8f 100644 --- a/sw/source/ui/vba/vbadocumentproperties.cxx +++ b/sw/source/ui/vba/vbadocumentproperties.cxx @@ -742,8 +742,7 @@ SwVbaBuiltinDocumentProperties::SwVbaBuiltinDocumentProperties( const uno::Refer uno::Reference< XDocumentProperty > SAL_CALL SwVbaBuiltinDocumentProperties::Add( const OUString& /*Name*/, sal_Bool /*LinkToContent*/, ::sal_Int8 /*Type*/, const uno::Any& /*value*/, const uno::Any& /*LinkSource*/ ) throw (script::BasicErrorException, uno::RuntimeException, std::exception) { - throw uno::RuntimeException( - OUString("not supported for Builtin properties"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( "not supported for Builtin properties" ); } // XEnumerationAccess diff --git a/sw/source/ui/vba/vbafield.cxx b/sw/source/ui/vba/vbafield.cxx index c4c4288f345d..83b3ad164187 100644 --- a/sw/source/ui/vba/vbafield.cxx +++ b/sw/source/ui/vba/vbafield.cxx @@ -336,7 +336,7 @@ SwVbaFields::Add( const css::uno::Reference< ::ooo::vba::word::XRange >& Range, } else { - throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented" ); } SwVbaRange* pVbaRange = dynamic_cast< SwVbaRange* >( Range.get() ); @@ -462,7 +462,7 @@ uno::Reference< text::XTextField > SwVbaFields::Create_Field_DocProperty( const } else if( sFieldService.isEmpty() ) { - throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented" ); } uno::Reference< text::XTextField > xTextField( mxMSF->createInstance( sFieldService ), uno::UNO_QUERY_THROW ); diff --git a/sw/source/ui/vba/vbafind.cxx b/sw/source/ui/vba/vbafind.cxx index aa3e5df97c99..a8460386a50b 100644 --- a/sw/source/ui/vba/vbafind.cxx +++ b/sw/source/ui/vba/vbafind.cxx @@ -192,7 +192,7 @@ uno::Any SAL_CALL SwVbaFind::getReplacement() throw (uno::RuntimeException, std: void SAL_CALL SwVbaFind::setReplacement( const uno::Any& /*_replacement */ ) throw (uno::RuntimeException, std::exception) { - throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented" ); } sal_Bool SAL_CALL SwVbaFind::getForward() throw (uno::RuntimeException, std::exception) @@ -297,12 +297,12 @@ void SAL_CALL SwVbaFind::setMatchAllWordForms( sal_Bool _matchallwordforms ) thr uno::Any SAL_CALL SwVbaFind::getStyle() throw (uno::RuntimeException, std::exception) { - throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented" ); } void SAL_CALL SwVbaFind::setStyle( const uno::Any& /*_style */ ) throw (uno::RuntimeException, std::exception) { - throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented" ); } sal_Bool SAL_CALL diff --git a/sw/source/ui/vba/vbalistformat.cxx b/sw/source/ui/vba/vbalistformat.cxx index e749b78f29e3..9740758e3a92 100644 --- a/sw/source/ui/vba/vbalistformat.cxx +++ b/sw/source/ui/vba/vbalistformat.cxx @@ -86,7 +86,7 @@ void SAL_CALL SwVbaListFormat::ApplyListTemplate( const css::uno::Reference< wor void SAL_CALL SwVbaListFormat::ConvertNumbersToText( ) throw (css::uno::RuntimeException, std::exception) { - throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented" ); } OUString diff --git a/sw/source/ui/vba/vbalistgalleries.cxx b/sw/source/ui/vba/vbalistgalleries.cxx index d33f6a3a0c76..ee66621a8a82 100644 --- a/sw/source/ui/vba/vbalistgalleries.cxx +++ b/sw/source/ui/vba/vbalistgalleries.cxx @@ -62,7 +62,7 @@ uno::Any SAL_CALL SwVbaListGalleries::Item( const uno::Any& Index1, const uno::A || nIndex == word::WdListGalleryType::wdOutlineNumberGallery ) return uno::makeAny( uno::Reference< word::XListGallery >( new SwVbaListGallery( this, mxContext, mxTextDocument, nIndex ) ) ); } - throw uno::RuntimeException("Index out of bounds", uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Index out of bounds" ); } // XEnumerationAccess diff --git a/sw/source/ui/vba/vbalistlevel.cxx b/sw/source/ui/vba/vbalistlevel.cxx index 21148ea5e9b2..1fe4f8fae34e 100644 --- a/sw/source/ui/vba/vbalistlevel.cxx +++ b/sw/source/ui/vba/vbalistlevel.cxx @@ -95,12 +95,12 @@ void SAL_CALL SwVbaListLevel::setAlignment( ::sal_Int32 _alignment ) throw (uno: uno::Reference< ::ooo::vba::word::XFont > SAL_CALL SwVbaListLevel::getFont() throw (uno::RuntimeException, std::exception) { - throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented" ); } void SAL_CALL SwVbaListLevel::setFont( const uno::Reference< ::ooo::vba::word::XFont >& /*_font*/ ) throw (uno::RuntimeException, std::exception) { - throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented" ); } ::sal_Int32 SAL_CALL SwVbaListLevel::getIndex() throw (uno::RuntimeException, std::exception) @@ -212,7 +212,7 @@ void SAL_CALL SwVbaListLevel::setNumberPosition( float _numberposition ) throw ( } default: { - throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented" ); } } return nNumberingType; @@ -285,7 +285,7 @@ void SAL_CALL SwVbaListLevel::setNumberStyle( ::sal_Int32 _numberstyle ) throw ( } default: { - throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented" ); } } diff --git a/sw/source/ui/vba/vbalistlevels.cxx b/sw/source/ui/vba/vbalistlevels.cxx index 5d75bb35ee0f..df174ae5784f 100644 --- a/sw/source/ui/vba/vbalistlevels.cxx +++ b/sw/source/ui/vba/vbalistlevels.cxx @@ -63,7 +63,7 @@ uno::Any SAL_CALL SwVbaListLevels::Item( const uno::Any& Index1, const uno::Any& if( !( Index1 >>= nIndex ) ) throw uno::RuntimeException(); if( nIndex <=0 || nIndex > getCount() ) - throw uno::RuntimeException("Index out of bounds", uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Index out of bounds" ); return uno::makeAny( uno::Reference< word::XListLevel >( new SwVbaListLevel( this, mxContext, pListHelper, nIndex - 1 ) ) ); } diff --git a/sw/source/ui/vba/vbalisttemplates.cxx b/sw/source/ui/vba/vbalisttemplates.cxx index 27a9e4623981..3fa127a36acd 100644 --- a/sw/source/ui/vba/vbalisttemplates.cxx +++ b/sw/source/ui/vba/vbalisttemplates.cxx @@ -57,7 +57,7 @@ uno::Any SAL_CALL SwVbaListTemplates::Item( const uno::Any& Index1, const uno::A if( !( Index1 >>= nIndex ) ) throw uno::RuntimeException(); if( nIndex <=0 || nIndex > getCount() ) - throw uno::RuntimeException("Index out of bounds", uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Index out of bounds" ); return uno::makeAny( uno::Reference< word::XListTemplate >( new SwVbaListTemplate( this, mxContext, mxTextDocument, mnGalleryType, nIndex ) ) ); } diff --git a/sw/source/ui/vba/vbaparagraphformat.cxx b/sw/source/ui/vba/vbaparagraphformat.cxx index 60ac894f6399..dc19f1e25b27 100644 --- a/sw/source/ui/vba/vbaparagraphformat.cxx +++ b/sw/source/ui/vba/vbaparagraphformat.cxx @@ -296,7 +296,7 @@ uno::Any SAL_CALL SwVbaParagraphFormat::getTabStops() throw (uno::RuntimeExcepti void SAL_CALL SwVbaParagraphFormat::setTabStops( const uno::Any& /*_tabstops*/ ) throw (uno::RuntimeException, std::exception) { - throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented" ); } uno::Any SAL_CALL SwVbaParagraphFormat::getWidowControl() throw (uno::RuntimeException, std::exception) diff --git a/sw/source/ui/vba/vbarange.cxx b/sw/source/ui/vba/vbarange.cxx index 3bd95e21ad08..73cd909f2073 100644 --- a/sw/source/ui/vba/vbarange.cxx +++ b/sw/source/ui/vba/vbarange.cxx @@ -72,7 +72,7 @@ void SwVbaRange::initialize( const uno::Reference< text::XTextRange >& rStart, c mxTextCursor = SwVbaRangeHelper::initCursor( rStart, mxText ); if( !mxTextCursor.is() ) - throw uno::RuntimeException("Fails to create text cursor", uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Fails to create text cursor" ); mxTextCursor->collapseToStart(); if( rEnd.is() ) @@ -252,7 +252,7 @@ SwVbaRange::getParagraphFormat() throw ( uno::RuntimeException, std::exception ) void SAL_CALL SwVbaRange::setParagraphFormat( const uno::Reference< word::XParagraphFormat >& /*rParagraphFormat*/ ) throw ( uno::RuntimeException, std::exception ) { - throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented" ); } void SwVbaRange::GetStyleInfo(OUString& aStyleName, OUString& aStyleType ) throw ( uno::RuntimeException ) diff --git a/sw/source/ui/vba/vbarows.cxx b/sw/source/ui/vba/vbarows.cxx index b21b64b90c08..5f7cb92cd7a6 100644 --- a/sw/source/ui/vba/vbarows.cxx +++ b/sw/source/ui/vba/vbarows.cxx @@ -260,9 +260,8 @@ void SwVbaRows::setIndentWithAdjustNone( sal_Int32 indent ) throw (uno::RuntimeE if ((nNewWidth <= 0) || (nWidth <= 0)) { throw uno::RuntimeException( - OUString("Pb with width, in SwVbaRows::setIndentWithAdjustProportional " - "(nNewWidth <= 0) || (nWidth <= 0)"), - uno::Reference< uno::XInterface >() + "Pb with width, in SwVbaRows::setIndentWithAdjustProportional " + "(nNewWidth <= 0) || (nWidth <= 0)" ); } double propFactor = (double)nNewWidth/(double)nWidth; @@ -323,11 +322,11 @@ uno::Any SAL_CALL SwVbaRows::Item( const uno::Any& Index1, const uno::Any& /*not { if( nIndex <= 0 || nIndex > getCount() ) { - throw lang::IndexOutOfBoundsException("Index out of bounds", uno::Reference< uno::XInterface >() ); + throw lang::IndexOutOfBoundsException("Index out of bounds" ); } return uno::makeAny( uno::Reference< word::XRow >( new SwVbaRow( this, mxContext, mxTextTable, nIndex - 1 ) ) ); } - throw uno::RuntimeException("Index out of bounds", uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Index out of bounds" ); } // XEnumerationAccess diff --git a/sw/source/ui/vba/vbasections.cxx b/sw/source/ui/vba/vbasections.cxx index 992a94ab2391..d929357d60a9 100644 --- a/sw/source/ui/vba/vbasections.cxx +++ b/sw/source/ui/vba/vbasections.cxx @@ -148,7 +148,7 @@ SwVbaSections::PageSetup( ) throw (uno::RuntimeException, std::exception) uno::Reference< word::XSection > xSection( m_xIndexAccess->getByIndex( 0 ), uno::UNO_QUERY_THROW ); return xSection->PageSetup(); } - throw uno::RuntimeException("There is no section", uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("There is no section" ); } // XEnumerationAccess diff --git a/sw/source/ui/vba/vbaselection.cxx b/sw/source/ui/vba/vbaselection.cxx index ef5ad0622cbd..ccbb4def25fb 100644 --- a/sw/source/ui/vba/vbaselection.cxx +++ b/sw/source/ui/vba/vbaselection.cxx @@ -92,7 +92,7 @@ uno::Reference< text::XTextRange > SwVbaSelection::GetSelectedRange() throw ( un } else { - throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented" ); } return xTextRange; } @@ -154,7 +154,7 @@ SwVbaSelection::HomeKey( const uno::Any& _unit, const uno::Any& _extend ) throw } default: { - throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented" ); } } } @@ -189,7 +189,7 @@ SwVbaSelection::EndKey( const uno::Any& _unit, const uno::Any& _extend ) throw ( } default: { - throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented" ); } } } @@ -215,7 +215,7 @@ SwVbaSelection::Delete( const uno::Any& _unit, const uno::Any& _count ) throw ( } default: { - throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented" ); } } } @@ -258,7 +258,7 @@ SwVbaSelection::Move( const uno::Any& _unit, const uno::Any& _count, const uno:: { if( eDirection == word::MOVE_LEFT || eDirection == word::MOVE_RIGHT ) { - throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented" ); } uno::Reference< view::XViewCursor > xViewCursor( mxTextViewCursor, uno::UNO_QUERY_THROW ); if( eDirection == word::MOVE_UP ) @@ -271,7 +271,7 @@ SwVbaSelection::Move( const uno::Any& _unit, const uno::Any& _count, const uno:: { if( eDirection == word::MOVE_UP || eDirection == word::MOVE_DOWN ) { - throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented" ); } if( word::gotoSelectedObjectAnchor( mxModel ) ) { @@ -311,7 +311,7 @@ SwVbaSelection::Move( const uno::Any& _unit, const uno::Any& _count, const uno:: { if( eDirection == word::MOVE_LEFT || eDirection == word::MOVE_RIGHT ) { - throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented" ); } uno::Reference< text::XParagraphCursor > xParagraphCursor( xTextCursor, uno::UNO_QUERY_THROW ); for( sal_Int32 i=0; i<nCount; i++ ) @@ -326,7 +326,7 @@ SwVbaSelection::Move( const uno::Any& _unit, const uno::Any& _count, const uno:: { if( eDirection == word::MOVE_UP || eDirection == word::MOVE_DOWN ) { - throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented" ); } uno::Reference< text::XWordCursor > xWordCursor( xTextCursor, uno::UNO_QUERY_THROW ); for( sal_Int32 i=0; i<nCount; i++ ) @@ -343,7 +343,7 @@ SwVbaSelection::Move( const uno::Any& _unit, const uno::Any& _count, const uno:: } default: { - throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented" ); } } } @@ -649,11 +649,11 @@ uno::Reference< word::XRange > SAL_CALL SwVbaSelection::GoTo( const uno::Any& _w if( nPage != 0 ) xPageCursor->jumpToPage( ( sal_Int16 )( nPage ) ); else - throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented" ); break; } default: - throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented" ); } return getRange(); } @@ -765,7 +765,7 @@ uno::Any SAL_CALL SwVbaSelection::Information( sal_Int32 _type ) throw (uno::Run break; } default: - throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented" ); } return result; } diff --git a/sw/source/ui/vba/vbastyles.cxx b/sw/source/ui/vba/vbastyles.cxx index f8ca1d4e0357..530677f4a5ad 100644 --- a/sw/source/ui/vba/vbastyles.cxx +++ b/sw/source/ui/vba/vbastyles.cxx @@ -243,7 +243,7 @@ public: // XEnumerationAccess virtual uno::Reference< container::XEnumeration > SAL_CALL createEnumeration( ) throw (uno::RuntimeException, std::exception) SAL_OVERRIDE { - throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented" ); } }; @@ -343,7 +343,7 @@ SwVbaStyles::Item( const uno::Any& Index1, const uno::Any& Index2 ) else { OSL_TRACE("SwVbaStyles::Item: the builtin style type is not implemented"); - throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented" ); } } } diff --git a/sw/source/ui/vba/vbasystem.cxx b/sw/source/ui/vba/vbasystem.cxx index 4f54c540ed4c..dc95d82f2d2e 100644 --- a/sw/source/ui/vba/vbasystem.cxx +++ b/sw/source/ui/vba/vbasystem.cxx @@ -118,7 +118,7 @@ uno::Any PrivateProfileStringListener::getValueEvent() return uno::makeAny( sValue ); #else - throw uno::RuntimeException("Only support on Windows", uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Only support on Windows" ); #endif } @@ -161,7 +161,7 @@ void PrivateProfileStringListener::setValueEvent( const css::uno::Any& value ) } return; #else - throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented" ); #endif } @@ -229,7 +229,7 @@ SwVbaSystem::setCursor( sal_Int32 _cursor ) throw (uno::RuntimeException, std::e break; } default: - throw uno::RuntimeException("Unknown value for Cursor pointer", uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Unknown value for Cursor pointer" ); // TODO: isn't this a flaw in the API? It should be allowed to throw an // IllegalArgumentException, or so } diff --git a/sw/source/ui/vba/vbatemplate.cxx b/sw/source/ui/vba/vbatemplate.cxx index 02880f48c95f..77fcfa15e3d2 100644 --- a/sw/source/ui/vba/vbatemplate.cxx +++ b/sw/source/ui/vba/vbatemplate.cxx @@ -103,7 +103,7 @@ SwVbaTemplate::AutoTextEntries( const uno::Any& index ) throw (uno::RuntimeExcep } else { - throw uno::RuntimeException("Auto Text Entry doesn't exist", uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Auto Text Entry doesn't exist" ); } uno::Reference< XCollection > xCol( new SwVbaAutoTextEntries( this, mxContext, xGroup ) ); diff --git a/sw/source/ui/vba/vbavariable.cxx b/sw/source/ui/vba/vbavariable.cxx index 1c76b306ff9f..9047bf0e2380 100644 --- a/sw/source/ui/vba/vbavariable.cxx +++ b/sw/source/ui/vba/vbavariable.cxx @@ -44,7 +44,7 @@ SwVbaVariable::getName() throw ( css::uno::RuntimeException, std::exception ) void SAL_CALL SwVbaVariable::setName( const OUString& ) throw ( css::uno::RuntimeException, std::exception ) { - throw uno::RuntimeException(" Fail to set name", uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException(" Fail to set name" ); } uno::Any SAL_CALL diff --git a/sw/source/ui/vba/vbawindow.cxx b/sw/source/ui/vba/vbawindow.cxx index 193a2c16cc1e..232a00f270ec 100644 --- a/sw/source/ui/vba/vbawindow.cxx +++ b/sw/source/ui/vba/vbawindow.cxx @@ -108,7 +108,7 @@ SwVbaWindow::setWindowState( const uno::Any& _windowstate ) throw (uno::RuntimeE else if (nwindowState == word::WdWindowState::wdWindowStateNormal) pWork -> Restore(); else - throw uno::RuntimeException("Invalid Parameter", uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Invalid Parameter" ); } } diff --git a/sw/source/ui/vba/wordvbahelper.cxx b/sw/source/ui/vba/wordvbahelper.cxx index 7bf49e6e2836..4c84a57a9d47 100644 --- a/sw/source/ui/vba/wordvbahelper.cxx +++ b/sw/source/ui/vba/wordvbahelper.cxx @@ -156,7 +156,7 @@ uno::Reference< text::XText > getCurrentXText( const uno::Reference< frame::XMod } if( !xText.is() ) - throw uno::RuntimeException("no text selection", uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("no text selection" ); return xText; } |