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

Fridrich Štrba fridrich.strba at bluewin.ch
Mon Feb 6 19:41:17 UTC 2017


 src/lib/VSD5Parser.cpp |   13 +++++++++++++
 src/lib/VSD5Parser.h   |    2 ++
 src/lib/VSDParser.h    |    2 +-
 3 files changed, 16 insertions(+), 1 deletion(-)

New commits:
commit fa12c4c3306da7c572bbd37c314f797d01cc26c1
Author: Fridrich Štrba <fridrich.strba at bluewin.ch>
Date:   Mon Apr 18 21:02:13 2016 +0200

    We will need to override readXForm1D in VSD5Parser
    
    Change-Id: I95efbae6f33a34b16fcda3b013f3adb64bd84ea8

diff --git a/src/lib/VSD5Parser.cpp b/src/lib/VSD5Parser.cpp
index 3d9edcf..fd5b298 100644
--- a/src/lib/VSD5Parser.cpp
+++ b/src/lib/VSD5Parser.cpp
@@ -492,6 +492,19 @@ void libvisio::VSD5Parser::readMisc(librevenge::RVNGInputStream *input)
     m_shape.m_misc.m_hideText = false;
 }
 
+void libvisio::VSD5Parser::readXForm1D(librevenge::RVNGInputStream *input)
+{
+  if (!m_shape.m_xform1d)
+    m_shape.m_xform1d = new XForm1D();
+  input->seek(1, librevenge::RVNG_SEEK_CUR);
+  m_shape.m_xform1d->beginX = readDouble(input);
+  input->seek(1, librevenge::RVNG_SEEK_CUR);
+  m_shape.m_xform1d->beginY = readDouble(input);
+  input->seek(1, librevenge::RVNG_SEEK_CUR);
+  m_shape.m_xform1d->endX = readDouble(input);
+  input->seek(1, librevenge::RVNG_SEEK_CUR);
+  m_shape.m_xform1d->endY = readDouble(input);
+}
 
 unsigned libvisio::VSD5Parser::getUInt(librevenge::RVNGInputStream *input)
 {
diff --git a/src/lib/VSD5Parser.h b/src/lib/VSD5Parser.h
index 886cc22..02326ee 100644
--- a/src/lib/VSD5Parser.h
+++ b/src/lib/VSD5Parser.h
@@ -57,6 +57,8 @@ protected:
 
   virtual void readMisc(librevenge::RVNGInputStream *input);
 
+  virtual void readXForm1D(librevenge::RVNGInputStream *input);
+
   virtual unsigned getUInt(librevenge::RVNGInputStream *input);
   virtual int getInt(librevenge::RVNGInputStream *input);
 
diff --git a/src/lib/VSDParser.h b/src/lib/VSDParser.h
index 3b11d35..bdd8b37 100644
--- a/src/lib/VSDParser.h
+++ b/src/lib/VSDParser.h
@@ -68,7 +68,7 @@ protected:
   void readInfiniteLine(librevenge::RVNGInputStream *input);
   void readShapeData(librevenge::RVNGInputStream *input);
   void readXFormData(librevenge::RVNGInputStream *input);
-  void readXForm1D(librevenge::RVNGInputStream *input);
+  virtual void readXForm1D(librevenge::RVNGInputStream *input);
   void readTxtXForm(librevenge::RVNGInputStream *input);
   void readShapeId(librevenge::RVNGInputStream *input);
   virtual void readShapeList(librevenge::RVNGInputStream *input);


More information about the Libreoffice-commits mailing list