summaryrefslogtreecommitdiff
path: root/svtools/source/graphic
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2015-07-11 23:57:24 +0200
committerZolnai Tamás <zolnaitamas2000@gmail.com>2015-07-12 10:30:32 +0000
commit6ca90a0fc42a5f010ff9c8dc87011516eb5053c1 (patch)
tree0d15aa2638474d4c038e65579e6dce99eed7df61 /svtools/source/graphic
parentee35b72064d8d1333709b102b051360018f8044b (diff)
Optimize a bit GraphicCache::GetUniqueID
Don't call twice ImplGetCacheEntry when TryToSwapIn hasn't been called Change-Id: I0a808801c94c8179a4f5d863648907b4102f6564 Reviewed-on: https://gerrit.libreoffice.org/16958 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Zolnai Tamás <zolnaitamas2000@gmail.com>
Diffstat (limited to 'svtools/source/graphic')
-rw-r--r--svtools/source/graphic/grfcache.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/svtools/source/graphic/grfcache.cxx b/svtools/source/graphic/grfcache.cxx
index fb1c9fa57219..3c0dbd3c9016 100644
--- a/svtools/source/graphic/grfcache.cxx
+++ b/svtools/source/graphic/grfcache.cxx
@@ -1074,10 +1074,11 @@ OString GraphicCache::GetUniqueID( const GraphicObject& rObj ) const
// ensure that the entry is correctly initialized (it has to be read at least once)
if( pEntry && pEntry->GetID().IsEmpty() )
+ {
pEntry->TryToSwapIn();
-
- // do another call to ImplGetCacheEntry in case of modified entry list
- pEntry = const_cast<GraphicCache*>(this)->ImplGetCacheEntry( rObj );
+ // do another call to ImplGetCacheEntry in case of modified entry list
+ pEntry = const_cast<GraphicCache*>(this)->ImplGetCacheEntry( rObj );
+ }
if( pEntry )
aRet = pEntry->GetID().GetIDString();