Bug 3018: ImportGrdb: remove calls to keys() dictionary method where possible

svn: r12572
This commit is contained in:
Gerald Britton
2009-05-26 20:48:09 +00:00
parent 51f65aa02f
commit 5eb7e18dc6
47 changed files with 134 additions and 199 deletions

View File

@@ -1,4 +1,4 @@
#
k#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000-2004 Donald N. Allingham
@@ -111,10 +111,9 @@ class ODSDoc(SpreadSheetDoc):
self.f.write('style:font-family-generic="swiss" ')
self.f.write('style:font-pitch="variable"/>\n')
self.f.write('</office:font-face-decls>\n')
self.f.write('<office:automatic-styles>\n')
for key in self.table_styles.keys():
table = self.table_styles[key]
for key, table in self.table_styles.iteritems():
self.f.write('<style:style style:name="')
self.f.write(key)
self.f.write('" style:family="table" ')
@@ -133,8 +132,7 @@ class ODSDoc(SpreadSheetDoc):
self.f.write('<style:table-row-properties fo:break-before="auto"/>\n')
self.f.write('</style:style>\n')
for key in self.style_list.keys():
style = self.style_list[key]
for key, style in self.style_list.iteritems():
font = style.get_font()
self.f.write('<style:style style:name="')
self.f.write(key)

View File

@@ -106,8 +106,8 @@ class OpenSpreadSheet(SpreadSheetDoc):
self.f.write('style:font-pitch="variable"/>\n')
self.f.write('</office:font-decls>\n')
self.f.write('<office:automatic-styles>\n')
for key in self.table_styles.keys():
table = self.table_styles[key]
for key, table in self.table_styles.iteritems():
self.f.write('<style:style style:name="')
self.f.write(key)
self.f.write('" style:family="table">\n')
@@ -125,9 +125,8 @@ class OpenSpreadSheet(SpreadSheetDoc):
self.f.write('<style:style style:name="ro1" style:family="table-row">\n')
self.f.write('<style:properties fo:break-before="auto"/>\n')
self.f.write('</style:style>\n')
for key in self.style_list.keys():
style = self.style_list[key]
for key, style in self.style_list.iteritems():
font = style.get_font()
self.f.write('<style:style style:name="')
self.f.write(key)