From 4c02edafa2fb5dcd52c9dae62c5b4ce285e28961 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 14 Feb 2017 16:09:37 +0100 Subject: [PATCH] Some simplifications, using UNO_QUERY_THROW Change-Id: Ieae74cca9d156503b7b75cc2da49b831b17f9633 Reviewed-on: https://gerrit.libreoffice.org/34252 Tested-by: Stephan Bergmann Reviewed-by: Stephan Bergmann --- uui/source/iahndl.cxx | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/uui/source/iahndl.cxx b/uui/source/iahndl.cxx index fe4aebb6379c..e97be349a459 100644 --- a/uui/source/iahndl.cxx +++ b/uui/source/iahndl.cxx @@ -894,11 +894,7 @@ UUIInteractionHelper::getInteractionHandlerList( throw uno::RuntimeException("unable to instanciate config access"); uno::Reference< container::XNameAccess > xNameAccess( - xInterface, uno::UNO_QUERY ); - if ( !xNameAccess.is() ) - throw uno::RuntimeException( - "config access does not implement XNameAccess"); - + xInterface, uno::UNO_QUERY_THROW ); uno::Sequence< OUString > aElems = xNameAccess->getElementNames(); const OUString* pElems = aElems.getConstArray(); sal_Int32 nCount = aElems.getLength(); @@ -906,11 +902,7 @@ UUIInteractionHelper::getInteractionHandlerList( if ( nCount > 0 ) { uno::Reference< container::XHierarchicalNameAccess > - xHierNameAccess( xInterface, uno::UNO_QUERY ); - - if ( !xHierNameAccess.is() ) - throw uno::RuntimeException( - "config access does not implement XHierarchicalNameAccess"); + xHierNameAccess( xInterface, uno::UNO_QUERY_THROW ); // Iterate over children. for ( sal_Int32 n = 0; n < nCount; ++n )