summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/vcl/vectorgraphicdata.hxx1
-rw-r--r--vcl/source/gdi/vectorgraphicdata.cxx5
2 files changed, 5 insertions, 1 deletions
diff --git a/include/vcl/vectorgraphicdata.hxx b/include/vcl/vectorgraphicdata.hxx
index a045b01ee46e..66541616b41c 100644
--- a/include/vcl/vectorgraphicdata.hxx
+++ b/include/vcl/vectorgraphicdata.hxx
@@ -57,6 +57,7 @@ private:
OUString maPath;
// on demand created content
+ bool mbSequenceCreated;
basegfx::B2DRange maRange;
std::deque< css::uno::Reference< css::graphic::XPrimitive2D > > maSequence;
BitmapEx maReplacement;
diff --git a/vcl/source/gdi/vectorgraphicdata.cxx b/vcl/source/gdi/vectorgraphicdata.cxx
index 48d6ecf65286..e59d87495e5d 100644
--- a/vcl/source/gdi/vectorgraphicdata.cxx
+++ b/vcl/source/gdi/vectorgraphicdata.cxx
@@ -147,7 +147,7 @@ void VectorGraphicData::ensureReplacement()
void VectorGraphicData::ensureSequenceAndRange()
{
- if(maSequence.empty() && maVectorGraphicDataArray.hasElements())
+ if (!mbSequenceCreated && maVectorGraphicDataArray.hasElements())
{
// import SVG to maSequence, also set maRange
maRange.reset();
@@ -206,6 +206,7 @@ void VectorGraphicData::ensureSequenceAndRange()
}
}
mNestedBitmapSize = estimateSize(maSequence);
+ mbSequenceCreated = true;
}
}
@@ -227,6 +228,7 @@ VectorGraphicData::VectorGraphicData(
VectorGraphicDataType eVectorDataType)
: maVectorGraphicDataArray(rVectorGraphicDataArray),
maPath(rPath),
+ mbSequenceCreated(false),
maRange(),
maSequence(),
maReplacement(),
@@ -241,6 +243,7 @@ VectorGraphicData::VectorGraphicData(
VectorGraphicDataType eVectorDataType)
: maVectorGraphicDataArray(),
maPath(rPath),
+ mbSequenceCreated(false),
maRange(),
maSequence(),
maReplacement(),