summaryrefslogtreecommitdiff
path: root/vcl/source/gdi/impgraph.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/gdi/impgraph.cxx')
-rw-r--r--vcl/source/gdi/impgraph.cxx27
1 files changed, 11 insertions, 16 deletions
diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx
index f99d44799aaa..3cd67b08ce33 100644
--- a/vcl/source/gdi/impgraph.cxx
+++ b/vcl/source/gdi/impgraph.cxx
@@ -1663,6 +1663,9 @@ bool ImpGraphic::ImplIsLink() const
BitmapChecksum ImpGraphic::ImplGetChecksum() const
{
+ if (mnChecksum != 0)
+ return mnChecksum;
+
BitmapChecksum nRet = 0;
ensureAvailable();
@@ -1676,25 +1679,16 @@ BitmapChecksum ImpGraphic::ImplGetChecksum() const
case GraphicType::Bitmap:
{
- if(maVectorGraphicData.get() && maEx.IsEmpty())
- {
- // use maEx as local buffer for rendered svg
- const_cast< ImpGraphic* >(this)->maEx = maVectorGraphicData->getReplacement();
- }
-
- if( mpAnimation )
- {
- nRet = mpAnimation->GetChecksum();
- }
- else
- {
- nRet = maEx.GetChecksum();
- }
-
- if (mpPdfData && mpPdfData->hasElements())
+ if(maVectorGraphicData)
+ nRet = maVectorGraphicData->GetChecksum();
+ else if (mpPdfData && mpPdfData->hasElements())
// Include the PDF data in the checksum, so a metafile with
// and without PDF data is considered to be different.
nRet = vcl_get_checksum(nRet, mpPdfData->getConstArray(), mpPdfData->getLength());
+ else if( mpAnimation )
+ nRet = mpAnimation->GetChecksum();
+ else
+ nRet = maEx.GetChecksum();
}
break;
@@ -1704,6 +1698,7 @@ BitmapChecksum ImpGraphic::ImplGetChecksum() const
}
}
+ mnChecksum = nRet;
return nRet;
}