src/docrecord.py | 12 +++++++----- src/docsprm.py | 15 +++++++++++++++ 2 files changed, 22 insertions(+), 5 deletions(-)
New commits: commit 1b6338ee50aaba77da82e1eacec81690421348ea Author: Miklos Vajna <vmik...@suse.cz> Date: Mon Jan 7 17:53:33 2013 +0100 even the size of variable SPRMs is known in most cases diff --git a/src/docrecord.py b/src/docrecord.py index e487cc0..8d40588 100644 --- a/src/docrecord.py +++ b/src/docrecord.py @@ -456,11 +456,12 @@ class Sprm(DOCDirStream): def getOperandSize(self): if self.spra == 6: # variable - if self.sprm == 0xd634: - return 7 - elif self.sprm in [0xd234, 0xd235, 0xd236, 0xd237]: # sprmSBrcTop / Left / Bottom / Right - return 9 - raise Exception() + if self.sprm not in [0xD608, 0xC615]: # sprmTDefTable, sprmPChgTabs + # these structures are prefixed with their size + return self.getuInt8() + 1 + elif self.sprm == 0xD608: + return self.getuInt16() + 1 + raise Exception("No idea what is the size of SPRM %s" % hex(self.sprm)) return self.operandSizeMap[self.spra] class Prl(DOCDirStream): commit 9e13db1dbb0b57dc50700b889ad6cd1d59d42fd4 Author: Miklos Vajna <vmik...@suse.cz> Date: Mon Jan 7 17:53:28 2013 +0100 add picture sprms diff --git a/src/docrecord.py b/src/docrecord.py index 7e31afe..e487cc0 100644 --- a/src/docrecord.py +++ b/src/docrecord.py @@ -436,6 +436,7 @@ class Sprm(DOCDirStream): nameMap = { 1: docsprm.parMap, 2: docsprm.chrMap, + 3: docsprm.picMap, 4: docsprm.secMap, 5: docsprm.tblMap, } diff --git a/src/docsprm.py b/src/docsprm.py index fcd01de..5dbffc6 100644 --- a/src/docsprm.py +++ b/src/docsprm.py @@ -5,6 +5,18 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. # +# see 2.6.5 of the spec +picMap = { + 0x6C02: "sprmPicBrcTop80", + 0x6C03: "sprmPicBrcLeft80", + 0x6C04: "sprmPicBrcBottom80", + 0x6C05: "sprmPicBrcRight80", + 0xCE08: "sprmPicBrcTop", + 0xCE09: "sprmPicBrcLeft", + 0xCE0A: "sprmPicBrcBottom", + 0xCE0B: "sprmPicBrcRight", + } + # see 2.6.4 of the spec secMap = { 0x3000: "sprmScnsPgn", @@ -155,6 +167,7 @@ tblMap = { # see 2.6.2 of the spec parMap = { 0x4600: "sprmPIstd", + 0x6654: "sprmPAnldCv", 0xC601: "sprmPIstdPermute", 0x2602: "sprmPIncLvl", 0x2403: "sprmPJc80", @@ -213,6 +226,7 @@ parMap = { 0x664A: "sprmPDtap", 0x244B: "sprmPFInnerTableCell", 0x244C: "sprmPFInnerTtp", + 0xC63E: "sprmPAnld80", 0xC64D: "sprmPShd", 0xC64E: "sprmPBrcTop", 0xC64F: "sprmPBrcLeft", @@ -312,6 +326,7 @@ chrMap = { 0x4866: "sprmCShd80", 0x4867: "sprmCIdslRMarkDel", 0x0868: "sprmCFUsePgsuSettings", + 0x486B: "sprmCCpg", 0x486D: "sprmCRgLid0_80", 0x486E: "sprmCRgLid1_80", 0x286F: "sprmCIdctHint", _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits