msodumper/docrecord.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)
New commits: commit 6890cac9f92d4e0d956dbb6bba450a2850ae5eec Author: Miklos Vajna <vmik...@collabora.com> AuthorDate: Mon Apr 17 15:48:41 2023 +0200 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Mon Apr 17 15:49:38 2023 +0200 doc-dump: show table border colors 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 <vmik...@collabora.com> Reviewed-by: Miklos Vajna <vmik...@collabora.com> 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: