summaryrefslogtreecommitdiff
path: root/toolkit
diff options
context:
space:
mode:
Diffstat (limited to 'toolkit')
-rw-r--r--toolkit/source/controls/grid/gridcontrol.cxx9
-rw-r--r--toolkit/source/hatchwindow/documentcloser.cxx9
2 files changed, 2 insertions, 16 deletions
diff --git a/toolkit/source/controls/grid/gridcontrol.cxx b/toolkit/source/controls/grid/gridcontrol.cxx
index 0fb9e9695958..bd4c12e692f8 100644
--- a/toolkit/source/controls/grid/gridcontrol.cxx
+++ b/toolkit/source/controls/grid/gridcontrol.cxx
@@ -167,15 +167,8 @@ namespace
{
void lcl_dispose_nothrow( const Any& i_component )
{
- try
- {
- const Reference< XComponent > xComponent( i_component, UNO_QUERY_THROW );
+ if (auto xComponent = i_component.query<XComponent>() )
xComponent->dispose();
- }
- catch( const Exception& )
- {
- DBG_UNHANDLED_EXCEPTION("toolkit.controls");
- }
}
}
diff --git a/toolkit/source/hatchwindow/documentcloser.cxx b/toolkit/source/hatchwindow/documentcloser.cxx
index 6ef68a6a8845..37f72c701f73 100644
--- a/toolkit/source/hatchwindow/documentcloser.cxx
+++ b/toolkit/source/hatchwindow/documentcloser.cxx
@@ -124,15 +124,8 @@ IMPL_STATIC_LINK( MainThreadFrameCloserRequest, worker, void*, p, void )
// ignore all the errors
}
- try
- {
- uno::Reference< util::XCloseable > xCloseable( pMTRequest->m_xFrame, uno::UNO_QUERY_THROW );
+ if (auto xCloseable = pMTRequest->m_xFrame.query<util::XCloseable>() )
xCloseable->close( true );
- }
- catch( uno::Exception& )
- {
- // ignore all the errors
- }
}
delete pMTRequest;