summaryrefslogtreecommitdiff
path: root/wizards/com
diff options
context:
space:
mode:
authorXisco <xisco@xisco-PC.(none)>2013-09-17 20:48:47 +0200
committerXisco Fauli <anistenis@gmail.com>2013-11-18 21:29:50 +0100
commit137244d9d4df6f0aeaa8ba81203b51bd3588b1e6 (patch)
tree22fae80ddb9db159a05651b5e209f752bea69239 /wizards/com
parent88e65df2e4be47ae3ae1ae1b3a30003f4cfe4b11 (diff)
pyagenda: Use for instead of while, same logic
Change-Id: I9a18e2178f89f887a1243db77297cee0dd9c2310
Diffstat (limited to 'wizards/com')
-rw-r--r--wizards/com/sun/star/wizards/agenda/AgendaDocument.py15
1 files changed, 7 insertions, 8 deletions
diff --git a/wizards/com/sun/star/wizards/agenda/AgendaDocument.py b/wizards/com/sun/star/wizards/agenda/AgendaDocument.py
index a8dcece9d826..d9013bad1b8f 100644
--- a/wizards/com/sun/star/wizards/agenda/AgendaDocument.py
+++ b/wizards/com/sun/star/wizards/agenda/AgendaDocument.py
@@ -609,19 +609,18 @@ class ItemsTable(object):
and remove them from the list of all <*> items, so the next
search will be faster.
'''
- i = 0
- while i < len(self.agenda.allItems):
- workwith = self.agenda.allItems[i]
- t = workwith.TextTable
+ aux = []
+ for item in self.agenda.allItems:
+ t = item.TextTable
if t == ItemsTable.table:
- iText = workwith.String.lower().lstrip()
+ iText = item.String.lower().lstrip()
ai = self.agenda.itemsCache[iText]
if ai is not None:
self.items.append(ai)
- del self.agenda.allItems[i]
self.agenda.itemsMap[iText] = self
- i -= 1
- i += 1
+ else:
+ aux.append(item)
+ self.agenda.allItems = aux
'''
link the section to the template. this will restore the original table