[Libreoffice-commits] libvisio.git: src/lib

Fridrich Štrba fridrich.strba at bluewin.ch
Sat Dec 26 14:38:28 PST 2015


 src/lib/VSDContentCollector.cpp |   12 ++++--------
 src/lib/VSDContentCollector.h   |    1 -
 2 files changed, 4 insertions(+), 9 deletions(-)

New commits:
commit b33285f43cc30d1a464f55c25aee548761b9c0f0
Author: Fridrich Štrba <fridrich.strba at bluewin.ch>
Date:   Sat Dec 26 23:33:19 2015 +0100

    Revert "WIP[0]: sanitize the _flushText mess"
    
    This reverts commit 31b0d9f6c9008c9e7b16cf79136afffc650a9fa9.

diff --git a/src/lib/VSDContentCollector.cpp b/src/lib/VSDContentCollector.cpp
index 939a6d0..97be554 100644
--- a/src/lib/VSDContentCollector.cpp
+++ b/src/lib/VSDContentCollector.cpp
@@ -53,7 +53,7 @@ libvisio::VSDContentCollector::VSDContentCollector(
   m_currentPageNumber(0), m_shapeOutputDrawing(0), m_shapeOutputText(0),
   m_pageOutputDrawing(), m_pageOutputText(), m_documentPageShapeOrders(documentPageShapeOrders),
   m_pageShapeOrder(m_documentPageShapeOrders.begin()), m_isFirstGeometry(true), m_NURBSData(), m_polylineData(),
-  m_textStream(), m_currentText(), m_names(), m_stencilNames(), m_fields(), m_stencilFields(), m_fieldIndex(0),
+  m_textStream(), m_names(), m_stencilNames(), m_fields(), m_stencilFields(), m_fieldIndex(0),
   m_textFormat(VSD_TEXT_ANSI), m_charFormats(), m_paraFormats(), m_lineStyle(), m_fillStyle(), m_textBlockStyle(),
   m_themeReference(), m_defaultCharStyle(), m_defaultParaStyle(), m_currentStyleSheet(0), m_styles(styles),
   m_stencils(stencils), m_stencilShape(0), m_isStencilStarted(false), m_currentGeometryCount(0),
@@ -2113,6 +2113,9 @@ void libvisio::VSDContentCollector::collectShape(unsigned id, unsigned level, un
       _handleForeignData(m_stencilShape->m_foreign->data);
     }
 
+    // m_textStream = m_stencilShape->m_text;
+    // m_textFormat = m_stencilShape->m_textFormat;
+
     for (std::map< unsigned, VSDName>::const_iterator iterData = m_stencilShape->m_names.begin(); iterData != m_stencilShape->m_names.end(); ++iterData)
     {
       librevenge::RVNGString nameString;
@@ -2219,13 +2222,6 @@ void libvisio::VSDContentCollector::collectText(unsigned level, const librevenge
 
   m_textStream = textStream;
   m_textFormat = format;
-  m_currentText.clear();
-  if (!m_textStream.empty())
-  {
-    std::vector<unsigned char> tmpBuffer(textStream.size());
-    memcpy(&tmpBuffer[0], textStream.getDataBuffer(), textStream.size());
-    appendCharacters(m_currentText, tmpBuffer, format);
-  }
 }
 
 void libvisio::VSDContentCollector::collectParaIX(unsigned /* id */ , unsigned level, unsigned charCount, const boost::optional<double> &indFirst,
diff --git a/src/lib/VSDContentCollector.h b/src/lib/VSDContentCollector.h
index c3aaff2..9a956db 100644
--- a/src/lib/VSDContentCollector.h
+++ b/src/lib/VSDContentCollector.h
@@ -276,7 +276,6 @@ private:
   std::map<unsigned, NURBSData> m_NURBSData;
   std::map<unsigned, PolylineData> m_polylineData;
   librevenge::RVNGBinaryData m_textStream;
-  librevenge::RVNGString m_currentText;
   std::map<unsigned, librevenge::RVNGString> m_names, m_stencilNames;
   std::vector<librevenge::RVNGString> m_fields;
   VSDFieldList m_stencilFields;


More information about the Libreoffice-commits mailing list