summaryrefslogtreecommitdiff
path: root/wizards/com/sun/star/wizards/fax
diff options
context:
space:
mode:
authorXisco Fauli <anistenis@gmail.com>2012-10-28 20:54:50 +0100
committerXisco Fauli <anistenis@gmail.com>2012-10-30 01:09:33 +0100
commit6fa0930ed4208e6fb13bc986616ad7441bbd4bd1 (patch)
treee9becd1f41fae09feaf28ec83fc3324617fd5b30 /wizards/com/sun/star/wizards/fax
parent4a11a47103fcbd7646234fc9565a409b8055507e (diff)
pyletter: Translate the templates at runtime
Change-Id: Ie0b149b4a8928e5b61153a6ed62b66d02f916f20
Diffstat (limited to 'wizards/com/sun/star/wizards/fax')
-rw-r--r--wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py15
-rw-r--r--wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.py27
2 files changed, 10 insertions, 32 deletions
diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py
index 7bfbfba21845..70993e17c216 100644
--- a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py
+++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py
@@ -232,7 +232,7 @@ class FaxWizardDialogImpl(FaxWizardDialog):
def drawConstants(self):
'''Localise the template'''
- constRangeList = self.searchFillInItems(1)
+ constRangeList = TextDocument.searchFillInItems(1)
for i in xrange(constRangeList.Count):
item = constRangeList.getByIndex(i)
@@ -241,19 +241,6 @@ class FaxWizardDialogImpl(FaxWizardDialog):
"hint", self.xMSF)
aux.write()
- def searchFillInItems(self, typeSearch):
- sd = TextDocument.xTextDocument.createSearchDescriptor()
-
- if typeSearch == 0:
- sd.setSearchString("<[^>]+>")
- elif typeSearch == 1:
- sd.setSearchString("#[^#]+#")
-
- sd.setPropertyValue("SearchRegularExpression", True)
- sd.setPropertyValue("SearchWords", True)
-
- return TextDocument.xTextDocument.findAll(sd)
-
def insertRoadmap(self):
self.addRoadmap()
self.insertRoadMapItems(
diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.py b/wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.py
index 7cf37031a93b..a02835a0374f 100644
--- a/wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.py
+++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.py
@@ -25,15 +25,6 @@ class FaxWizardDialogResources(Resource):
RID_FAXWIZARDSALUTATION_START = 3290
RID_FAXWIZARDROADMAP_START = 3300
RID_RID_COMMON_START = 500
-
- resToPlaceHolder = "#to#"
- resFromPlaceHolder = "#from#"
- resFaxconstPlaceHolder = "#faxconst#"
- resTelconstPlaceHolder = "#telconst#"
- resEmailconstPlaceHolder = "#emailconst#"
- resConsist1PlaceHolder = "#consist1#"
- resConsist2PlaceHolder = "#consist2#"
- resConsist3PlaceHolder = "#consist3#"
def __init__(self, xmsf):
super(FaxWizardDialogResources,self).__init__(xmsf,
@@ -121,24 +112,24 @@ class FaxWizardDialogResources(Resource):
FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 39)
self.resLabel2_value = self.getResText(
FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 40)
-
+
#Create a Dictionary for the constants values.
self.dictConstants = {
- FaxWizardDialogResources.resToPlaceHolder : self.getResText(
+ "#to#" : self.getResText(
FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 41),
- FaxWizardDialogResources.resFromPlaceHolder : self.getResText(
+ "#from#" : self.getResText(
FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 42),
- FaxWizardDialogResources.resFaxconstPlaceHolder : self.getResText(
+ "#faxconst#" : self.getResText(
FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 43),
- FaxWizardDialogResources.resTelconstPlaceHolder : self.getResText(
+ "#telconst#" : self.getResText(
FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 44),
- FaxWizardDialogResources.resEmailconstPlaceHolder : self.getResText(
+ "#emailconst#" : self.getResText(
FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 45),
- FaxWizardDialogResources.resConsist1PlaceHolder : self.getResText(
+ "#consist1#" : self.getResText(
FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 46),
- FaxWizardDialogResources.resConsist2PlaceHolder : self.getResText(
+ "#consist2#" : self.getResText(
FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 47),
- FaxWizardDialogResources.resConsist3PlaceHolder : self.getResText(
+ "#consist3#" : self.getResText(
FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 48)}
#Create a dictionary for localising the private template