diff options
-rw-r--r-- | sw/source/ui/vba/vbaselection.cxx | 6 | ||||
-rw-r--r-- | sw/source/uibase/uno/unotxdoc.cxx | 4 |
2 files changed, 3 insertions, 7 deletions
diff --git a/sw/source/ui/vba/vbaselection.cxx b/sw/source/ui/vba/vbaselection.cxx index be9eb17b6ef3..fc5017d50aff 100644 --- a/sw/source/ui/vba/vbaselection.cxx +++ b/sw/source/ui/vba/vbaselection.cxx @@ -803,11 +803,7 @@ SwVbaSelection::Tables( const uno::Any& aIndex ) } // if the current selection is a XTextTableCursor and the index is 1 then we can service this request, otherwise we just have to throw - uno::Reference< text::XTextTableCursor > xTextTableCursor( mxModel->getCurrentSelection(), uno::UNO_QUERY ); - - if ( !xTextTableCursor.is() ) - throw uno::RuntimeException(); - + uno::Reference< text::XTextTableCursor > xTextTableCursor( mxModel->getCurrentSelection(), uno::UNO_QUERY_THROW ); SwXTextTableCursor* pTTCursor = dynamic_cast< SwXTextTableCursor* >( xTextTableCursor.get() ); if ( pTTCursor ) { diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx index a6aadb546ad8..cd1e00c94da9 100644 --- a/sw/source/uibase/uno/unotxdoc.cxx +++ b/sw/source/uibase/uno/unotxdoc.cxx @@ -737,8 +737,8 @@ SwUnoCursor* SwXTextDocument::CreateCursorForSearch(Reference< XTextCursor > & x sal_Int32 SwXTextDocument::replaceAll(const Reference< util::XSearchDescriptor > & xDesc) { SolarMutexGuard aGuard; - Reference< XUnoTunnel > xDescTunnel(xDesc, UNO_QUERY); - if(!IsValid() || !xDescTunnel.is() || !xDescTunnel->getSomething(SwXTextSearch::getUnoTunnelId())) + Reference< XUnoTunnel > xDescTunnel(xDesc, UNO_QUERY_THROW); + if(!IsValid() || !xDescTunnel->getSomething(SwXTextSearch::getUnoTunnelId())) throw RuntimeException(); Reference< XTextCursor > xCursor; |