diff options
author | Xisco <xisco@xisco-PC.(none)> | 2013-09-17 20:48:47 +0200 |
---|---|---|
committer | Xisco Fauli <anistenis@gmail.com> | 2013-11-18 21:29:50 +0100 |
commit | 137244d9d4df6f0aeaa8ba81203b51bd3588b1e6 (patch) | |
tree | 22fae80ddb9db159a05651b5e209f752bea69239 /wizards | |
parent | 88e65df2e4be47ae3ae1ae1b3a30003f4cfe4b11 (diff) |
pyagenda: Use for instead of while, same logic
Change-Id: I9a18e2178f89f887a1243db77297cee0dd9c2310
Diffstat (limited to 'wizards')
-rw-r--r-- | wizards/com/sun/star/wizards/agenda/AgendaDocument.py | 15 |
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 |