[Libreoffice-commits] mso-dumper.git: msodumper/docrecord.py

Miklos Vajna vmiklos at collabora.co.uk
Wed Jun 21 14:45:38 UTC 2017


 msodumper/docrecord.py |   15 +++++++++++++++
 1 file changed, 15 insertions(+)

New commits:
commit 4ffce41ef44ad925ce0abce2832542c79b0d866c
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Wed Jun 21 16:44:45 2017 +0200

    docrecord: dump line spacing structure

diff --git a/msodumper/docrecord.py b/msodumper/docrecord.py
index 471a8cf..c298ceb 100644
--- a/msodumper/docrecord.py
+++ b/msodumper/docrecord.py
@@ -635,6 +635,19 @@ class PChgTabsAdd(BinaryStream):
         self.parent.pos = self.pos
 
 
+class LSPD(BinaryStream):
+    """Specifies the spacing between lines in a paragraph."""
+    def __init__(self, parent):
+        BinaryStream.__init__(self, parent.bytes)
+        self.pos = parent.pos
+
+    def dump(self):
+        print '<lspd type="LSPD" offset="%d">' % self.pos
+        self.printAndSet("dyaLine", self.readuInt16())
+        self.printAndSet("fMultLinespace", self.readuInt16())
+        print '</lspd>'
+
+
 class PChgTabsPapxOperand(BinaryStream):
     """The PChgTabsPapxOperand structure is used by sprmPChgTabsPapx to specify custom tab stops to be added or ignored."""
     def __init__(self, parent):
@@ -1559,6 +1572,8 @@ class Sprm(BinaryStream):
                 dataStream = mainStream.doc.getDirectoryStreamByName("Data")
                 dataStream.pos = self.operand
                 self.ct = PrcData(dataStream)
+            elif self.sprm == 0x6412:
+                self.ct = LSPD(self)
         elif self.getOperandSize() == 7:
             self.operand = self.getuInt64() & 0x0fffffff
         elif self.getOperandSize() == 9:


More information about the Libreoffice-commits mailing list