ooo-build r14229 - in trunk: . scratch/sc-xlsutil/src



Author: kyoshida
Date: Tue Oct  7 00:33:35 2008
New Revision: 14229
URL: http://svn.gnome.org/viewvc/ooo-build?rev=14229&view=rev

Log:
2008-10-06  Kohei Yoshida  <kyoshida novell com>

	* scratch/sc-xlsutil/src/record.py:
	* scratch/sc-xlsutil/src/stream.py: added handler for STRING records.


Modified:
   trunk/ChangeLog
   trunk/scratch/sc-xlsutil/src/record.py
   trunk/scratch/sc-xlsutil/src/stream.py

Modified: trunk/scratch/sc-xlsutil/src/record.py
==============================================================================
--- trunk/scratch/sc-xlsutil/src/record.py	(original)
+++ trunk/scratch/sc-xlsutil/src/record.py	Tue Oct  7 00:33:35 2008
@@ -153,6 +153,15 @@
         self.appendLine("value: %g"%realVal)
 
 
+class String(BaseRecordHandler):
+    """Cached string formula result for preceding formula record."""
+
+    def parseBytes (self):
+        strLen = globals.getSignedInt(self.bytes[0:1])
+        name, byteLen = globals.getRichText(self.bytes[2:], strLen)
+        self.appendLine("string value: '%s'"%name)
+
+
 class Blank(BaseRecordHandler):
 
     def parseBytes (self):

Modified: trunk/scratch/sc-xlsutil/src/stream.py
==============================================================================
--- trunk/scratch/sc-xlsutil/src/stream.py	(original)
+++ trunk/scratch/sc-xlsutil/src/stream.py	Tue Oct  7 00:33:35 2008
@@ -169,7 +169,7 @@
     0x0203: ["NUMBER", "Floating-Point Cell Value", record.Number],
     0x0204: ["LABEL", "Cell Value"],
     0x0205: ["BOOLERR", "Cell Value"],
-    0x0207: ["STRING", "String Value of a Formula"],
+    0x0207: ["STRING", "String Value of a Formula", record.String],
     0x0208: ["ROW", "Describes a Row", record.Row],
     0x020B: ["INDEX", "Index Record"],
     0x0218: ["NAME", "Defined Name"],



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]