From cf78f9c05aaef427c3907ebb7a2ce7247ed27273 Mon Sep 17 00:00:00 2001 From: Zolnai Tamás Date: Thu, 30 Oct 2014 11:55:52 +0100 Subject: SvxGraphicObject: remove more manual swap out calls Tested with importing large *.rtf and *.docx test documents with lots of images -> auto swapp out works. Change-Id: Ib040edaa89c9bcb966c58b75f0392e6d9f7a165e --- svx/source/unodraw/unoshap2.cxx | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/svx/source/unodraw/unoshap2.cxx b/svx/source/unodraw/unoshap2.cxx index 7ef783103193..263ec03e8b7d 100644 --- a/svx/source/unodraw/unoshap2.cxx +++ b/svx/source/unodraw/unoshap2.cxx @@ -1537,7 +1537,6 @@ bool SvxGraphicObject::setPropertyValueImpl( const OUString& rName, const SfxIte if( mpObj.is() ) { static_cast(mpObj.get())->SetGrafStreamURL( aStreamURL ); - static_cast(mpObj.get())->ForceSwapOut(); } bOk = true; } @@ -1575,7 +1574,6 @@ bool SvxGraphicObject::getPropertyValueImpl( const OUString& rName, const SfxIte { case OWN_ATTR_VALUE_FILLBITMAP: { - bool bSwapped = static_cast< SdrGrafObj* >( mpObj.get() )->IsSwappedOut(); const Graphic& rGraphic = static_cast< SdrGrafObj*>( mpObj.get() )->GetGraphic(); if(rGraphic.GetType() != GRAPHIC_GDIMETAFILE) @@ -1594,8 +1592,6 @@ bool SvxGraphicObject::getPropertyValueImpl( const OUString& rName, const SfxIte aDestStrm.GetEndOfData()); rValue <<= aSeq; } - if ( bSwapped ) - static_cast< SdrGrafObj* >( mpObj.get() )->ForceSwapOut(); break; } @@ -1607,13 +1603,10 @@ bool SvxGraphicObject::getPropertyValueImpl( const OUString& rName, const SfxIte } else { - bool bSwapped = static_cast< SdrGrafObj* >( mpObj.get() )->IsSwappedOut(); const GraphicObject& rGrafObj = static_cast< SdrGrafObj*>( mpObj.get() )->GetGraphicObject(true); OUString aURL( UNO_NAME_GRAPHOBJ_URLPREFIX); aURL += OStringToOUString(rGrafObj.GetUniqueID(), RTL_TEXTENCODING_ASCII_US); rValue <<= aURL; - if ( bSwapped ) - static_cast< SdrGrafObj* >( mpObj.get() )->ForceSwapOut(); } break; } @@ -1642,11 +1635,8 @@ bool SvxGraphicObject::getPropertyValueImpl( const OUString& rName, const SfxIte case OWN_ATTR_VALUE_GRAPHIC: { - 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; } -- cgit