src/lib/VSDContentCollector.cpp |   13 +++++++++----
 src/lib/VSDContentCollector.h   |    2 ++
 2 files changed, 11 insertions(+), 4 deletions(-)

New commits:
commit c006852738bc5ffa6cffd125e980b5cdd9ade7ba
Author: Fridrich Å trba <[email protected]>
Date:   Mon Dec 28 20:14:10 2015 +0100

    Extract part of the path generation to be able to add rounding in next steps
    
    Change-Id: I6ce348c7b14ff324f106be9ab615dbfae546a178

diff --git a/src/lib/VSDContentCollector.cpp b/src/lib/VSDContentCollector.cpp
index 8365984..1a34b51 100644
--- a/src/lib/VSDContentCollector.cpp
+++ b/src/lib/VSDContentCollector.cpp
@@ -267,8 +267,7 @@ void libvisio::VSDContentCollector::_flushCurrentPath()
     if (!tmpPath.empty())
     {
       librevenge::RVNGPropertyListVector path;
-      for (unsigned i = 0; i < tmpPath.size(); ++i)
-        path.append(tmpPath[i]);
+      _convertToPath(tmpPath, path, m_lineStyle.rounding);
       m_shapeOutputDrawing->addStyle(fillPathProps);
       librevenge::RVNGPropertyList propList;
       propList.insert("svg:d", path);
@@ -351,8 +350,7 @@ void libvisio::VSDContentCollector::_flushCurrentPath()
     if (!tmpPath.empty())
     {
       librevenge::RVNGPropertyListVector path;
-      for (unsigned i = 0; i < tmpPath.size(); ++i)
-        path.append(tmpPath[i]);
+      _convertToPath(tmpPath, path, m_lineStyle.rounding);
       m_shapeOutputDrawing->addStyle(linePathProps);
       librevenge::RVNGPropertyList propList;
       propList.insert("svg:d", path);
@@ -363,6 +361,13 @@ void libvisio::VSDContentCollector::_flushCurrentPath()
   m_currentLineGeometry.clear();
 }
 
+void libvisio::VSDContentCollector::_convertToPath(const 
std::vector<librevenge::RVNGPropertyList> &segmentVector,
+                                                   
librevenge::RVNGPropertyListVector &path, double /* rounding */)
+{
+  for (unsigned i = 0; i < segmentVector.size(); ++i)
+    path.append(segmentVector[i]);
+}
+
 void libvisio::VSDContentCollector::_flushText()
 {
   /* Do not output empty text objects. */
diff --git a/src/lib/VSDContentCollector.h b/src/lib/VSDContentCollector.h
index 3497681..ca7a73e 100644
--- a/src/lib/VSDContentCollector.h
+++ b/src/lib/VSDContentCollector.h
@@ -229,6 +229,8 @@ private:
   void _fillParagraphProperties(librevenge::RVNGPropertyList &propList, const 
VSDParaStyle &style);
   void _fillTabSet(librevenge::RVNGPropertyList &propList, const VSDTabSet 
&tabSet);
   void _fillCharProperties(librevenge::RVNGPropertyList &propList, const 
VSDCharStyle &style);
+  void _convertToPath(const std::vector<librevenge::RVNGPropertyList> 
&segmentVector,
+                      librevenge::RVNGPropertyListVector &path, double 
rounding);
 
   bool m_isPageStarted;
   double m_pageWidth;
_______________________________________________
Libreoffice-commits mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to