[ooo-build-commit] .: scratch/mso-dumper
Radek DoulÃk
rodo at kemper.freedesktop.org
Tue May 11 07:47:23 PDT 2010
scratch/mso-dumper/src/pptrecord.py | 59 ++++++++++++++++++++++++++++++++++++
scratch/mso-dumper/src/pptstream.py | 2 -
2 files changed, 60 insertions(+), 1 deletion(-)
New commits:
commit da9884417b67e5f2795f20a171b5380015b4b25c
Author: Radek Doulik <rodo at novell.com>
Date: Tue May 11 16:46:25 2010 +0200
added TextRulerAtom record handler
* scratch/mso-dumper/src/pptrecord.py:
* scratch/mso-dumper/src/pptstream.py:
diff --git a/scratch/mso-dumper/src/pptrecord.py b/scratch/mso-dumper/src/pptrecord.py
index b9ebfd2..420583f 100644
--- a/scratch/mso-dumper/src/pptrecord.py
+++ b/scratch/mso-dumper/src/pptrecord.py
@@ -629,6 +629,65 @@ class AnimReference(BaseRecordHandler):
self.refTypeHandler[refType](self,refType,refMode)
+class TextRulerAtom(BaseRecordHandler):
+ """Text Ruler Atom."""
+ def parseBytes (self):
+ rulerMask = self.readUnsignedInt(4)
+
+ self.appendLine("ruler mask %Xh"%rulerMask)
+
+ if rulerMask & 0x0002:
+ levels = self.readUnsignedInt(2)
+ self.appendLine("number of indent levels %d"%levels)
+
+ if rulerMask & 0x0001:
+ tabSize = self.readUnsignedInt(2)
+ self.appendLine("default tab size %d"%tabSize)
+
+ if rulerMask & 0x0004:
+ self.appendLine("reading tabStops, not sure that this will work")
+ self.readRecord(self)
+
+ if rulerMask & 0x0008:
+ leftMargin = self.readUnsignedInt(2)
+ self.appendLine("leftMargin0 %d"%leftMargin)
+
+ if rulerMask & 0x0100:
+ leftIndent = self.readUnsignedInt(2)
+ self.appendLine("leftIndent0 %d"%leftIndent)
+
+ if rulerMask & 0x0010:
+ leftMargin = self.readUnsignedInt(2)
+ self.appendLine("leftMargin1 %d"%leftMargin)
+
+ if rulerMask & 0x0200:
+ leftIndent = self.readUnsignedInt(2)
+ self.appendLine("leftIndent1 %d"%leftIndent)
+
+ if rulerMask & 0x0020:
+ leftMargin = self.readUnsignedInt(2)
+ self.appendLine("leftMargin2 %d"%leftMargin)
+
+ if rulerMask & 0x0400:
+ leftIndent = self.readUnsignedInt(2)
+ self.appendLine("leftIndent2 %d"%leftIndent)
+
+ if rulerMask & 0x0040:
+ leftMargin = self.readUnsignedInt(2)
+ self.appendLine("leftMargin3 %d"%leftMargin)
+
+ if rulerMask & 0x0800:
+ leftIndent = self.readUnsignedInt(2)
+ self.appendLine("leftIndent3 %d"%leftIndent)
+
+ if rulerMask & 0x0080:
+ leftMargin = self.readUnsignedInt(2)
+ self.appendLine("leftMargin4 %d"%leftMargin)
+
+ if rulerMask & 0x1000:
+ leftIndent = self.readUnsignedInt(2)
+ self.appendLine("leftIndent4 %d"%leftIndent)
+
# -------------------------------------------------------------------
# special record handlers: text style properties
diff --git a/scratch/mso-dumper/src/pptstream.py b/scratch/mso-dumper/src/pptstream.py
index ccca3d6..8e32501 100644
--- a/scratch/mso-dumper/src/pptstream.py
+++ b/scratch/mso-dumper/src/pptstream.py
@@ -286,7 +286,7 @@ recData = {
4003: ["DFF_PST_TxMasterStyleAtom", pptrecord.MasterTextStyles],
4004: ["DFF_PST_TxCFStyleAtom"],
4005: ["DFF_PST_TxPFStyleAtom"],
- 4006: ["DFF_PST_TextRulerAtom"],
+ 4006: ["DFF_PST_TextRulerAtom", pptrecord.TextRulerAtom],
4007: ["DFF_PST_TextBookmarkAtom"],
4008: ["DFF_PST_TextBytesAtom", pptrecord.ShapeString],
4009: ["DFF_PST_TxSIStyleAtom"],
More information about the ooo-build-commit
mailing list