summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVort <vvort@yandex.ru>2015-02-13 15:53:09 +0200
committerCaolán McNamara <caolanm@redhat.com>2015-02-17 13:25:09 +0000
commitea91563683b5c5df40ec5f4eb9c3005d7bfcf71d (patch)
tree9cc12c6733ac439fa563395a9100938b12dc295e
parenta96acacb91197a04e8fd9114d8c4bcda24372f54 (diff)
tdf#64075 SVG Import: close non-closed filled polygons
Change-Id: I26335c88cd3fd6644e122c8c525bf319cb09f4db Reviewed-on: https://gerrit.libreoffice.org/14475 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--filter/source/svg/svgreader.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/filter/source/svg/svgreader.cxx b/filter/source/svg/svgreader.cxx
index 41cdd984ce94..bf1ae76aa325 100644
--- a/filter/source/svg/svgreader.cxx
+++ b/filter/source/svg/svgreader.cxx
@@ -1343,6 +1343,13 @@ struct ShapeWritingVisitor
basegfx::B2DPolyPolygon aPoly;
basegfx::tools::importFromSvgD(aPoly, sPath, false, NULL);
+ if ((maCurrState.meStrokeType == NONE) &&
+ (maCurrState.meFillType != NONE) &&
+ !aPoly.isClosed())
+ {
+ aPoly.setClosed(true);
+ }
+
writePathShape(xAttrs,
xUnoAttrs,
xElem,