Some simplifications, using UNO_QUERY_THROW
Change-Id: Ieae74cca9d156503b7b75cc2da49b831b17f9633 Reviewed-on: https://gerrit.libreoffice.org/34252 Tested-by: Stephan Bergmann <sbergman@redhat.com> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
This commit is contained in:
+2
-10
@@ -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 )
|
||||
|
||||
Reference in New Issue
Block a user