pywizards: use getResArray instead
Change-Id: I5afd7ad90c23e99be9b3cf81487da6bd7715b416
This commit is contained in:
@@ -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
|
||||
|
@@ -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)
|
||||
|
@@ -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)
|
||||
|
Reference in New Issue
Block a user