diff options
author | sj <sj@openoffice.org> | 2010-09-24 17:02:42 +0200 |
---|---|---|
committer | sj <sj@openoffice.org> | 2010-09-24 17:02:42 +0200 |
commit | 7b1b11b49e449ba2f73b2117d8f7cc9117fcc4bb (patch) | |
tree | 73379f73e516fc334158d42b029bc93430fbf948 /svx | |
parent | b12644eb20d8153243943d22e5923e06afebd637 (diff) |
impress201: #114741# reducing memory footprint if mimimizing very huge documents -> no more graphics lost
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/unodraw/unoshap2.cxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/svx/source/unodraw/unoshap2.cxx b/svx/source/unodraw/unoshap2.cxx index 1f2d4fd3145b..1613f5d652e0 100644 --- a/svx/source/unodraw/unoshap2.cxx +++ b/svx/source/unodraw/unoshap2.cxx @@ -1804,6 +1804,7 @@ bool SvxGraphicObject::getPropertyValueImpl( const ::rtl::OUString& rName, const { case OWN_ATTR_VALUE_FILLBITMAP: { + sal_Bool bSwapped = static_cast< SdrGrafObj* >( mpObj.get() )->IsSwappedOut(); const Graphic& rGraphic = static_cast< SdrGrafObj*>( mpObj.get() )->GetGraphic(); if(rGraphic.GetType() != GRAPHIC_GDIMETAFILE) @@ -1822,6 +1823,8 @@ bool SvxGraphicObject::getPropertyValueImpl( const ::rtl::OUString& rName, const aDestStrm.GetEndOfData()); rValue <<= aSeq; } + if ( bSwapped ) + static_cast< SdrGrafObj* >( mpObj.get() )->ForceSwapOut(); break; } @@ -1833,10 +1836,13 @@ bool SvxGraphicObject::getPropertyValueImpl( const ::rtl::OUString& rName, const } else { + sal_Bool bSwapped = static_cast< SdrGrafObj* >( mpObj.get() )->IsSwappedOut(); const GraphicObject& rGrafObj = static_cast< SdrGrafObj*>( mpObj.get() )->GetGraphicObject(true); OUString aURL( RTL_CONSTASCII_USTRINGPARAM(UNO_NAME_GRAPHOBJ_URLPREFIX)); aURL += OUString::createFromAscii( rGrafObj.GetUniqueID().GetBuffer() ); rValue <<= aURL; + if ( bSwapped ) + static_cast< SdrGrafObj* >( mpObj.get() )->ForceSwapOut(); } break; } @@ -1851,8 +1857,11 @@ bool SvxGraphicObject::getPropertyValueImpl( const ::rtl::OUString& rName, const case OWN_ATTR_VALUE_GRAPHIC: { + sal_Bool bSwapped = static_cast< SdrGrafObj* >( mpObj.get() )->IsSwappedOut(); Reference< graphic::XGraphic > xGraphic( static_cast< SdrGrafObj* >( mpObj.get() )->GetGraphic().GetXGraphic() ); rValue <<= xGraphic; + if ( bSwapped ) + static_cast< SdrGrafObj* >( mpObj.get() )->ForceSwapOut(); break; } |