[Libreoffice-commits] libcdr.git: src/lib
Fridrich Å trba
fridrich.strba at bluewin.ch
Fri Apr 4 04:26:14 PDT 2014
src/lib/CDRContentCollector.cpp | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
New commits:
commit b1d482cb6fa2182e15d73b0bb0d339c4000fc695
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date: Fri Apr 4 13:25:18 2014 +0200
Try hard to avoid a sequence of several "Z" segments
Change-Id: I14a1f987ed59131fe3f262f81354da0f2d2fe21d
diff --git a/src/lib/CDRContentCollector.cpp b/src/lib/CDRContentCollector.cpp
index 2da377a..c199aed 100644
--- a/src/lib/CDRContentCollector.cpp
+++ b/src/lib/CDRContentCollector.cpp
@@ -266,8 +266,11 @@ void libcdr::CDRContentCollector::_flushCurrentPath()
}
}
- else
- tmpPath.push_back(i());
+ else if (i()["librevenge:path-action"]->getStr() == "Z")
+ {
+ if (tmpPath.back()["librevenge:path-action"] && tmpPath.back()["librevenge:path-action"]->getStr() != "Z")
+ tmpPath.push_back(i());
+ }
}
if (!tmpPath.empty())
{
@@ -275,9 +278,12 @@ void libcdr::CDRContentCollector::_flushCurrentPath()
{
if ((CDR_ALMOST_ZERO(initialX - previousX) && CDR_ALMOST_ZERO(initialY - previousY)) || isPathClosed)
{
- librevenge::RVNGPropertyList closedPath;
- closedPath.insert("librevenge:path-action", "Z");
- tmpPath.push_back(closedPath);
+ if (tmpPath.back()["librevenge:path-action"] && tmpPath.back()["librevenge:path-action"]->getStr() != "Z")
+ {
+ librevenge::RVNGPropertyList closedPath;
+ closedPath.insert("librevenge:path-action", "Z");
+ tmpPath.push_back(closedPath);
+ }
}
}
else
More information about the Libreoffice-commits
mailing list