[Libreoffice-commits] core.git: Branch 'feature/image_rework' - svtools/source

Zolnai Tamás tamas.zolnai at collabora.com
Mon Oct 27 07:58:39 PDT 2014


 svtools/source/graphic/grfmgr2.cxx |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

New commits:
commit e3d9dc5be1b591bedbf123bf71ec8f62d7c232b0
Author: Zolnai Tamás <tamas.zolnai at collabora.com>
Date:   Mon Oct 27 15:55:38 2014 +0100

    Ignore the swapped in graphic, but use its size
    
    Change-Id: I75f17ab5e55119965fcede2b220979cefc1e26ab

diff --git a/svtools/source/graphic/grfmgr2.cxx b/svtools/source/graphic/grfmgr2.cxx
index c97a043..427c312 100644
--- a/svtools/source/graphic/grfmgr2.cxx
+++ b/svtools/source/graphic/grfmgr2.cxx
@@ -205,12 +205,15 @@ void GraphicManager::ImplCheckSizeOfSwappedInGraphics(const GraphicObject* pGrap
     for (size_t i = 0, n = maObjList.size(); i < n; ++i)
     {
         pObj = maObjList[i];
-        if (pObj->meType == GRAPHIC_BITMAP && !pObj->IsSwappedOut() && pObj->GetSizeBytes() && pObj != pGraphicToIgnore)
+        if (pObj->meType == GRAPHIC_BITMAP && !pObj->IsSwappedOut() && pObj->GetSizeBytes())
         {
-            aCandidates.push_back(pObj);
+            if( pObj != pGraphicToIgnore )
+            {
+                aCandidates.push_back(pObj);
+                sizes.insert(std::make_pair(pObj, nSize));
+            }
             size_t const nSize = pObj->GetSizeBytes();
             nUsedSize += nSize;
-            sizes.insert(std::make_pair(pObj, nSize));
         }
     }
 


More information about the Libreoffice-commits mailing list