Some simplifications, using UNO_QUERY_THROW
Change-Id: I1a2239b596201bc0172f2a6ade177c10491be9c2 Reviewed-on: https://gerrit.libreoffice.org/34255 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
This commit is contained in:
parent
c68b5c36cd
commit
5ed0dc5841
@ -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 )
|
||||
{
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user