summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--svtools/source/misc/embedhlp.cxx17
1 files changed, 12 insertions, 5 deletions
diff --git a/svtools/source/misc/embedhlp.cxx b/svtools/source/misc/embedhlp.cxx
index e074a30424de..d4cbc53220d8 100644
--- a/svtools/source/misc/embedhlp.cxx
+++ b/svtools/source/misc/embedhlp.cxx
@@ -439,11 +439,18 @@ void EmbeddedObjectRef::GetReplacement( bool bUpdate )
const Graphic* EmbeddedObjectRef::GetGraphic( OUString* pMediaType ) const
{
- if ( mpImpl->bNeedUpdate )
- // bNeedUpdate will be set to false while retrieving new replacement
- const_cast < EmbeddedObjectRef* >(this)->GetReplacement( true );
- else if ( !mpImpl->pGraphic )
- const_cast < EmbeddedObjectRef* >(this)->GetReplacement( false );
+ try
+ {
+ if ( mpImpl->bNeedUpdate )
+ // bNeedUpdate will be set to false while retrieving new replacement
+ const_cast < EmbeddedObjectRef* >(this)->GetReplacement(true);
+ else if ( !mpImpl->pGraphic )
+ const_cast < EmbeddedObjectRef* >(this)->GetReplacement(false);
+ }
+ catch( const uno::Exception& ex )
+ {
+ SAL_WARN("svtools.misc", "Something went wrong on getting the graphic: " << ex.Message);
+ }
if ( mpImpl->pGraphic && pMediaType )
*pMediaType = mpImpl->aMediaType;