summaryrefslogtreecommitdiff
path: root/wizards
diff options
context:
space:
mode:
authorXisco Fauli <anistenis@gmail.com>2014-02-12 00:19:17 +0100
committerXisco Fauli <anistenis@gmail.com>2014-02-13 19:18:18 +0100
commitfacfee75fac0ac26c29ec5fc05413f64c6b76c61 (patch)
treef2b449c18c6a73b38e39683b0fe3586f101aef55 /wizards
parent6beb51ac12ddf381520c745430fd646767c63889 (diff)
pywizards: use getResArray instead
Change-Id: I5afd7ad90c23e99be9b3cf81487da6bd7715b416
Diffstat (limited to 'wizards')
-rw-r--r--wizards/com/sun/star/wizards/common/Resource.py1
-rw-r--r--wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.py40
-rw-r--r--wizards/com/sun/star/wizards/letter/LetterWizardDialogResources.py30
3 files changed, 14 insertions, 57 deletions
diff --git a/wizards/com/sun/star/wizards/common/Resource.py b/wizards/com/sun/star/wizards/common/Resource.py
index 750c507d8330..a601b9c18ee9 100644
--- a/wizards/com/sun/star/wizards/common/Resource.py
+++ b/wizards/com/sun/star/wizards/common/Resource.py
@@ -22,7 +22,6 @@ from com.sun.star.awt.VclWindowPeerAttribute import OK
class Resource(object):
- @classmethod
def __init__(self, _xMSF, _Module):
self.xMSF = _xMSF
self.Module = _Module
diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.py b/wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.py
index d192a86bdafc..57302ddf63a1 100644
--- a/wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.py
+++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.py
@@ -29,10 +29,6 @@ class FaxWizardDialogResources(Resource):
def __init__(self, xmsf):
super(FaxWizardDialogResources,self).__init__(xmsf,
FaxWizardDialogResources.MODULE_NAME)
- self.RoadmapLabels = []
- self.SalutationLabels = []
- self.GreetingLabels = []
- self.CommunicationLabels = []
self.resFaxWizardDialog_title = self.getResText(
FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 1)
@@ -157,32 +153,12 @@ class FaxWizardDialogResources(Resource):
FaxWizardDialogResources.RID_RID_COMMON_START + 19)
self.resTemplateDescription = self.getResText(
FaxWizardDialogResources.RID_RID_COMMON_START + 20)
-
- self.loadRoadmapResources()
- self.loadSalutationResources()
- self.loadGreetingResources()
- self.loadCommunicationResources()
-
- def loadRoadmapResources(self):
- for i in range(5):
- self.RoadmapLabels.append(self.getResText(
- FaxWizardDialogResources.RID_FAXWIZARDROADMAP_START + \
- + i + 1))
-
- def loadSalutationResources(self):
- for i in range(4):
- self.SalutationLabels.append(self.getResText(
- FaxWizardDialogResources.RID_FAXWIZARDSALUTATION_START + \
- i + 1))
-
- def loadGreetingResources(self):
- for i in range(4):
- self.GreetingLabels.append(self.getResText(
- FaxWizardDialogResources.RID_FAXWIZARDGREETING_START + \
- i + 1))
- def loadCommunicationResources(self):
- for i in range(3):
- self.CommunicationLabels.append(self.getResText(
- FaxWizardDialogResources.RID_FAXWIZARDCOMMUNICATION_START + \
- i + 1))
+ self.RoadmapLabels = self.getResArray(
+ FaxWizardDialogResources.RID_FAXWIZARDROADMAP_START + 1 , 5)
+ self.SalutationLabels = self.getResArray(
+ FaxWizardDialogResources.RID_FAXWIZARDSALUTATION_START + 1 , 4)
+ self.GreetingLabels = self.getResArray(
+ FaxWizardDialogResources.RID_FAXWIZARDGREETING_START + 1 , 4)
+ self.CommunicationLabels = self.getResArray(
+ FaxWizardDialogResources.RID_FAXWIZARDCOMMUNICATION_START + 1 , 3)
diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialogResources.py b/wizards/com/sun/star/wizards/letter/LetterWizardDialogResources.py
index a59ba71f9a09..748a51b35ab3 100644
--- a/wizards/com/sun/star/wizards/letter/LetterWizardDialogResources.py
+++ b/wizards/com/sun/star/wizards/letter/LetterWizardDialogResources.py
@@ -30,9 +30,6 @@ class LetterWizardDialogResources(Resource):
def __init__(self, xmsf):
super(LetterWizardDialogResources,self).__init__(
xmsf, LetterWizardDialogResources.MODULE_NAME)
- self.RoadmapLabels = []
- self.SalutationLabels = []
- self.GreetingLabels = []
self.resLetterWizardDialog_title = \
self.getResText(
@@ -248,24 +245,9 @@ class LetterWizardDialogResources(Resource):
self.getResText(
LetterWizardDialogResources.RID_RID_COMMON_START + 20)
- self.loadRoadmapResources()
- self.loadSalutationResources()
- self.loadGreetingResources()
-
- def loadRoadmapResources(self):
- for i in range(6):
- self.RoadmapLabels.append(self.getResText(
- LetterWizardDialogResources.RID_LETTERWIZARDROADMAP_START + \
- i + 1))
-
- def loadSalutationResources(self):
- for i in range(3):
- self.SalutationLabels.append(self.getResText(
- LetterWizardDialogResources.RID_LETTERWIZARDSALUTATION_START + \
- i + 1))
-
- def loadGreetingResources(self):
- for i in range(3):
- self.GreetingLabels.append(self.getResText(
- LetterWizardDialogResources.RID_LETTERWIZARDGREETING_START + \
- i + 1))
+ self.RoadmapLabels = self.getResArray(
+ LetterWizardDialogResources.RID_LETTERWIZARDROADMAP_START + 1, 6)
+ self.SalutationLabels = self.getResArray(
+ LetterWizardDialogResources.RID_LETTERWIZARDSALUTATION_START + 1, 3)
+ self.GreetingLabels = self.getResArray(
+ LetterWizardDialogResources.RID_LETTERWIZARDGREETING_START + 1, 3)