no need to use UNO_QUERY_THROW here
Change-Id: I01b4e401fec1792829fc2efaad5a74a035a418f2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156476 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
committed by
Noel Grandin
parent
21af3e5b5d
commit
3c7a35dd28
@@ -355,8 +355,9 @@ ScriptEventHelper::~ScriptEventHelper()
|
||||
{
|
||||
try
|
||||
{
|
||||
uno::Reference< lang::XComponent > xComp( m_xControl, uno::UNO_QUERY_THROW );
|
||||
xComp->dispose();
|
||||
uno::Reference< lang::XComponent > xComp( m_xControl, uno::UNO_QUERY );
|
||||
if (xComp)
|
||||
xComp->dispose();
|
||||
}
|
||||
// destructor can't throw
|
||||
catch( uno::Exception& )
|
||||
|
||||
@@ -1471,7 +1471,7 @@ void SwXTextDocument::InitNewDoc()
|
||||
{
|
||||
// #i91798#, #i91895#
|
||||
// dispose XDrawPage here. We are the owner and know that it is no longer in a valid condition.
|
||||
Reference<XComponent>(static_cast<cppu::OWeakObject*>(m_xDrawPage.get()), UNO_QUERY_THROW)->dispose();
|
||||
m_xDrawPage->dispose();
|
||||
m_xDrawPage->InvalidateSwDoc();
|
||||
m_xDrawPage.clear();
|
||||
}
|
||||
|
||||
@@ -285,8 +285,9 @@ private:
|
||||
{
|
||||
try
|
||||
{
|
||||
const Reference< XComponent > xColComp( rEvent.Element, UNO_QUERY_THROW );
|
||||
xColComp->dispose();
|
||||
const Reference< XComponent > xColComp( rEvent.Element, UNO_QUERY );
|
||||
if (xColComp)
|
||||
xColComp->dispose();
|
||||
}
|
||||
catch( const Exception& )
|
||||
{
|
||||
|
||||
@@ -169,8 +169,9 @@ namespace
|
||||
{
|
||||
try
|
||||
{
|
||||
const Reference< XComponent > xComponent( i_component, UNO_QUERY_THROW );
|
||||
xComponent->dispose();
|
||||
const Reference< XComponent > xComponent( i_component, UNO_QUERY );
|
||||
if (xComponent)
|
||||
xComponent->dispose();
|
||||
}
|
||||
catch( const Exception& )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user