summaryrefslogtreecommitdiff
path: root/wizards
diff options
context:
space:
mode:
authorXisco Fauli <anistenis@gmail.com>2011-07-17 00:37:15 +0200
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-08-18 02:57:43 +0200
commit80fc1ff50180c7779014b5f060fb6db4ec06a63c (patch)
treea711b5c18608397b73ea0e84e87dbe6c773faaf8 /wizards
parentdb0e2da971b5b4b7edf403af9382be57fea788e3 (diff)
Replace xrange(len(x))
Diffstat (limited to 'wizards')
-rw-r--r--wizards/com/sun/star/wizards/common/Helper.py6
-rw-r--r--wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py12
-rw-r--r--wizards/com/sun/star/wizards/ui/event/RadioDataAware.py6
3 files changed, 12 insertions, 12 deletions
diff --git a/wizards/com/sun/star/wizards/common/Helper.py b/wizards/com/sun/star/wizards/common/Helper.py
index eaa615ded90c..25f437505774 100644
--- a/wizards/com/sun/star/wizards/common/Helper.py
+++ b/wizards/com/sun/star/wizards/common/Helper.py
@@ -111,9 +111,9 @@ class Helper(object):
uno.invoke(xMultiPSetLst, "setPropertyValues",
(PropertyNames, PropertyValues))
else:
- for i in xrange(len(PropertyNames)):
- self.setUnoPropertyValue(xMultiPSetLst, PropertyNames[i],
- PropertyValues[i])
+ for index, workwith in enumerate(PropertyNames):
+ self.setUnoPropertyValue(
+ xMultiPSetLst, PropertyNames[index], workwith)
except Exception, e:
traceback.print_exc()
diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py
index 33e9abc87583..694575d2a363 100644
--- a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py
+++ b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py
@@ -792,16 +792,16 @@ class LetterWizardDialogImpl(LetterWizardDialog):
found = False
OfficeLinguistic = Configuration.getOfficeLinguistic(self.xMSF)
i = 0
- for i in xrange(len(self.Norms)):
- if self.Norms[i].lower() == OfficeLinguistic.lower():
- oL = i
+ for index, workwith in enumerate(self.Norms):
+ if workwith.lower() == OfficeLinguistic.lower():
+ oL = index
found = True
break
if not found:
- for i in xrange(len(self.Norms)):
- if self.Norms[i].lower() == "en-US".lower():
- oL = i
+ for index, workwith in enumerate(self.Norms):
+ if workwith.lower() == "en-US".lower():
+ oL = index
found = True
break
return oL
diff --git a/wizards/com/sun/star/wizards/ui/event/RadioDataAware.py b/wizards/com/sun/star/wizards/ui/event/RadioDataAware.py
index 41ce307a0c15..31d37407c4e7 100644
--- a/wizards/com/sun/star/wizards/ui/event/RadioDataAware.py
+++ b/wizards/com/sun/star/wizards/ui/event/RadioDataAware.py
@@ -24,9 +24,9 @@ class RadioDataAware(DataAware):
self.radioButtons[selected].State = True
def getFromUI(self):
- for i in xrange(len(self.radioButtons)):
- if self.radioButtons[i].State:
- return i
+ for index, workwith in enumerate(self.radioButtons):
+ if workwith.State:
+ return index
return -1