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, 16 insertions, 2 deletions
diff --git a/toolkit/source/controls/grid/gridcontrol.cxx b/toolkit/source/controls/grid/gridcontrol.cxx
index bd4c12e692f8..0fb9e9695958 100644
--- a/toolkit/source/controls/grid/gridcontrol.cxx
+++ b/toolkit/source/controls/grid/gridcontrol.cxx
@@ -167,8 +167,15 @@ namespace
{
void lcl_dispose_nothrow( const Any& i_component )
{
- if (auto xComponent = i_component.query<XComponent>() )
+ try
+ {
+ const Reference< XComponent > xComponent( i_component, UNO_QUERY_THROW );
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 37f72c701f73..6ef68a6a8845 100644
--- a/toolkit/source/hatchwindow/documentcloser.cxx
+++ b/toolkit/source/hatchwindow/documentcloser.cxx
@@ -124,8 +124,15 @@ IMPL_STATIC_LINK( MainThreadFrameCloserRequest, worker, void*, p, void )
// ignore all the errors
}
- if (auto xCloseable = pMTRequest->m_xFrame.query<util::XCloseable>() )
+ try
+ {
+ uno::Reference< util::XCloseable > xCloseable( pMTRequest->m_xFrame, uno::UNO_QUERY_THROW );
xCloseable->close( true );
+ }
+ catch( uno::Exception& )
+ {
+ // ignore all the errors
+ }
}
delete pMTRequest;