[Libreoffice-commits] core.git: include/vcl vcl/source

Caolán McNamara caolanm at redhat.com
Tue Nov 14 20:14:42 UTC 2017


 include/vcl/vectorgraphicdata.hxx    |    1 +
 vcl/source/gdi/vectorgraphicdata.cxx |    5 ++++-
 2 files changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 10bcb72a98595eeed26848f541ef51071d3c27f5
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Nov 14 12:41:56 2017 +0000

    ofz: if parsing failed we keep reparsing it
    
    Change-Id: I656eb1144a652addbc4a0b07b5d5dd435b68bf2c
    Reviewed-on: https://gerrit.libreoffice.org/44714
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

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(),


More information about the Libreoffice-commits mailing list