summaryrefslogtreecommitdiff
path: root/wizards
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-05-21 15:04:01 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-05-21 19:27:59 +0200
commit38632f933ae9361dad48b2123670876d7d602867 (patch)
tree89b864756d4591b654f7f8e0b8d67d72818fee7d /wizards
parent7fe9be7d273e9ec56e75f8bbd532fda1f59e98b9 (diff)
expand and drop python getResArray
Change-Id: Ie81495a15376b01b0e87ee84628b8c6945897a3d Reviewed-on: https://gerrit.libreoffice.org/37877 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'wizards')
-rw-r--r--wizards/com/sun/star/wizards/agenda/AgendaWizardDialogResources.py9
-rw-r--r--wizards/com/sun/star/wizards/common/Resource.py10
-rw-r--r--wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.py28
-rw-r--r--wizards/com/sun/star/wizards/letter/LetterWizardDialogResources.py21
4 files changed, 42 insertions, 26 deletions
diff --git a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogResources.py b/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogResources.py
index 292059cce2a7..f10587a94d3a 100644
--- a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogResources.py
+++ b/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogResources.py
@@ -217,5 +217,10 @@ class AgendaWizardDialogResources(object):
self.resTemplateDescription = oWizardResource.getResText(
AgendaWizardDialogResources.RID_COMMON_START + 20)
- self.RoadmapLabels = oWizardResource.getResArray(
- AgendaWizardDialogResources.RID_AGENDAWIZARDROADMAP_START + 1 , 6)
+ self.RoadmapLabels = []
+ self.RoadmapLabels.append(oWizardResource.getResText(AgendaWizardDialogResources.RID_AGENDAWIZARDROADMAP_START + 1))
+ self.RoadmapLabels.append(oWizardResource.getResText(AgendaWizardDialogResources.RID_AGENDAWIZARDROADMAP_START + 2))
+ self.RoadmapLabels.append(oWizardResource.getResText(AgendaWizardDialogResources.RID_AGENDAWIZARDROADMAP_START + 3))
+ self.RoadmapLabels.append(oWizardResource.getResText(AgendaWizardDialogResources.RID_AGENDAWIZARDROADMAP_START + 4))
+ self.RoadmapLabels.append(oWizardResource.getResText(AgendaWizardDialogResources.RID_AGENDAWIZARDROADMAP_START + 5))
+ self.RoadmapLabels.append(oWizardResource.getResText(AgendaWizardDialogResources.RID_AGENDAWIZARDROADMAP_START + 6))
diff --git a/wizards/com/sun/star/wizards/common/Resource.py b/wizards/com/sun/star/wizards/common/Resource.py
index a601b9c18ee9..4d3c29e48770 100644
--- a/wizards/com/sun/star/wizards/common/Resource.py
+++ b/wizards/com/sun/star/wizards/common/Resource.py
@@ -47,16 +47,6 @@ class Resource(object):
traceback.print_exc()
raise ValueError("Resource with ID not " + str(nID) + " not found")
- def getResArray(self, nID, iCount):
- try:
- resArray = []
- for i in range(iCount):
- resArray.append(self.getResText(nID + i))
- return resArray
- except Exception:
- traceback.print_exc()
- raise ValueError("Resource with ID not" + str(nID) + " not found")
-
@classmethod
def showCommonResourceError(self, xMSF):
from .SystemDialog import SystemDialog
diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.py b/wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.py
index 25c5171c954f..c274635ba5c0 100644
--- a/wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.py
+++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.py
@@ -153,11 +153,23 @@ class FaxWizardDialogResources(object):
self.resTemplateDescription = oWizardResource.getResText(
FaxWizardDialogResources.RID_RID_COMMON_START + 20)
- self.RoadmapLabels = oWizardResource.getResArray(
- FaxWizardDialogResources.RID_FAXWIZARDROADMAP_START + 1 , 5)
- self.SalutationLabels = oWizardResource.getResArray(
- FaxWizardDialogResources.RID_FAXWIZARDSALUTATION_START + 1 , 4)
- self.GreetingLabels = oWizardResource.getResArray(
- FaxWizardDialogResources.RID_FAXWIZARDGREETING_START + 1 , 4)
- self.CommunicationLabels = oWizardResource.getResArray(
- FaxWizardDialogResources.RID_FAXWIZARDCOMMUNICATION_START + 1 , 3)
+ self.RoadmapLabels = []
+ self.RoadmapLabels.append(oWizardResource.getResText(FaxWizardDialogResources.RID_FAXWIZARDROADMAP_START + 1))
+ self.RoadmapLabels.append(oWizardResource.getResText(FaxWizardDialogResources.RID_FAXWIZARDROADMAP_START + 2))
+ self.RoadmapLabels.append(oWizardResource.getResText(FaxWizardDialogResources.RID_FAXWIZARDROADMAP_START + 3))
+ self.RoadmapLabels.append(oWizardResource.getResText(FaxWizardDialogResources.RID_FAXWIZARDROADMAP_START + 4))
+ self.RoadmapLabels.append(oWizardResource.getResText(FaxWizardDialogResources.RID_FAXWIZARDROADMAP_START + 5))
+ self.SalutationLabels = []
+ self.SalutationLabels.append(oWizardResource.getResText(FaxWizardDialogResources.RID_FAXWIZARDSALUTATION_START + 1))
+ self.SalutationLabels.append(oWizardResource.getResText(FaxWizardDialogResources.RID_FAXWIZARDSALUTATION_START + 2))
+ self.SalutationLabels.append(oWizardResource.getResText(FaxWizardDialogResources.RID_FAXWIZARDSALUTATION_START + 3))
+ self.SalutationLabels.append(oWizardResource.getResText(FaxWizardDialogResources.RID_FAXWIZARDSALUTATION_START + 4))
+ self.GreetingLabels = []
+ self.GreetingLabels.append(oWizardResource.getResText(FaxWizardDialogResources.RID_FAXWIZARDGREETING_START + 1))
+ self.GreetingLabels.append(oWizardResource.getResText(FaxWizardDialogResources.RID_FAXWIZARDGREETING_START + 2))
+ self.GreetingLabels.append(oWizardResource.getResText(FaxWizardDialogResources.RID_FAXWIZARDGREETING_START + 3))
+ self.GreetingLabels.append(oWizardResource.getResText(FaxWizardDialogResources.RID_FAXWIZARDGREETING_START + 4))
+ self.CommunicationLabels = []
+ self.CommunicationLabels.append(oWizardResource.getResText(FaxWizardDialogResources.RID_FAXWIZARDCOMMUNICATION_START + 1))
+ self.CommunicationLabels.append(oWizardResource.getResText(FaxWizardDialogResources.RID_FAXWIZARDCOMMUNICATION_START + 2))
+ self.CommunicationLabels.append(oWizardResource.getResText(FaxWizardDialogResources.RID_FAXWIZARDCOMMUNICATION_START + 3))
diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialogResources.py b/wizards/com/sun/star/wizards/letter/LetterWizardDialogResources.py
index 2ef81e01eafd..fb5fd2732065 100644
--- a/wizards/com/sun/star/wizards/letter/LetterWizardDialogResources.py
+++ b/wizards/com/sun/star/wizards/letter/LetterWizardDialogResources.py
@@ -240,9 +240,18 @@ class LetterWizardDialogResources(object):
oWizardResource.getResText(
LetterWizardDialogResources.RID_RID_COMMON_START + 20)
- self.RoadmapLabels = oWizardResource.getResArray(
- LetterWizardDialogResources.RID_LETTERWIZARDROADMAP_START + 1, 6)
- self.SalutationLabels = oWizardResource.getResArray(
- LetterWizardDialogResources.RID_LETTERWIZARDSALUTATION_START + 1, 3)
- self.GreetingLabels = oWizardResource.getResArray(
- LetterWizardDialogResources.RID_LETTERWIZARDGREETING_START + 1, 3)
+ self.RoadmapLabels = []
+ self.RoadmapLabels.append(oWizardResource.getResText(LetterWizardDialogResources.RID_LETTERWIZARDROADMAP_START + 1))
+ self.RoadmapLabels.append(oWizardResource.getResText(LetterWizardDialogResources.RID_LETTERWIZARDROADMAP_START + 2))
+ self.RoadmapLabels.append(oWizardResource.getResText(LetterWizardDialogResources.RID_LETTERWIZARDROADMAP_START + 3))
+ self.RoadmapLabels.append(oWizardResource.getResText(LetterWizardDialogResources.RID_LETTERWIZARDROADMAP_START + 4))
+ self.RoadmapLabels.append(oWizardResource.getResText(LetterWizardDialogResources.RID_LETTERWIZARDROADMAP_START + 5))
+ self.RoadmapLabels.append(oWizardResource.getResText(LetterWizardDialogResources.RID_LETTERWIZARDROADMAP_START + 6))
+ self.SalutationLabels = []
+ self.SalutationLabels.append(oWizardResource.getResText(LetterWizardDialogResources.RID_LETTERWIZARDSALUTATION_START + 1))
+ self.SalutationLabels.append(oWizardResource.getResText(LetterWizardDialogResources.RID_LETTERWIZARDSALUTATION_START + 2))
+ self.SalutationLabels.append(oWizardResource.getResText(LetterWizardDialogResources.RID_LETTERWIZARDSALUTATION_START + 3))
+ self.GreetingLabels = []
+ self.GreetingLabels.append(oWizardResource.getResText(LetterWizardDialogResources.RID_LETTERWIZARDGREETING_START + 1))
+ self.GreetingLabels.append(oWizardResource.getResText(LetterWizardDialogResources.RID_LETTERWIZARDGREETING_START + 2))
+ self.GreetingLabels.append(oWizardResource.getResText(LetterWizardDialogResources.RID_LETTERWIZARDGREETING_START + 3))