[Libreoffice-commits] core.git: Branch 'feature/perfwork4' - svx/source

Zolnai Tamás tamas.zolnai at collabora.com
Thu Oct 30 10:58:59 PDT 2014


 svx/source/unodraw/unoshap2.cxx |   10 ----------
 1 file changed, 10 deletions(-)

New commits:
commit 3339f12d2a155ef59d5d6221f740be3f13ace942
Author: Zolnai Tamás <tamas.zolnai at collabora.com>
Date:   Thu Oct 30 11:55:52 2014 +0100

    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

diff --git a/svx/source/unodraw/unoshap2.cxx b/svx/source/unodraw/unoshap2.cxx
index a3b791e..818e8ab 100644
--- a/svx/source/unodraw/unoshap2.cxx
+++ b/svx/source/unodraw/unoshap2.cxx
@@ -1540,7 +1540,6 @@ bool SvxGraphicObject::setPropertyValueImpl( const OUString& rName, const SfxIte
             if( mpObj.is() )
             {
                 static_cast<SdrGrafObj*>(mpObj.get())->SetGrafStreamURL( aStreamURL );
-                static_cast<SdrGrafObj*>(mpObj.get())->ForceSwapOut();
             }
             bOk = true;
         }
@@ -1578,7 +1577,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)
@@ -1597,8 +1595,6 @@ bool SvxGraphicObject::getPropertyValueImpl( const OUString& rName, const SfxIte
                 aDestStrm.GetEndOfData());
             rValue <<= aSeq;
         }
-        if ( bSwapped )
-            static_cast< SdrGrafObj* >( mpObj.get() )->ForceSwapOut();
         break;
     }
 
@@ -1610,13 +1606,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;
     }
@@ -1645,11 +1638,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;
     }
 


More information about the Libreoffice-commits mailing list