[Libreoffice-commits] .: src/xlsrecord.py src/xlsstream.py
Kohei Yoshida
kohei at kemper.freedesktop.org
Wed Feb 23 09:55:18 PST 2011
src/xlsrecord.py | 12 ++++++++++++
src/xlsstream.py | 2 +-
2 files changed, 13 insertions(+), 1 deletion(-)
New commits:
commit 88aa980fbf1d921b51884928fdc82202bdbb96d3
Author: Kohei Yoshida <kyoshida at novell.com>
Date: Wed Feb 23 12:54:34 2011 -0500
Added handler for the FORMAT record.
This record stores cell number format information.
diff --git a/src/xlsrecord.py b/src/xlsrecord.py
index a7b7781..8c73e6b 100644
--- a/src/xlsrecord.py
+++ b/src/xlsrecord.py
@@ -908,6 +908,18 @@ class FilterMode(BaseRecordHandler):
self.appendMultiLine("NOTE: The presence of this record indicates that the sheet has a filtered list.")
+class Format(BaseRecordHandler):
+
+ def __parseBytes (self):
+ self.numfmtID = self.readUnsignedInt(2)
+ self.code = self.readUnicodeString()
+
+ def parseBytes (self):
+ self.__parseBytes()
+ self.appendLine("index: %d"%self.numfmtID)
+ self.appendLine("code: %s"%self.code)
+
+
class Formula(BaseRecordHandler):
def __parseBytes (self):
diff --git a/src/xlsstream.py b/src/xlsstream.py
index 181865a..f7a195a 100644
--- a/src/xlsstream.py
+++ b/src/xlsstream.py
@@ -216,7 +216,7 @@ recData = {
0x023E: ["WINDOW2", "Sheet Window Information"],
0x027E: ["RK", "Cell with Encoded Integer or Floating-Point", xlsrecord.RK],
0x0293: ["STYLE", "Style Information"],
- 0x041E: ["FORMAT", "Number Format"],
+ 0x041E: ["FORMAT", "Number Format", xlsrecord.Format],
0x0802: ["QSISXTAG", "Pivot Table and Query Table Extensions", xlsrecord.PivotQueryTableEx],
0x0809: ["BOF", "Beginning of File", xlsrecord.BOF],
0x0810: ["SXVIEWEX9", "Pivot Table Extensions", xlsrecord.SXViewEx9],
More information about the Libreoffice-commits
mailing list