diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2023-04-17 15:48:41 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2023-04-17 15:49:38 +0200 |
commit | 6890cac9f92d4e0d956dbb6bba450a2850ae5eec (patch) | |
tree | bb6a19b7b826b15f2fcb7531f33138f542be6feb /msodumper | |
parent | adf707e6680ffc03fbd7cd1948a1b0290825214a (diff) |
Seen in core.git sw/qa/extras/ww8export/data/tdf80635_pageRightRTL.doc.
Change-Id: I72ce7303bf1700670cd2ecd6623af60afd348b7e
Reviewed-on: https://gerrit.libreoffice.org/c/mso-dumper/+/150519
Tested-by: Miklos Vajna <vmiklos@collabora.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'msodumper')
-rw-r--r-- | msodumper/docrecord.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/msodumper/docrecord.py b/msodumper/docrecord.py index d7df861..dea48bc 100644 --- a/msodumper/docrecord.py +++ b/msodumper/docrecord.py @@ -818,6 +818,23 @@ class CMajorityOperand(BinaryStream): print('</cMajorityOperand>') +class BrcCvOperand(BinaryStream): + """The BrcCvOperand structure specifies border colors.""" + def __init__(self, parent): + BinaryStream.__init__(self, parent.bytes) + self.pos = parent.pos + + def dump(self): + print('<bcrCvOperand type="BrcCvOperand" offset="%d">' % self.pos) + self.printAndSet("cb", self.readuInt8()) + pos = self.pos + print('<rgcv offset="%d" size="%d bytes">' % (self.pos, self.cb)) + while self.pos - pos < self.cb: + COLORREF(self).dump("cv") + print('</rgcv>') + print('</bcrCvOperand>') + + # The PgbApplyTo enumeration is used to specify the pages to which a page border applies. PgbApplyTo = { 0x0: "pgbAllPages", @@ -1596,6 +1613,8 @@ class Sprm(BinaryStream): self.ct = DefTableShd80Operand(self) elif self.sprm == 0xca47: self.ct = CMajorityOperand(self) + elif self.sprm in (0xD61A, 0xD61B, 0xD61C, 0xD61D): + self.ct = BrcCvOperand(self) else: print('<todo what="Sprm::__init__() unhandled sprm of size 9: %s"/>' % hex(self.sprm)) else: |