[Libreoffice-commits] .: 3 commits - src/docrecord.py
Miklos Vajna
vmiklos at kemper.freedesktop.org
Tue Nov 27 04:26:34 PST 2012
src/docrecord.py | 160 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 158 insertions(+), 2 deletions(-)
New commits:
commit 9f423619134925a5ba2c8d8a03693fdc3d0277ae
Author: Miklos Vajna <vmiklos at suse.cz>
Date: Tue Nov 27 13:21:59 2012 +0100
dump Dop2002
diff --git a/src/docrecord.py b/src/docrecord.py
index 65fc5e8..649eddd 100755
--- a/src/docrecord.py
+++ b/src/docrecord.py
@@ -910,6 +910,7 @@ class Dop2000(DOCDirStream):
self.dop = dop
def dump(self):
+ print '<dop2000 type="Dop2000" offset="%d" size="544 bytes">' % self.pos
dop97 = Dop97(self)
dop97.dump()
assert dop97.pos == self.pos + 500
@@ -967,6 +968,7 @@ class Dop2000(DOCDirStream):
self.printAndSet("fSaveInvalidXML", self.getBit(buf, 5))
self.printAndSet("fShowXMLErrors", self.getBit(buf, 6))
self.printAndSet("fAlwaysMergeEmptyNamespace", self.getBit(buf, 7))
+ print '</dop2000>'
class Dop2002(DOCDirStream):
"""The Dop2002 structure contains document and compatibility settings."""
@@ -976,11 +978,47 @@ class Dop2002(DOCDirStream):
self.dop = dop
def dump(self):
+ print '<dop2002 type="Dop2000" offset="%d" size="594 bytes">' % self.pos
dop2000 = Dop2000(self)
dop2000.dump()
assert dop2000.pos == self.pos + 544
self.pos += 544
+ self.printAndSet("unused", self.readuInt32())
+
+ buf = self.readuInt8()
+ self.printAndSet("fDoNotEmbedSystemFont", self.getBit(buf, 0))
+ self.printAndSet("fWordCompat", self.getBit(buf, 1))
+ self.printAndSet("fLiveRecover", self.getBit(buf, 2))
+ self.printAndSet("fEmbedFactoids", self.getBit(buf, 3))
+ self.printAndSet("fFactoidXML", self.getBit(buf, 4))
+ self.printAndSet("fFactoidAllDone", self.getBit(buf, 5))
+ self.printAndSet("fFolioPrint", self.getBit(buf, 6))
+ self.printAndSet("fReverseFolio", self.getBit(buf, 7))
+
+ buf = self.readuInt8()
+ self.printAndSet("iTextLineEnding", (buf & 0x7)) # 1..3rd bits
+ self.printAndSet("fHideFcc", self.getBit(buf, 3))
+ self.printAndSet("fAcetateShowMarkup", self.getBit(buf, 4))
+ self.printAndSet("fAcetateShowAtn", self.getBit(buf, 5))
+ self.printAndSet("fAcetateShowInsDel", self.getBit(buf, 6))
+ self.printAndSet("fAcetateShowProps", self.getBit(buf, 7))
+
+ self.printAndSet("istdTableDflt", self.readuInt16())
+ self.printAndSet("verCompat", self.readuInt16())
+ self.printAndSet("grfFmtFilter", self.readuInt16())
+ self.printAndSet("iFolioPages", self.readuInt16())
+ self.printAndSet("cpgText", self.readuInt32())
+ self.printAndSet("cpMinRMText", self.readuInt32())
+ self.printAndSet("cpMinRMFtn", self.readuInt32())
+ self.printAndSet("cpMinRMHdd", self.readuInt32())
+ self.printAndSet("cpMinRMAtn", self.readuInt32())
+ self.printAndSet("cpMinRMEdn", self.readuInt32())
+ self.printAndSet("cpMinRmTxbx", self.readuInt32())
+ self.printAndSet("cpMinRmHdrTxbx", self.readuInt32())
+ self.printAndSet("rsidRoot", self.readuInt32())
+ print '</dop2002>'
+
class Dop2003(DOCDirStream):
"""The Dop2003 structure contains document and compatibility settings."""
def __init__(self, dop):
@@ -989,7 +1027,9 @@ class Dop2003(DOCDirStream):
self.dop = dop
def dump(self):
- Dop2002(self).dump()
+ dop2002 = Dop2002(self)
+ dop2002.dump()
+ assert dop2002.pos == self.pos + 594
self.pos += 594
class Dop2007(DOCDirStream):
commit cfc1401a09fbabe26a8d57297cc1f389763f1c3a
Author: Miklos Vajna <vmiklos at suse.cz>
Date: Tue Nov 27 12:53:54 2012 +0100
dump Dop2000
diff --git a/src/docrecord.py b/src/docrecord.py
index f52a585..65fc5e8 100755
--- a/src/docrecord.py
+++ b/src/docrecord.py
@@ -947,6 +947,27 @@ class Dop2000(DOCDirStream):
assert copts.pos == self.pos + 32
self.pos += 32
+ self.printAndSet("verCompatPre10", self.readuInt16())
+ buf = self.readuInt8()
+ self.printAndSet("fNoMargPgvwSaved", self.getBit(buf, 0))
+ self.printAndSet("unused2", self.getBit(buf, 1))
+ self.printAndSet("unused3", self.getBit(buf, 2))
+ self.printAndSet("unused4", self.getBit(buf, 3))
+ self.printAndSet("fBulletProofed", self.getBit(buf, 4))
+ self.printAndSet("empty2", self.getBit(buf, 5))
+ self.printAndSet("fSaveUim", self.getBit(buf, 6))
+ self.printAndSet("fFilterPrivacy", self.getBit(buf, 7))
+
+ buf = self.readuInt8()
+ self.printAndSet("empty3", self.getBit(buf, 0))
+ self.printAndSet("fSeenRepairs", self.getBit(buf, 1))
+ self.printAndSet("fHasXML", self.getBit(buf, 2))
+ self.printAndSet("unused5", self.getBit(buf, 3))
+ self.printAndSet("fValidateXML", self.getBit(buf, 4))
+ self.printAndSet("fSaveInvalidXML", self.getBit(buf, 5))
+ self.printAndSet("fShowXMLErrors", self.getBit(buf, 6))
+ self.printAndSet("fAlwaysMergeEmptyNamespace", self.getBit(buf, 7))
+
class Dop2002(DOCDirStream):
"""The Dop2002 structure contains document and compatibility settings."""
def __init__(self, dop):
@@ -955,7 +976,9 @@ class Dop2002(DOCDirStream):
self.dop = dop
def dump(self):
- Dop2000(self).dump()
+ dop2000 = Dop2000(self)
+ dop2000.dump()
+ assert dop2000.pos == self.pos + 544
self.pos += 544
class Dop2003(DOCDirStream):
commit 4b09bddd5d011d1c055552a9a683748ab31ee0e9
Author: Miklos Vajna <vmiklos at suse.cz>
Date: Tue Nov 27 12:48:33 2012 +0100
dump Copts
diff --git a/src/docrecord.py b/src/docrecord.py
index 45c8e03..f52a585 100755
--- a/src/docrecord.py
+++ b/src/docrecord.py
@@ -754,6 +754,67 @@ class Copts80(DOCDirStream):
self.printAndSet("fPrintMet", self.getBit(buf, 7))
print '</copts80>'
+class Copts(DOCDirStream):
+ """A structure that specifies compatibility options."""
+ def __init__(self, dop):
+ DOCDirStream.__init__(self, dop.bytes)
+ self.pos = dop.pos
+
+ def dump(self):
+ print '<copts type="Copts" offset="%d" size="32 bytes">' % self.pos
+ Copts80(self).dump()
+ self.pos += 4
+
+ buf = self.readuInt8()
+ self.printAndSet("fSpLayoutLikeWW8", self.getBit(buf, 0))
+ self.printAndSet("fFtnLayoutLikeWW8", self.getBit(buf, 1))
+ self.printAndSet("fDontUseHTMLParagraphAutoSpacing", self.getBit(buf, 2))
+ self.printAndSet("fDontAdjustLineHeightInTable", self.getBit(buf, 3))
+ self.printAndSet("fForgetLastTabAlign", self.getBit(buf, 4))
+ self.printAndSet("fUseAutospaceForFullWidthAlpha", self.getBit(buf, 5))
+ self.printAndSet("fAlignTablesRowByRow", self.getBit(buf, 6))
+ self.printAndSet("fLayoutRawTableWidth", self.getBit(buf, 7))
+
+ buf = self.readuInt8()
+ self.printAndSet("fLayoutTableRowsApart", self.getBit(buf, 0))
+ self.printAndSet("fUseWord97LineBreakingRules", self.getBit(buf, 1))
+ self.printAndSet("fDontBreakWrappedTables", self.getBit(buf, 2))
+ self.printAndSet("fDontSnapToGridInCell", self.getBit(buf, 3))
+ self.printAndSet("fDontAllowFieldEndSelect", self.getBit(buf, 4))
+ self.printAndSet("fApplyBreakingRules", self.getBit(buf, 5))
+ self.printAndSet("fDontWrapTextWithPunct", self.getBit(buf, 6))
+ self.printAndSet("fDontUseAsianBreakRules", self.getBit(buf, 7))
+
+ buf = self.readuInt8()
+ self.printAndSet("fUseWord2002TableStyleRules", self.getBit(buf, 0))
+ self.printAndSet("fGrowAutoFit", self.getBit(buf, 1))
+ self.printAndSet("fUseNormalStyleForList", self.getBit(buf, 2))
+ self.printAndSet("fDontUseIndentAsNumberingTabStop", self.getBit(buf, 3))
+ self.printAndSet("fFELineBreak11", self.getBit(buf, 4))
+ self.printAndSet("fAllowSpaceOfSameStyleInTable", self.getBit(buf, 5))
+ self.printAndSet("fWW11IndentRules", self.getBit(buf, 6))
+ self.printAndSet("fDontAutofitConstrainedTables", self.getBit(buf, 7))
+
+ buf = self.readuInt8()
+ self.printAndSet("fAutofitLikeWW11", self.getBit(buf, 0))
+ self.printAndSet("fUnderlineTabInNumList", self.getBit(buf, 1))
+ self.printAndSet("fHangulWidthLikeWW11", self.getBit(buf, 2))
+ self.printAndSet("fSplitPgBreakAndParaMark", self.getBit(buf, 3))
+ self.printAndSet("fDontVertAlignCellWithSp", self.getBit(buf, 4))
+ self.printAndSet("fDontBreakConstrainedForcedTables", self.getBit(buf, 5))
+ self.printAndSet("fDontVertAlignInTxbx", self.getBit(buf, 6))
+ self.printAndSet("fWord11KerningPairs", self.getBit(buf, 7))
+
+ buf = self.readuInt32()
+ self.printAndSet("fCachedColBalance", self.getBit(buf, 0))
+ self.printAndSet("empty1", (buf & 0xfffffffe) >> 1) # 2..32th bits
+ self.printAndSet("empty2", self.readuInt32())
+ self.printAndSet("empty3", self.readuInt32())
+ self.printAndSet("empty4", self.readuInt32())
+ self.printAndSet("empty5", self.readuInt32())
+ self.printAndSet("empty6", self.readuInt32())
+ print '</copts>'
+
class Dop95(DOCDirStream):
"""The Dop95 structure contains document and compatibility settings."""
def __init__(self, dop):
@@ -854,6 +915,38 @@ class Dop2000(DOCDirStream):
assert dop97.pos == self.pos + 500
self.pos += 500
+ self.printAndSet("ilvlLastBulletMain", self.readuInt8())
+ self.printAndSet("ilvlLastNumberMain", self.readuInt8())
+ self.printAndSet("istdClickParaType", self.readuInt16())
+
+ buf = self.readuInt8()
+ self.printAndSet("fLADAllDone", self.getBit(buf, 0))
+ self.printAndSet("fEnvelopeVis", self.getBit(buf, 1))
+ self.printAndSet("fMaybeTentativeListInDoc", self.getBit(buf, 2))
+ self.printAndSet("fMaybeFitText", self.getBit(buf, 3))
+ self.printAndSet("empty1", (buf & 0xf0) >> 4) # 5..8th bits
+
+ buf = self.readuInt8()
+ self.printAndSet("fFCCAllDone", self.getBit(buf, 0))
+ self.printAndSet("fRelyOnCSS_WebOpt", self.getBit(buf, 1))
+ self.printAndSet("fRelyOnVML_WebOpt", self.getBit(buf, 2))
+ self.printAndSet("fAllowPNG_WebOpt", self.getBit(buf, 3))
+ self.printAndSet("screenSize_WebOpt", (buf & 0xf0) >> 4) # 5..8th bits
+
+ buf = self.readuInt16()
+ self.printAndSet("fOrganizeInFolder_WebOpt", self.getBit(buf, 0))
+ self.printAndSet("fUseLongFileNames_WebOpt", self.getBit(buf, 1))
+ self.printAndSet("iPixelsPerInch_WebOpt", (buf & 0x0ffc) >> 2) # 3..12th bits
+ self.printAndSet("fWebOptionsInit", self.getBit(buf, 12))
+ self.printAndSet("fMaybeFEL", self.getBit(buf, 12))
+ self.printAndSet("fCharLineUnits", self.getBit(buf, 12))
+ self.printAndSet("unused1", self.getBit(buf, 12))
+
+ copts = Copts(self)
+ copts.dump()
+ assert copts.pos == self.pos + 32
+ self.pos += 32
+
class Dop2002(DOCDirStream):
"""The Dop2002 structure contains document and compatibility settings."""
def __init__(self, dop):
More information about the Libreoffice-commits
mailing list