diff options
author | Eike Rathke <erack@redhat.com> | 2014-03-18 11:11:57 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2014-03-18 11:11:57 +0100 |
commit | c4192de229ceb549b0a7bc26fa1b1fc38972d83d (patch) | |
tree | 89991d888cd8b2f6515cb6a29b966d9931dd6158 /msodumper/xlsrecord.py | |
parent | f0e8c8fea614960d28cc2e52fd32d02dbdebd01f (diff) |
partly implemented FEAT FeatProtection structure
Diffstat (limited to 'msodumper/xlsrecord.py')
-rw-r--r-- | msodumper/xlsrecord.py | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/msodumper/xlsrecord.py b/msodumper/xlsrecord.py index b3cbece..1a0f336 100644 --- a/msodumper/xlsrecord.py +++ b/msodumper/xlsrecord.py @@ -2717,17 +2717,24 @@ class FeatureData(BaseRecordHandler): self.appendLine("feature type: %d (%s)"%(featureTypeId, featureTypeText)) self.appendLine("size of feature data: %d (%s)"%(cbFeatData, cbFeatDataText)) - # http://msdn.microsoft.com/en-us/library/dd911261.aspx - # Documentation isn't very clear on this, for cbFeatData it says must - # be 0 if 'isf' (featureTypeId) is not ISFFEC2 (type 3) but for rgbFeat - # (the variable data field) lists structures for each of the possible - # types. However, so far there was no FeatProtection structure data for - # ISFPROTECTION encountered. - - if featureTypeId == 3 and cbFeatData > 0: + if featureTypeId == 2: + # enhanced protection, ISFPROTECTION, FeatProtection structure + Areserved = self.readUnsignedInt(4) + wPassword = self.readUnsignedInt(4) + stTitle = self.readXLUnicodeString() + self.appendLine("stTitle: %s"%stTitle) + if Areserved & 1 == 1: + # SDContainer + cbSD = self.readUnsignedInt(4) + self.appendLine("cbSD: %d"%cbSD) + self.readBytes(cbSD) + elif featureTypeId == 3 and cbFeatData > 0: # ignored formula errors, ISFFEC2, FeatFormulaErr2 structure self.readBytes(cbFeatData) - self.appendLine("FeatFormulaErr2 yet not handled") + self.appendLine("FeatFormulaErr2 not handled") + elif featureTypeId == 4: + # smart tag, ISFFACTOID, FeatSmartTag structure + self.appendLine("FeatSmartTag not handled") for ref in refs: self.appendLine("applied to range: (col=%d,row=%d) - (col=%d,row=%d)"% |