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

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Fri Mar 26 07:25:56 UTC 2021


 src/lib/CDRParser.cpp |   20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)

New commits:
commit 628c79ed597f720706b6a09a0426697ea1544687
Author:     Fridrich Štrba <fridrich.strba at bluewin.ch>
AuthorDate: Fri Mar 26 08:25:33 2021 +0100
Commit:     Fridrich Štrba <fridrich.strba at bluewin.ch>
CommitDate: Fri Mar 26 08:25:33 2021 +0100

    Fixes for text-on-path in txsm6
    
    Change-Id: Iae442c48ea153436a9e588313d109b2f91acc06c

diff --git a/src/lib/CDRParser.cpp b/src/lib/CDRParser.cpp
index 5b11d75..66ae391 100644
--- a/src/lib/CDRParser.cpp
+++ b/src/lib/CDRParser.cpp
@@ -2748,14 +2748,30 @@ void libcdr::CDRParser::readTxsm16(librevenge::RVNGInputStream *input)
 
 void libcdr::CDRParser::readTxsm6(librevenge::RVNGInputStream *input)
 {
-  input->seek(0x20, librevenge::RVNG_SEEK_CUR);
+  unsigned frameFlag = readU32(input);
+  input->seek(0x18, librevenge::RVNG_SEEK_CUR);
+  unsigned textOnPath = readU32(input);
+
+  if (textOnPath == 1)
+  {
+    input->seek(4, librevenge::RVNG_SEEK_CUR); // var1
+    input->seek(4, librevenge::RVNG_SEEK_CUR); // var3
+    input->seek(4, librevenge::RVNG_SEEK_CUR); // Offset
+    input->seek(4, librevenge::RVNG_SEEK_CUR); // var4
+    input->seek(4, librevenge::RVNG_SEEK_CUR); // Distance
+    input->seek(4, librevenge::RVNG_SEEK_CUR); // var5
+    input->seek(4, librevenge::RVNG_SEEK_CUR); // var6
+    input->seek(4, librevenge::RVNG_SEEK_CUR); // var7
+  }
+
   unsigned numFrames = readU32(input);
   unsigned textId = 0;
   for (unsigned j=0; j<numFrames; ++j)
   {
     textId = readU32(input); // Frame Id
     input->seek(48, librevenge::RVNG_SEEK_CUR); // Trafo 6*8 bytes
-    input->seek(8, librevenge::RVNG_SEEK_CUR); // Maybe flags
+    if (!frameFlag)
+      input->seek(8, librevenge::RVNG_SEEK_CUR); // Maybe flags
   }
   unsigned numPara = readU32(input);
   for (unsigned j=0; j<numPara; ++j)


More information about the Libreoffice-commits mailing list