summaryrefslogtreecommitdiff
path: root/goodies/source/graphic
diff options
context:
space:
mode:
Diffstat (limited to 'goodies/source/graphic')
-rw-r--r--goodies/source/graphic/grfcache.cxx18
-rw-r--r--goodies/source/graphic/grfmgr.cxx2
2 files changed, 15 insertions, 5 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 )
diff --git a/goodies/source/graphic/grfmgr.cxx b/goodies/source/graphic/grfmgr.cxx
index 5cb37a51e81f..39c1e53e7184 100644
--- a/goodies/source/graphic/grfmgr.cxx
+++ b/goodies/source/graphic/grfmgr.cxx
@@ -44,7 +44,7 @@
#include <vcl/metaact.hxx>
#include <vcl/virdev.hxx>
#include <vcl/salbtype.hxx>
-#include <svtools/cacheoptions.hxx>
+#include <unotools/cacheoptions.hxx>
#include "grfmgr.hxx"
// -----------