summaryrefslogtreecommitdiff
path: root/goodies
diff options
context:
space:
mode:
authorVladimir Glazunov <vg@openoffice.org>2009-12-15 12:23:06 +0100
committerVladimir Glazunov <vg@openoffice.org>2009-12-15 12:23:06 +0100
commit5d78a10e75bab8e097bdfd0b5b5acb2d2d1b66a3 (patch)
tree18f1907ed0d8a8e244a1ffa6df62b5a6edfa8902 /goodies
parent338cc3be5b5c4aac0c9bcd1de4ef0dbbb3c00abc (diff)
parent058f03010f53563a2555741c06d84b68e8d2447d (diff)
CWS-TOOLING: integrate CWS communitypatches320_DEV300
Diffstat (limited to 'goodies')
-rw-r--r--goodies/source/graphic/grfcache.cxx18
1 files changed, 14 insertions, 4 deletions
diff --git a/goodies/source/graphic/grfcache.cxx b/goodies/source/graphic/grfcache.cxx
index 1a2af16ed741..f0a41ceca53f 100644
--- a/goodies/source/graphic/grfcache.cxx
+++ b/goodies/source/graphic/grfcache.cxx
@@ -37,6 +37,8 @@
#include <tools/poly.hxx>
#include "grfcache.hxx"
+#include <memory>
+
// -----------
// - Defines -
// -----------
@@ -612,7 +614,12 @@ void GraphicCache::AddGraphicObject( const GraphicObject& rObj, Graphic& rSubsti
if( !bInserted )
{
GraphicCacheEntry* pEntry = static_cast< GraphicCacheEntry* >( maGraphicCache.First() );
- const GraphicID aID( rObj );
+ ::std::auto_ptr< GraphicID > apID;
+
+ if( !pID )
+ {
+ apID.reset( new GraphicID( rObj ) );
+ }
while( !bInserted && pEntry )
{
@@ -647,10 +654,13 @@ void GraphicCache::AddGraphicObject( const GraphicObject& rObj, Graphic& rSubsti
}
}
}
- else if( rEntryID == aID )
+ else
{
- pEntry->AddGraphicObjectReference( rObj, rSubstitute );
- bInserted = TRUE;
+ if( rEntryID == *apID )
+ {
+ pEntry->AddGraphicObjectReference( rObj, rSubstitute );
+ bInserted = TRUE;
+ }
}
if( !bInserted )