summaryrefslogtreecommitdiff
path: root/xmloff/source/core
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2024-08-13 11:35:17 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2024-08-13 19:36:37 +0200
commitade52eb721524e3717f47ccd97e0aa2018b96cb0 (patch)
tree7293c6b5bf077d14479ca3f714cf0a1942d1f709 /xmloff/source/core
parentcd72aca086ff84467d51f6864c58648c3322c53f (diff)
use less exception throwing for flow control
Change-Id: I7ad023479229f89918e588eb8dc7431b5830b45d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171813 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff/source/core')
-rw-r--r--xmloff/source/core/XMLEmbeddedObjectImportContext.cxx14
1 files changed, 9 insertions, 5 deletions
diff --git a/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx b/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx
index 91b9ee234954..25b0522ab28f 100644
--- a/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx
+++ b/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx
@@ -123,8 +123,9 @@ void XMLEmbeddedObjectImportContext::SetComponent( Reference< XComponent > const
try
{
- Reference < XModifiable2 > xModifiable2( rComp, UNO_QUERY_THROW );
- xModifiable2->disableSetModified();
+ Reference < XModifiable2 > xModifiable2( rComp, UNO_QUERY );
+ if (xModifiable2)
+ xModifiable2->disableSetModified();
}
catch( Exception& )
{
@@ -243,9 +244,12 @@ void XMLEmbeddedObjectImportContext::endFastElement(sal_Int32 nElement)
try
{
- Reference < XModifiable2 > xModifiable2( xComp, UNO_QUERY_THROW );
- xModifiable2->enableSetModified();
- xModifiable2->setModified( true ); // trigger new replacement image generation
+ Reference < XModifiable2 > xModifiable2( xComp, UNO_QUERY );
+ if (xModifiable2)
+ {
+ xModifiable2->enableSetModified();
+ xModifiable2->setModified( true ); // trigger new replacement image generation
+ }
}
catch( Exception& )
{