diff options
Diffstat (limited to 'svx/source/svdraw/svdograf.cxx')
-rw-r--r-- | svx/source/svdraw/svdograf.cxx | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx index 7cf57b07fd7d..91bf6e1a125d 100644 --- a/svx/source/svdraw/svdograf.cxx +++ b/svx/source/svdraw/svdograf.cxx @@ -562,7 +562,7 @@ OUString SdrGrafObj::GetGrafStreamURL() const void SdrGrafObj::ForceSwapIn() const { - if( mbIsPreview ) + if( mbIsPreview && pGraphic->HasUserData() ) { // removing preview graphic const OUString aUserData( pGraphic->GetUserData() ); @@ -1353,9 +1353,15 @@ IMPL_LINK( SdrGrafObj, ImpSwapHdl, GraphicObject*, pO ) GRFILTER_FORMAT_DONTKNOW, NULL, 0, pFilterData.get())) { const OUString aNewUserData( pGraphic->GetUserData() ); - pGraphic->SetGraphic( aGraphic ); - pGraphic->SetUserData(); + if( mbIsPreview ) + { + pGraphic->SetUserData(aNewUserData); + } + else + { + pGraphic->SetUserData(); + } // Graphic successfully swapped in. pRet = GRFMGR_AUTOSWAPSTREAM_LOADED; |