[Libreoffice-commits] core.git: svtools/source

Caolán McNamara caolanm at redhat.com
Tue Jan 10 11:29:26 UTC 2017


 svtools/source/graphic/grfmgr.cxx |   46 ++++++++++++++++++--------------------
 1 file changed, 22 insertions(+), 24 deletions(-)

New commits:
commit 9d138866d269eea262b22497af62b09570bd7a05
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Jan 9 15:51:58 2017 +0000

    unfold and unindent else cause
    
    Change-Id: I22131a477547ac08b0c6b762353c9796f80c3666

diff --git a/svtools/source/graphic/grfmgr.cxx b/svtools/source/graphic/grfmgr.cxx
index 2577393..f480537 100644
--- a/svtools/source/graphic/grfmgr.cxx
+++ b/svtools/source/graphic/grfmgr.cxx
@@ -165,34 +165,32 @@ void GraphicObject::ImplSetGraphicManager(const OString* pID, const GraphicObjec
 {
     if (mpMgr)
         return;
-    else
+
+    if (!mpGlobalMgr)
     {
-        if( !mpGlobalMgr )
+        if (!utl::ConfigManager::IsAvoidConfig())
         {
-            if (!utl::ConfigManager::IsAvoidConfig())
-            {
-                mpGlobalMgr = new GraphicManager(
-                    (officecfg::Office::Common::Cache::GraphicManager::
-                     TotalCacheSize::get()),
-                    (officecfg::Office::Common::Cache::GraphicManager::
-                     ObjectCacheSize::get()));
-                mpGlobalMgr->SetCacheTimeout(
-                    officecfg::Office::Common::Cache::GraphicManager::
-                    ObjectReleaseTime::get());
-            }
-            else
-            {
-                mpGlobalMgr = new GraphicManager(
-                    20000,
-                    20000);
-                mpGlobalMgr->SetCacheTimeout(
-                    20000);
-            }
+            mpGlobalMgr = new GraphicManager(
+                (officecfg::Office::Common::Cache::GraphicManager::
+                 TotalCacheSize::get()),
+                (officecfg::Office::Common::Cache::GraphicManager::
+                 ObjectCacheSize::get()));
+            mpGlobalMgr->SetCacheTimeout(
+                officecfg::Office::Common::Cache::GraphicManager::
+                ObjectReleaseTime::get());
+        }
+        else
+        {
+            mpGlobalMgr = new GraphicManager(
+                20000,
+                20000);
+            mpGlobalMgr->SetCacheTimeout(
+                20000);
         }
-
-        mpMgr = mpGlobalMgr;
-        mpMgr->ImplRegisterObj( *this, maGraphic, pID, pCopyObj );
     }
+
+    mpMgr = mpGlobalMgr;
+    mpMgr->ImplRegisterObj( *this, maGraphic, pID, pCopyObj );
 }
 
 void GraphicObject::ImplAutoSwapIn()


More information about the Libreoffice-commits mailing list