ooo-build r14418 - in trunk: . scratch/sc-xlsutil
- From: kyoshida svn gnome org
- To: svn-commits-list gnome org
- Subject: ooo-build r14418 - in trunk: . scratch/sc-xlsutil
- Date: Tue, 28 Oct 2008 15:59:51 +0000 (UTC)
Author: kyoshida
Date: Tue Oct 28 15:59:51 2008
New Revision: 14418
URL: http://svn.gnome.org/viewvc/ooo-build?rev=14418&view=rev
Log:
2008-10-28 Kohei Yoshida <kyoshida novell com>
* scratch/sc-xlsutil/xls_dump.py: cleaned up redundant code.
Modified:
trunk/ChangeLog
trunk/scratch/sc-xlsutil/xls_dump.py
Modified: trunk/scratch/sc-xlsutil/xls_dump.py
==============================================================================
--- trunk/scratch/sc-xlsutil/xls_dump.py (original)
+++ trunk/scratch/sc-xlsutil/xls_dump.py Tue Oct 28 15:59:51 2008
@@ -50,46 +50,29 @@
if dirname == "Workbook":
success = True
while success:
- success = self.__readSheetSubStream(dirstrm)
+ success = self.__readSubStream(dirstrm)
elif dirname == "Revision Log":
dirstrm.type = stream.DirType.RevisionLog
- try:
- header = 0x0000
- while header != 0x000A:
- header = dirstrm.readRecord()
- except stream.EndOfStream:
- continue
+ self.__readSubStream(dirstrm)
elif dirname == '_SX_DB_CUR':
dirstrm.type = stream.DirType.PivotTableCache
- try:
- header = 0x0000
- while header != 0x000A:
- header = dirstrm.readRecord()
- except stream.EndOfStream:
- continue
+ self.__readSubStream(dirstrm)
elif strmData.isPivotCacheStream(dirname):
dirstrm.type = stream.DirType.PivotTableCache
- try:
- header = 0x0000
- while header != 0x000A:
- header = dirstrm.readRecord()
- except stream.EndOfStream:
- continue
+ self.__readSubStream(dirstrm)
else:
globals.dumpBytes(dirstrm.bytes, 512)
-
- def __readSheetSubStream (self, strm):
- try:
- # read bytes from BOF to EOF.
- header = 0x0000
- while header != 0x000A:
- header = strm.readRecord()
- return True
-
- except stream.EndOfStream:
- return False
+ def __readSubStream (self, strm):
+ try:
+ # read bytes from BOF to EOF.
+ header = 0x0000
+ while header != 0x000A:
+ header = strm.readRecord()
+ return True
+ except stream.EndOfStream:
+ return False
def main (args):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]