[Libreoffice-commits] core.git: wizards/com

Caolán McNamara caolanm at redhat.com
Sun May 21 17:28:20 UTC 2017


 wizards/com/sun/star/wizards/agenda/AgendaWizardDialogResources.py |    9 ++-
 wizards/com/sun/star/wizards/common/Resource.py                    |   10 ---
 wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.py       |   28 +++++++---
 wizards/com/sun/star/wizards/letter/LetterWizardDialogResources.py |   21 +++++--
 4 files changed, 42 insertions(+), 26 deletions(-)

New commits:
commit 38632f933ae9361dad48b2123670876d7d602867
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun May 21 15:04:01 2017 +0100

    expand and drop python getResArray
    
    Change-Id: Ie81495a15376b01b0e87ee84628b8c6945897a3d
    Reviewed-on: https://gerrit.libreoffice.org/37877
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

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))


More information about the Libreoffice-commits mailing list