summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXisco Fauli <anistenis@gmail.com>2011-07-16 19:16:02 +0200
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-08-18 02:57:43 +0200
commitdb0e2da971b5b4b7edf403af9382be57fea788e3 (patch)
treeb7757101b0d447c9ec53ce240b080a4438bc4e1e
parent2f5083e30bc29b758d0f562d2f81b8acaf7b5582 (diff)
Clean up
-rw-r--r--wizards/com/sun/star/wizards/common/FileAccess.py6
-rw-r--r--wizards/com/sun/star/wizards/common/Helper.py2
-rw-r--r--wizards/com/sun/star/wizards/document/OfficeDocument.py16
-rw-r--r--wizards/com/sun/star/wizards/fax/FaxWizardDialog.py42
-rw-r--r--wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.py1
-rw-r--r--wizards/com/sun/star/wizards/letter/LetterWizardDialog.py111
-rw-r--r--wizards/com/sun/star/wizards/letter/LetterWizardDialogResources.py1
-rw-r--r--wizards/com/sun/star/wizards/text/TextDocument.py2
-rw-r--r--wizards/com/sun/star/wizards/ui/UnoDialog.py226
-rw-r--r--wizards/com/sun/star/wizards/ui/UnoDialog2.py61
-rw-r--r--wizards/com/sun/star/wizards/ui/WizardDialog.py24
11 files changed, 101 insertions, 391 deletions
diff --git a/wizards/com/sun/star/wizards/common/FileAccess.py b/wizards/com/sun/star/wizards/common/FileAccess.py
index 3397d7138cf5..5f92d8aa303c 100644
--- a/wizards/com/sun/star/wizards/common/FileAccess.py
+++ b/wizards/com/sun/star/wizards/common/FileAccess.py
@@ -715,10 +715,10 @@ class FileAccess(object):
def connectURLs(self, urlFolder, urlFilename):
stringFolder = ""
stringFileName = urlFilename
- if not urlFolder.endsWith("/"):
+ if not urlFolder.endswith("/"):
stringFolder = "/"
- if urlFilename.startsWith("/"):
- stringFileName = urlFilename.substring(1)
+ if urlFilename.startswith("/"):
+ stringFileName = urlFilename[1:]
return urlFolder + stringFolder + stringFileName
@classmethod
diff --git a/wizards/com/sun/star/wizards/common/Helper.py b/wizards/com/sun/star/wizards/common/Helper.py
index 45923cfe848e..eaa615ded90c 100644
--- a/wizards/com/sun/star/wizards/common/Helper.py
+++ b/wizards/com/sun/star/wizards/common/Helper.py
@@ -157,7 +157,7 @@ class Helper(object):
class DateUtils(object):
def __init__(self, xmsf, document):
- defaults = document.createInstance("com.sun.star.text.Defaults")
+ defaults = xmsf.createInstance("com.sun.star.text.Defaults")
l = Helper.getUnoStructValue(defaults, "CharLocale")
self.formatSupplier = document
formatSettings = self.formatSupplier.getNumberFormatSettings()
diff --git a/wizards/com/sun/star/wizards/document/OfficeDocument.py b/wizards/com/sun/star/wizards/document/OfficeDocument.py
index f053baebe703..41dc11e3e18e 100644
--- a/wizards/com/sun/star/wizards/document/OfficeDocument.py
+++ b/wizards/com/sun/star/wizards/document/OfficeDocument.py
@@ -270,24 +270,8 @@ class OfficeDocument(object):
def getSlideCount(self, model):
return model.getDrawPages().getCount()
- def getDocumentProperties(self, document):
- return document.getDocumentProperties()
-
def showMessageBox(
self, xMSF, windowServiceName, windowAttribute, MessageText):
return SystemDialog.showMessageBox(
xMSF, windowServiceName, windowAttribute, MessageText)
-
- def getWindowPeer(self):
- return self.xWindowPeer
-
- '''
- @param windowPeer The xWindowPeer to set.
- Should be called as soon as a Windowpeer of a wizard dialog is available
- The windowpeer is needed to call a Messagebox
- '''
-
- def setWindowPeer(self, windowPeer):
- self.xWindowPeer = windowPeer
-
diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialog.py b/wizards/com/sun/star/wizards/fax/FaxWizardDialog.py
index e040f247b13b..e4295a0d025f 100644
--- a/wizards/com/sun/star/wizards/fax/FaxWizardDialog.py
+++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialog.py
@@ -86,7 +86,7 @@ class FaxWizardDialog(WizardDialog):
PropertyNames.PROPERTY_WIDTH),
(True, 12, LSTPRIVATESTYLE_HID, 180, 95, 1,
4, 74), self)
- self.lblBusinessStyle = self.insertLabel("lblBusinessStyle",
+ self.insertLabel("lblBusinessStyle",
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_LABEL,
PropertyNames.PROPERTY_POSITION_X,
@@ -97,7 +97,7 @@ class FaxWizardDialog(WizardDialog):
(8, self.resources.reslblBusinessStyle_value,
110, 42, 1, 32, 60))
- self.lblTitle1 = self.insertLabel("lblTitle1",
+ self.insertLabel("lblTitle1",
("FontDescriptor", PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_LABEL,
PropertyNames.PROPERTY_MULTILINE,
@@ -108,7 +108,7 @@ class FaxWizardDialog(WizardDialog):
PropertyNames.PROPERTY_WIDTH),
(self.fontDescriptor5, 16, self.resources.reslblTitle1_value,
True, 91, 8, 1, 37, 212))
- self.lblPrivateStyle = self.insertLabel("lblPrivateStyle",
+ self.insertLabel("lblPrivateStyle",
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_LABEL,
PropertyNames.PROPERTY_POSITION_X,
@@ -117,7 +117,7 @@ class FaxWizardDialog(WizardDialog):
PropertyNames.PROPERTY_TABINDEX,
PropertyNames.PROPERTY_WIDTH),
(8, self.resources.reslblPrivateStyle_value, 110, 95, 1, 50, 60))
- self.lblIntroduction = self.insertLabel("lblIntroduction",
+ self.insertLabel("lblIntroduction",
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_LABEL,
PropertyNames.PROPERTY_MULTILINE,
@@ -264,7 +264,7 @@ class FaxWizardDialog(WizardDialog):
(8, CHKUSEFOOTER_HID,
self.resources.reschkUseFooter_value, 97, 163,
0, 2, 14, 212), self)
- self.lblTitle3 = self.insertLabel("lblTitle3",
+ self.insertLabel("lblTitle3",
("FontDescriptor", PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_LABEL,
PropertyNames.PROPERTY_MULTILINE,
@@ -397,7 +397,7 @@ class FaxWizardDialog(WizardDialog):
(8, OPTRECEIVERDATABASE_HID,
self.resources.resoptReceiverDatabase_value, 104, 160, 3,
24, 200), self)
- self.lblSenderAddress = self.insertLabel("lblSenderAddress",
+ self.insertLabel("lblSenderAddress",
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_LABEL,
PropertyNames.PROPERTY_POSITION_X,
@@ -406,14 +406,14 @@ class FaxWizardDialog(WizardDialog):
PropertyNames.PROPERTY_TABINDEX,
PropertyNames.PROPERTY_WIDTH),
(8, self.resources.reslblSenderAddress_value, 97, 28, 3, 46, 136))
- self.FixedLine2 = self.insertFixedLine("FixedLine2", (PropertyNames.PROPERTY_HEIGHT,
+ self.insertFixedLine("FixedLine2", (PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_POSITION_X,
PropertyNames.PROPERTY_POSITION_Y,
PropertyNames.PROPERTY_STEP,
PropertyNames.PROPERTY_TABINDEX,
PropertyNames.PROPERTY_WIDTH),
(5, 90, 126, 3, 51, 212))
- self.lblSenderName = self.insertLabel("lblSenderName",
+ self.insertLabel("lblSenderName",
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_LABEL,
PropertyNames.PROPERTY_POSITION_X,
@@ -423,7 +423,7 @@ class FaxWizardDialog(WizardDialog):
PropertyNames.PROPERTY_WIDTH),
(8, self.resources.reslblSenderName_value, 113, 69, 3,
52, 68))
- self.lblSenderStreet = self.insertLabel("lblSenderStreet",
+ self.insertLabel("lblSenderStreet",
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_LABEL,
PropertyNames.PROPERTY_POSITION_X,
@@ -433,7 +433,7 @@ class FaxWizardDialog(WizardDialog):
PropertyNames.PROPERTY_WIDTH),
(8, self.resources.reslblSenderStreet_value, 113, 82, 3,
53, 68))
- self.lblPostCodeCity = self.insertLabel("lblPostCodeCity",
+ self.insertLabel("lblPostCodeCity",
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_LABEL,
PropertyNames.PROPERTY_POSITION_X,
@@ -443,7 +443,7 @@ class FaxWizardDialog(WizardDialog):
PropertyNames.PROPERTY_WIDTH),
(8, self.resources.reslblPostCodeCity_value,
113, 97, 3, 54, 68))
- self.lblTitle4 = self.insertLabel("lblTitle4",
+ self.insertLabel("lblTitle4",
("FontDescriptor",
PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_LABEL,
@@ -455,7 +455,7 @@ class FaxWizardDialog(WizardDialog):
PropertyNames.PROPERTY_WIDTH),
(self.fontDescriptor5, 16, self.resources.reslblTitle4_value,
True, 91, 8, 3, 60, 212))
- self.Label1 = self.insertLabel("lblSenderFax",
+ self.insertLabel("lblSenderFax",
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_LABEL,
PropertyNames.PROPERTY_POSITION_X,
@@ -464,7 +464,7 @@ class FaxWizardDialog(WizardDialog):
PropertyNames.PROPERTY_TABINDEX,
PropertyNames.PROPERTY_WIDTH),
(8, self.resources.resLabel1_value, 113, 111, 3, 68, 68))
- self.Label2 = self.insertLabel("Label2",
+ self.insertLabel("Label2",
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_LABEL,
PropertyNames.PROPERTY_POSITION_X,
@@ -514,7 +514,7 @@ class FaxWizardDialog(WizardDialog):
(8, CHKFOOTERPAGENUMBERS_HID,
self.resources.reschkFooterPageNumbers_value, 97, 106,
0, 4, 27, 201), self)
- self.lblFooter = self.insertLabel("lblFooter",
+ self.insertLabel("lblFooter",
("FontDescriptor",
PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_LABEL,
@@ -525,7 +525,7 @@ class FaxWizardDialog(WizardDialog):
PropertyNames.PROPERTY_WIDTH),
(self.fontDescriptor4, 8, self.resources.reslblFooter_value,
97, 28, 4, 33, 116))
- self.lblTitle5 = self.insertLabel("lblTitle5",
+ self.insertLabel("lblTitle5",
("FontDescriptor",
PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_LABEL,
@@ -576,7 +576,7 @@ class FaxWizardDialog(WizardDialog):
PropertyNames.PROPERTY_WIDTH),
(8, OPTMAKECHANGES_HID, self.resources.resoptMakeChanges_value,
104, 123, 5, 31, 198), self)
- self.lblFinalExplanation1 = self.insertLabel("lblFinalExplanation1",
+ self.insertLabel("lblFinalExplanation1",
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_LABEL,
PropertyNames.PROPERTY_MULTILINE,
@@ -587,7 +587,7 @@ class FaxWizardDialog(WizardDialog):
PropertyNames.PROPERTY_WIDTH),
(28, self.resources.reslblFinalExplanation1_value,
True, 97, 28, 5, 34, 205))
- self.lblProceed = self.insertLabel("lblProceed",
+ self.insertLabel("lblProceed",
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_LABEL,
PropertyNames.PROPERTY_POSITION_X,
@@ -597,7 +597,7 @@ class FaxWizardDialog(WizardDialog):
PropertyNames.PROPERTY_WIDTH),
(8, self.resources.reslblProceed_value, 97, 100, 5,
35, 204))
- self.lblFinalExplanation2 = self.insertLabel("lblFinalExplanation2",
+ self.insertLabel("lblFinalExplanation2",
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_LABEL,
PropertyNames.PROPERTY_MULTILINE,
@@ -608,7 +608,7 @@ class FaxWizardDialog(WizardDialog):
PropertyNames.PROPERTY_WIDTH),
(33, self.resources.reslblFinalExplanation2_value, True, 104, 145, 5,
36, 199))
- self.ImageControl2 = self.insertImage("ImageControl2",
+ self.insertImage("ImageControl2",
("Border",
PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_IMAGEURL,
@@ -620,7 +620,7 @@ class FaxWizardDialog(WizardDialog):
PropertyNames.PROPERTY_WIDTH),
(0, 10, UIConsts.INFOIMAGEURL, 92, 145,
False, 5, 47, 10))
- self.lblTemplateName = self.insertLabel("lblTemplateName",
+ self.insertLabel("lblTemplateName",
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_LABEL,
PropertyNames.PROPERTY_POSITION_X,
@@ -631,7 +631,7 @@ class FaxWizardDialog(WizardDialog):
(8, self.resources.reslblTemplateName_value, 97, 58, 5,
57, 101))
- self.lblTitle6 = self.insertLabel("lblTitle6",
+ self.insertLabel("lblTitle6",
("FontDescriptor",
PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_LABEL,
diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.py b/wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.py
index 864112fedbd3..bbf6921d381f 100644
--- a/wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.py
+++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.py
@@ -1,7 +1,6 @@
from common.Resource import Resource
class FaxWizardDialogResources(Resource):
- UNIT_NAME = "dbwizres"
MODULE_NAME = "dbw"
RID_FAXWIZARDDIALOG_START = 3200
RID_FAXWIZARDCOMMUNICATION_START = 3270
diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialog.py b/wizards/com/sun/star/wizards/letter/LetterWizardDialog.py
index ac87206f243c..8f740cdf1540 100644
--- a/wizards/com/sun/star/wizards/letter/LetterWizardDialog.py
+++ b/wizards/com/sun/star/wizards/letter/LetterWizardDialog.py
@@ -140,8 +140,7 @@ class LetterWizardDialog(WizardDialog):
PropertyNames.PROPERTY_WIDTH),
(True, 12, HelpIds.getHelpIdString(HID + 7),
"lstPrivateStyle", 180, 118, 1, 7, 74), self)
- self.lblBusinessStyle = self.insertLabel(
- "lblBusinessStyle",
+ self.insertLabel("lblBusinessStyle",
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_LABEL,
PropertyNames.PROPERTY_NAME,
@@ -152,8 +151,7 @@ class LetterWizardDialog(WizardDialog):
PropertyNames.PROPERTY_WIDTH),
(8, self.resources.reslblBusinessStyle_value,
"lblBusinessStyle", 110, 42, 1, 48, 60))
- self.lblPrivOfficialStyle = self.insertLabel(
- "lblPrivOfficialStyle",
+ self.insertLabel("lblPrivOfficialStyle",
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_LABEL,
PropertyNames.PROPERTY_NAME,
@@ -164,8 +162,7 @@ class LetterWizardDialog(WizardDialog):
PropertyNames.PROPERTY_WIDTH),
(8, self.resources.reslblPrivOfficialStyle_value,
"lblPrivOfficialStyle", 110, 88, 1, 49, 60))
- self.lblTitle1 = self.insertLabel(
- "lblTitle1",
+ self.insertLabel("lblTitle1",
("FontDescriptor",
PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_LABEL,
@@ -179,8 +176,7 @@ class LetterWizardDialog(WizardDialog):
(self.fontDescriptor6, 16,
self.resources.reslblTitle1_value, True,
"lblTitle1", 91, 8, 1, 55, 212))
- self.lblPrivateStyle = self.insertLabel(
- "lblPrivateStyle",
+ self.insertLabel("lblPrivateStyle",
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_LABEL,
PropertyNames.PROPERTY_NAME,
@@ -191,8 +187,7 @@ class LetterWizardDialog(WizardDialog):
PropertyNames.PROPERTY_WIDTH),
(8, self.resources.reslblPrivateStyle_value,
"lblPrivateStyle", 110, 120, 1, 74, 60))
- self.lblIntroduction = self.insertLabel(
- "lblIntroduction",
+ self.insertLabel("lblIntroduction",
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_LABEL,
PropertyNames.PROPERTY_MULTILINE,
@@ -397,8 +392,7 @@ class LetterWizardDialog(WizardDialog):
PropertyNames.PROPERTY_WIDTH),
(12, HelpIds.getHelpIdString(HID + 20),
"numFooterHeight", 236, 156, True, 2, 20, 5, 30), self)
- self.lblLogoHeight = self.insertLabel(
- "lblLogoHeight",
+ self.insertLabel("lblLogoHeight",
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_LABEL,
PropertyNames.PROPERTY_NAME,
@@ -409,8 +403,7 @@ class LetterWizardDialog(WizardDialog):
PropertyNames.PROPERTY_WIDTH),
(8, self.resources.reslblLogoHeight_value,
"lblLogoHeight", 103, 42, 2, 68, 32))
- self.lblLogoWidth = self.insertLabel(
- "lblLogoWidth",
+ self.insertLabel("lblLogoWidth",
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_LABEL,
PropertyNames.PROPERTY_NAME,
@@ -421,7 +414,7 @@ class LetterWizardDialog(WizardDialog):
PropertyNames.PROPERTY_WIDTH),
(8, self.resources.reslblLogoWidth_value,
"lblLogoWidth", 103, 58, 2, 69, 32))
- self.FixedLine5 = self.insertFixedLine(
+ self.insertFixedLine(
"FixedLine5",
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_NAME,
@@ -432,7 +425,7 @@ class LetterWizardDialog(WizardDialog):
PropertyNames.PROPERTY_WIDTH),
(2,
"FixedLine5", 90, 78, 2, 70, 215))
- self.FixedLine6 = self.insertFixedLine(
+ self.insertFixedLine(
"FixedLine6",
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_NAME,
@@ -443,8 +436,7 @@ class LetterWizardDialog(WizardDialog):
PropertyNames.PROPERTY_WIDTH),
(2,
"FixedLine6", 90, 150, 2, 71, 215))
- self.lblFooterHeight = self.insertLabel(
- "lblFooterHeight",
+ self.insertLabel("lblFooterHeight",
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_LABEL,
PropertyNames.PROPERTY_NAME,
@@ -455,8 +447,7 @@ class LetterWizardDialog(WizardDialog):
PropertyNames.PROPERTY_WIDTH),
(8, self.resources.reslblFooterHeight_value,
"lblFooterHeight", 200, 158, 2, 72, 32))
- self.lblLogoX = self.insertLabel(
- "lblLogoX",
+ self.insertLabel("lblLogoX",
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_LABEL,
PropertyNames.PROPERTY_NAME,
@@ -467,8 +458,7 @@ class LetterWizardDialog(WizardDialog):
PropertyNames.PROPERTY_WIDTH),
(8, self.resources.reslblLogoX_value,
"lblLogoX", 170, 42, 2, 84, 94))
- self.lblLogoY = self.insertLabel(
- "lblLogoY",
+ self.insertLabel("lblLogoY",
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_LABEL,
PropertyNames.PROPERTY_NAME,
@@ -479,8 +469,7 @@ class LetterWizardDialog(WizardDialog):
PropertyNames.PROPERTY_WIDTH),
(8, self.resources.reslblLogoY_value,
"lblLogoY", 170, 58, 2, 85, 94))
- self.lblAddressHeight = self.insertLabel(
- "lblAddressHeight",
+ self.insertLabel("lblAddressHeight",
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_LABEL,
PropertyNames.PROPERTY_NAME,
@@ -491,8 +480,7 @@ class LetterWizardDialog(WizardDialog):
PropertyNames.PROPERTY_WIDTH),
(8, self.resources.reslblAddressHeight_value,
"lblAddressHeight", 103, 98, 2, 86, 32))
- self.lblAddressWidth = self.insertLabel(
- "lblAddressWidth",
+ self.insertLabel("lblAddressWidth",
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_LABEL,
PropertyNames.PROPERTY_NAME,
@@ -503,8 +491,7 @@ class LetterWizardDialog(WizardDialog):
PropertyNames.PROPERTY_WIDTH),
(8, self.resources.reslblAddressWidth_value,
"lblAddressWidth", 103, 114, 2, 87, 32))
- self.lblAddressX = self.insertLabel(
- "lblAddressX",
+ self.insertLabel("lblAddressX",
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_LABEL,
PropertyNames.PROPERTY_NAME,
@@ -515,8 +502,7 @@ class LetterWizardDialog(WizardDialog):
PropertyNames.PROPERTY_WIDTH),
(8, self.resources.reslblAddressX_value,
"lblAddressX", 170, 98, 2, 88, 94))
- self.lblAddressY = self.insertLabel(
- "lblAddressY",
+ self.insertLabel("lblAddressY",
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_LABEL,
PropertyNames.PROPERTY_NAME,
@@ -527,8 +513,7 @@ class LetterWizardDialog(WizardDialog):
PropertyNames.PROPERTY_WIDTH),
(8, self.resources.reslblAddressY_value,
"lblAddressY", 170, 114, 2, 89, 94))
- self.lblTitle2 = self.insertLabel(
- "lblTitle2",
+ self.insertLabel("lblTitle2",
("FontDescriptor",
PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_LABEL,
@@ -710,8 +695,7 @@ class LetterWizardDialog(WizardDialog):
(8, HelpIds.getHelpIdString(HID + 31),
self.resources.reschkUseFooter_value,
"chkUseFooter", 97, 158, 0, 3, 31, 212), self)
- self.lblLetterNorm = self.insertLabel(
- "lblLetterNorm",
+ self.insertLabel("lblLetterNorm",
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_LABEL,
PropertyNames.PROPERTY_MULTILINE,
@@ -723,8 +707,7 @@ class LetterWizardDialog(WizardDialog):
PropertyNames.PROPERTY_WIDTH),
(16, self.resources.reslblLetterNorm_value, True,
"lblLetterNorm", 97, 28, 3, 50, 109))
- self.lblTitle3 = self.insertLabel(
- "lblTitle3",
+ self.insertLabel("lblTitle3",
(
"FontDescriptor", PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_LABEL,
@@ -856,8 +839,7 @@ class LetterWizardDialog(WizardDialog):
(8, HelpIds.getHelpIdString(HID + 40),
self.resources.resoptReceiverDatabase_value,
"optReceiverDatabase", 104, 157, 4, 40, 200), self)
- self.lblSenderAddress = self.insertLabel(
- "lblSenderAddress",
+ self.insertLabel("lblSenderAddress",
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_LABEL,
PropertyNames.PROPERTY_NAME,
@@ -868,8 +850,7 @@ class LetterWizardDialog(WizardDialog):
PropertyNames.PROPERTY_WIDTH),
(8, self.resources.reslblSenderAddress_value,
"lblSenderAddress", 97, 28, 4, 64, 136))
- self.FixedLine2 = self.insertFixedLine(
- "FixedLine2",
+ self.insertFixedLine("FixedLine2",
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_NAME,
PropertyNames.PROPERTY_POSITION_X,
@@ -879,8 +860,7 @@ class LetterWizardDialog(WizardDialog):
PropertyNames.PROPERTY_WIDTH),
(5,
"FixedLine2", 90, 126, 4, 75, 212))
- self.lblReceiverAddress = self.insertLabel(
- "lblReceiverAddress",
+ self.insertLabel("lblReceiverAddress",
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_LABEL,
PropertyNames.PROPERTY_NAME,
@@ -891,8 +871,7 @@ class LetterWizardDialog(WizardDialog):
PropertyNames.PROPERTY_WIDTH),
(8, self.resources.reslblReceiverAddress_value,
"lblReceiverAddress", 97, 134, 4, 76, 136))
- self.lblSenderName = self.insertLabel(
- "lblSenderName",
+ self.insertLabel("lblSenderName",
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_LABEL,
PropertyNames.PROPERTY_NAME,
@@ -903,8 +882,7 @@ class LetterWizardDialog(WizardDialog):
PropertyNames.PROPERTY_WIDTH),
(8, self.resources.reslblSenderName_value,
"lblSenderName", 113, 69, 4, 77, 68))
- self.lblSenderStreet = self.insertLabel(
- "lblSenderStreet",
+ self.insertLabel("lblSenderStreet",
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_LABEL,
PropertyNames.PROPERTY_NAME,
@@ -915,8 +893,7 @@ class LetterWizardDialog(WizardDialog):
PropertyNames.PROPERTY_WIDTH),
(8, self.resources.reslblSenderStreet_value,
"lblSenderStreet", 113, 82, 4, 78, 68))
- self.lblPostCodeCity = self.insertLabel(
- "lblPostCodeCity",
+ self.insertLabel("lblPostCodeCity",
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_LABEL,
PropertyNames.PROPERTY_NAME,
@@ -927,10 +904,8 @@ class LetterWizardDialog(WizardDialog):
PropertyNames.PROPERTY_WIDTH),
(8, self.resources.reslblPostCodeCity_value,
"lblPostCodeCity", 113, 97, 4, 79, 68))
- self.lblTitle4 = self.insertLabel(
- "lblTitle4",
- (
- "FontDescriptor", PropertyNames.PROPERTY_HEIGHT,
+ self.insertLabel("lblTitle4",
+ ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_LABEL,
PropertyNames.PROPERTY_MULTILINE,
PropertyNames.PROPERTY_NAME,
@@ -987,10 +962,8 @@ class LetterWizardDialog(WizardDialog):
(8, HelpIds.getHelpIdString(HID + 43),
self.resources.reschkFooterPageNumbers_value,
"chkFooterPageNumbers", 97, 106, 0, 5, 43, 201), self)
- self.lblFooter = self.insertLabel(
- "lblFooter",
- (
- "FontDescriptor", PropertyNames.PROPERTY_HEIGHT,
+ self.insertLabel("lblFooter",
+ ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_LABEL,
PropertyNames.PROPERTY_NAME,
PropertyNames.PROPERTY_POSITION_X,
@@ -1000,10 +973,8 @@ class LetterWizardDialog(WizardDialog):
PropertyNames.PROPERTY_WIDTH),
(self.fontDescriptor5, 8, self.resources.reslblFooter_value,
"lblFooter", 97, 28, 5, 52, 116))
- self.lblTitle5 = self.insertLabel(
- "lblTitle5",
- (
- "FontDescriptor", PropertyNames.PROPERTY_HEIGHT,
+ self.insertLabel("lblTitle5",
+ ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_LABEL,
PropertyNames.PROPERTY_MULTILINE,
PropertyNames.PROPERTY_NAME,
@@ -1059,8 +1030,7 @@ class LetterWizardDialog(WizardDialog):
(8, HelpIds.getHelpIdString(HID + 46),
self.resources.resoptMakeChanges_value,
"optMakeChanges", 104, 123, 6, 51, 198), self)
- self.lblFinalExplanation1 = self.insertLabel(
- "lblFinalExplanation1",
+ self.insertLabel("lblFinalExplanation1",
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_LABEL,
PropertyNames.PROPERTY_MULTILINE,
@@ -1072,8 +1042,7 @@ class LetterWizardDialog(WizardDialog):
PropertyNames.PROPERTY_WIDTH),
(26, self.resources.reslblFinalExplanation1_value, True,
"lblFinalExplanation1", 97, 28, 6, 52, 205))
- self.lblProceed = self.insertLabel(
- "lblProceed",
+ self.insertLabel("lblProceed",
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_LABEL,
PropertyNames.PROPERTY_NAME,
@@ -1084,8 +1053,7 @@ class LetterWizardDialog(WizardDialog):
PropertyNames.PROPERTY_WIDTH),
(8, self.resources.reslblProceed_value,
"lblProceed", 97, 100, 6, 53, 204))
- self.lblFinalExplanation2 = self.insertLabel(
- "lblFinalExplanation2",
+ self.insertLabel("lblFinalExplanation2",
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_LABEL,
PropertyNames.PROPERTY_MULTILINE,
@@ -1097,7 +1065,7 @@ class LetterWizardDialog(WizardDialog):
PropertyNames.PROPERTY_WIDTH),
(33, self.resources.reslblFinalExplanation2_value, True,
"lblFinalExplanation2", 104, 145, 6, 54, 199))
- self.ImageControl2 = self.insertImage(
+ self.insertImage(
"ImageControl2",
(
"Border", PropertyNames.PROPERTY_HEIGHT,
@@ -1112,8 +1080,7 @@ class LetterWizardDialog(WizardDialog):
(0, 10,
"private:resource/dbu/image/19205",
"ImageControl2", 92, 145, False, 6, 66, 10))
- self.lblTemplateName = self.insertLabel(
- "lblTemplateName",
+ self.insertLabel("lblTemplateName",
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_LABEL,
PropertyNames.PROPERTY_NAME,
@@ -1124,10 +1091,8 @@ class LetterWizardDialog(WizardDialog):
PropertyNames.PROPERTY_WIDTH),
(8, self.resources.reslblTemplateName_value,
"lblTemplateName", 97, 58, 6, 82, 101))
- self.lblTitle6 = self.insertLabel(
- "lblTitle6",
- (
- "FontDescriptor", PropertyNames.PROPERTY_HEIGHT,
+ self.insertLabel("lblTitle6",
+ ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_LABEL,
PropertyNames.PROPERTY_MULTILINE,
PropertyNames.PROPERTY_NAME,
diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialogResources.py b/wizards/com/sun/star/wizards/letter/LetterWizardDialogResources.py
index d25c0c2651ac..5324e1c37938 100644
--- a/wizards/com/sun/star/wizards/letter/LetterWizardDialogResources.py
+++ b/wizards/com/sun/star/wizards/letter/LetterWizardDialogResources.py
@@ -1,7 +1,6 @@
from common.Resource import Resource
class LetterWizardDialogResources(Resource):
- UNIT_NAME = "dbwizres"
MODULE_NAME = "dbw"
RID_LETTERWIZARDDIALOG_START = 3000
RID_LETTERWIZARDGREETING_START = 3080
diff --git a/wizards/com/sun/star/wizards/text/TextDocument.py b/wizards/com/sun/star/wizards/text/TextDocument.py
index 9a4e741cb14d..60b4c080f294 100644
--- a/wizards/com/sun/star/wizards/text/TextDocument.py
+++ b/wizards/com/sun/star/wizards/text/TextDocument.py
@@ -92,7 +92,7 @@ class TextDocument(object):
def init(self):
self.xWindowPeer = self.xFrame.getComponentWindow()
- self.m_xDocProps = TextDocument.xTextDocument.getDocumentProperties()
+ self.m_xDocProps = TextDocument.xTextDocument.DocumentProperties
self.CharLocale = Helper.getUnoStructValue(
TextDocument.xTextDocument, "CharLocale")
self.xText = TextDocument.xTextDocument.Text
diff --git a/wizards/com/sun/star/wizards/ui/UnoDialog.py b/wizards/com/sun/star/wizards/ui/UnoDialog.py
index fbc1984a36a6..2c7e993c67d1 100644
--- a/wizards/com/sun/star/wizards/ui/UnoDialog.py
+++ b/wizards/com/sun/star/wizards/ui/UnoDialog.py
@@ -124,206 +124,6 @@ class UnoDialog(object):
if iSelIndex != -1:
xListBox.selectItemPos(iSelIndex, True)
- def insertLabel(self, sName, sPropNames, oPropValues):
- try:
- oFixedText = self.insertControlModel(
- "com.sun.star.awt.UnoControlFixedTextModel",
- sName, sPropNames, oPropValues)
- oFixedText.setPropertyValue(PropertyNames.PROPERTY_NAME, sName)
- oLabel = self.xUnoDialog.getControl(sName)
- return oLabel
- except Exception, ex:
- traceback.print_exc()
- return None
-
- def insertButton(
- self, sName, iControlKey, xActionListener, sProperties, sValues):
- oButtonModel = self.insertControlModel(
- "com.sun.star.awt.UnoControlButtonModel",
- sName, sProperties, sValues)
- xPSet.setPropertyValue(PropertyNames.PROPERTY_NAME, sName)
- xButton = self.xUnoDialog.getControl(sName)
- if xActionListener != None:
- xButton.addActionListener(
- ActionListenerProcAdapter(xActionListener))
-
- ControlKey = iControlKey
- if self.ControlList != None:
- self.ControlList.put(sName, ControlKey)
-
- return xButton
-
- def insertCheckBox(
- self, sName, iControlKey, xItemListener, sProperties, sValues):
- oButtonModel = self.insertControlModel(
- "com.sun.star.awt.UnoControlCheckBoxModel",
- sName, sProperties, sValues)
- oButtonModel.setPropertyValue(PropertyNames.PROPERTY_NAME, sName)
- xCheckBox = self.xUnoDialog.getControl(sName)
- if xItemListener != None:
- xCheckBox.addItemListener(
- ItemListenerProcAdapter(xItemListener))
-
- ControlKey = iControlKey
- if self.ControlList != None:
- self.ControlList.put(sName, ControlKey)
-
- def insertNumericField(
- self, sName, iControlKey, xTextListener, sProperties, sValues):
- oNumericFieldModel = self.insertControlModel(
- "com.sun.star.awt.UnoControlNumericFieldModel",
- sName, sProperties, sValues)
- oNumericFieldModel.setPropertyValue(
- PropertyNames.PROPERTY_NAME, sName)
- xNumericField = self.xUnoDialog.getControl(sName)
- if xTextListener != None:
- xNumericField.addTextListener(
- TextListenerProcAdapter(xTextListener))
-
- ControlKey = iControlKey
- if self.ControlList != None:
- self.ControlList.put(sName, ControlKey)
-
- def insertScrollBar(
- self, sName, iControlKey, xAdjustmentListener, sProperties, sValues):
- try:
- oScrollModel = self.insertControlModel(
- "com.sun.star.awt.UnoControlScrollBarModel",
- sName, sProperties, sValues)
- oScrollModel.setPropertyValue(PropertyNames.PROPERTY_NAME, sName)
- xScrollBar = self.xUnoDialog.getControl(sName)
- if xAdjustmentListener != None:
- xScrollBar.addAdjustmentListener(xAdjustmentListener)
-
- ControlKey = iControlKey
- if self.ControlList != None:
- self.ControlList.put(sName, ControlKey)
-
- return xScrollBar
- except com.sun.star.uno.Exception, exception:
- traceback.print_exc()
- return None
-
- def insertTextField(
- self, sName, iControlKey, xTextListener, sProperties, sValues):
- xTextBox = insertEditField(
- "com.sun.star.awt.UnoControlEditModel", sName, iControlKey,
- xTextListener, sProperties, sValues)
- return xTextBox
-
- def insertFormattedField(
- self, sName, iControlKey, xTextListener, sProperties, sValues):
- xTextBox = insertEditField(
- "com.sun.star.awt.UnoControlFormattedFieldModel", sName,
- iControlKey, xTextListener, sProperties, sValues)
- return xTextBox
-
- def insertEditField(
- self, ServiceName, sName, iControlKey,
- xTextListener, sProperties, sValues):
-
- try:
- xTextModel = self.insertControlModel(
- ServiceName, sName, sProperties, sValues)
- xTextModel.setPropertyValue(PropertyNames.PROPERTY_NAME, sName)
- xTextBox = self.xUnoDialog.getControl(sName)
- if xTextListener != None:
- xTextBox.addTextListener(TextListenerProcAdapter(xTextListener))
-
- ControlKey = iControlKey
- self.ControlList.put(sName, ControlKey)
- return xTextBox
- except com.sun.star.uno.Exception, exception:
- traceback.print_exc()
- return None
-
- def insertListBox(
- self, sName, iControlKey, xActionListener,
- xItemListener, sProperties, sValues):
- xListBoxModel = self.insertControlModel(
- "com.sun.star.awt.UnoControlListBoxModel",
- sName, sProperties, sValues)
- xListBoxModel.setPropertyValue(PropertyNames.PROPERTY_NAME, sName)
- xListBox = self.xUnoDialog.getControl(sName)
- if xItemListener != None:
- xListBox.addItemListener(ItemListenerProcAdapter(xItemListener))
-
- if xActionListener != None:
- xListBox.addActionListener(
- ActionListenerProcAdapter(xActionListener))
-
- ControlKey = iControlKey
- self.ControlList.put(sName, ControlKey)
- return xListBox
-
- def insertComboBox(
- self, sName, iControlKey, xActionListener, xTextListener,
- xItemListener, sProperties, sValues):
- xComboBoxModel = self.insertControlModel(
- "com.sun.star.awt.UnoControlComboBoxModel",
- sName, sProperties, sValues)
- xComboBoxModel.setPropertyValue(PropertyNames.PROPERTY_NAME, sName)
- xComboBox = self.xUnoDialog.getControl(sName)
- if xItemListener != None:
- xComboBox.addItemListener(ItemListenerProcAdapter(xItemListener))
-
- if xTextListener != None:
- xComboBox.addTextListener(TextListenerProcAdapter(xTextListener))
-
- if xActionListener != None:
- xComboBox.addActionListener(
- ActionListenerProcAdapter(xActionListener))
-
- ControlKey = iControlKey
- self.ControlList.put(sName, ControlKey)
- return xComboBox
-
- def insertRadioButton(
- self, sName, iControlKey, xItemListener, sProperties, sValues):
- try:
- xRadioButton = insertRadioButton(
- sName, iControlKey, sProperties, sValues)
- if xItemListener != None:
- xRadioButton.addItemListener(
- ItemListenerProcAdapter(xItemListener))
-
- return xRadioButton
- except com.sun.star.uno.Exception, exception:
- traceback.print_exc()
- return None
-
- def insertRadioButton(
- self, sName, iControlKey, xActionListener, sProperties, sValues):
- try:
- xButton = insertRadioButton(
- sName, iControlKey, sProperties, sValues)
- if xActionListener != None:
- xButton.addActionListener(
- ActionListenerProcAdapter(xActionListener))
-
- return xButton
- except com.sun.star.uno.Exception, exception:
- traceback.print_exc()
- return None
-
- def insertRadioButton(self, sName, iControlKey, sProperties, sValues):
- xRadioButton = insertRadioButton(sName, sProperties, sValues)
- ControlKey = iControlKey
- self.ControlList.put(sName, ControlKey)
- return xRadioButton
-
- def insertRadioButton(self, sName, sProperties, sValues):
- try:
- oRadioButtonModel = self.insertControlModel(
- "com.sun.star.awt.UnoControlRadioButtonModel",
- sName, sProperties, sValues)
- oRadioButtonModel.setPropertyValue(
- PropertyNames.PROPERTY_NAME, sName)
- xRadioButton = self.xUnoDialog.getControl(sName)
- return xRadioButton
- except com.sun.star.uno.Exception, exception:
- traceback.print_exc()
- return None
'''
The problem with setting the visibility of controls
is that changing the current step of a dialog will automatically
@@ -375,7 +175,6 @@ class UnoDialog(object):
# repaints the currentDialogStep
-
def repaintDialogStep(self):
try:
ncurstep = int(Helper.getUnoPropertyValue(
@@ -387,15 +186,20 @@ class UnoDialog(object):
except com.sun.star.uno.Exception, exception:
traceback.print_exc()
- def insertControlModel(self, ServiceName, sName, sProperties, sValues):
+ def insertControlModel(
+ self, serviceName, componentName, sPropNames, oPropValues):
try:
- xControlModel = self.xDialogModel.createInstance(ServiceName)
- Helper.setUnoPropertyValues(xControlModel, sProperties, sValues)
- self.xDialogModel.insertByName(sName, xControlModel)
- return xControlModel
- except Exception, exception:
+ xControlModel = self.xDialogModel.createInstance(serviceName)
+ Helper.setUnoPropertyValues(
+ xControlModel, sPropNames, oPropValues)
+ self.xDialogModel.insertByName(componentName, xControlModel)
+ Helper.setUnoPropertyValue(xControlModel,
+ PropertyNames.PROPERTY_NAME, componentName)
+ except Exception, ex:
traceback.print_exc()
- return None
+
+ aObj = self.xUnoDialog.getControl(componentName)
+ return aObj
def setFocus(self, ControlName):
oFocusControl = self.xUnoDialog.getControl(ControlName)
@@ -544,9 +348,3 @@ class UnoDialog(object):
def addResourceHandler(self, _Unit, _Module):
self.m_oResource = Resource(self.xMSF, _Unit, _Module)
-
- def setInitialTabindex(self, _istep):
- return (short)(_istep * 100)
-
- def getListBoxLineCount(self):
- return 20
diff --git a/wizards/com/sun/star/wizards/ui/UnoDialog2.py b/wizards/com/sun/star/wizards/ui/UnoDialog2.py
index 0bf868687017..8986b3a963f9 100644
--- a/wizards/com/sun/star/wizards/ui/UnoDialog2.py
+++ b/wizards/com/sun/star/wizards/ui/UnoDialog2.py
@@ -25,7 +25,7 @@ class UnoDialog2(UnoDialog):
def insertButton(
self, sName, actionPerformed, sPropNames, oPropValues, listener):
- xButton = self.insertControlModel2(
+ xButton = self.insertControlModel(
"com.sun.star.awt.UnoControlButtonModel",
sName, sPropNames, oPropValues)
if actionPerformed is not None:
@@ -37,7 +37,7 @@ class UnoDialog2(UnoDialog):
def insertImageButton(
self, sName, actionPerformed, sPropNames, oPropValues, listener):
- xButton = self.insertControlModel2(
+ xButton = self.insertControlModel(
"com.sun.star.awt.UnoControlButtonModel",
sName, sPropNames, oPropValues)
if actionPerformed is not None:
@@ -49,7 +49,7 @@ class UnoDialog2(UnoDialog):
def insertCheckBox(
self, sName, itemChanged, sPropNames, oPropValues, listener):
- xCheckBox = self.insertControlModel2(
+ xCheckBox = self.insertControlModel(
"com.sun.star.awt.UnoControlCheckBoxModel",
sName, sPropNames, oPropValues)
if itemChanged is not None:
@@ -61,7 +61,7 @@ class UnoDialog2(UnoDialog):
def insertComboBox(
self, sName, actionPerformed, itemChanged,
textChanged, sPropNames, oPropValues, listener):
- xComboBox = self.insertControlModel2(
+ xComboBox = self.insertControlModel(
"com.sun.star.awt.UnoControlComboBoxModel",
sName, sPropNames, oPropValues)
if actionPerformed is not None:
@@ -82,7 +82,7 @@ class UnoDialog2(UnoDialog):
def insertListBox(
self, sName, actionPerformed, itemChanged,
sPropNames, oPropValues, listener):
- xListBox = self.insertControlModel2(
+ xListBox = self.insertControlModel(
"com.sun.star.awt.UnoControlListBoxModel",
sName, sPropNames, oPropValues)
@@ -98,7 +98,7 @@ class UnoDialog2(UnoDialog):
def insertRadioButton(
self, sName, itemChanged, sPropNames, oPropValues, listener):
- xRadioButton = self.insertControlModel2(
+ xRadioButton = self.insertControlModel(
"com.sun.star.awt.UnoControlRadioButtonModel",
sName, sPropNames, oPropValues)
if itemChanged is not None:
@@ -106,11 +106,10 @@ class UnoDialog2(UnoDialog):
xRadioButton.addItemListener(
ItemListenerProcAdapter(itemChanged))
-
return xRadioButton
def insertTitledBox(self, sName, sPropNames, oPropValues):
- oTitledBox = self.insertControlModel2(
+ oTitledBox = self.insertControlModel(
"com.sun.star.awt.UnoControlGroupBoxModel",
sName, sPropNames, oPropValues)
return oTitledBox
@@ -122,7 +121,7 @@ class UnoDialog2(UnoDialog):
sPropNames, oPropValues, listener)
def insertImage(self, sName, sPropNames, oPropValues):
- return self.insertControlModel2(
+ return self.insertControlModel(
"com.sun.star.awt.UnoControlImageControlModel",
sName, sPropNames, oPropValues)
@@ -147,12 +146,11 @@ class UnoDialog2(UnoDialog):
def insertEditField(
self, sName, sTextChanged, sModelClass,
sPropNames, oPropValues, listener):
- xField = self.insertControlModel2(sModelClass,
+ xField = self.insertControlModel(sModelClass,
sName, sPropNames, oPropValues)
if sTextChanged is not None:
sTextChanged = getattr(listener, sTextChanged)
xField.addTextListener(TextListenerProcAdapter(sTextChanged))
-
return xField
def insertFileControl(
@@ -203,55 +201,36 @@ class UnoDialog2(UnoDialog):
sPropNames, oPropValues, listener)
def insertFixedLine(self, sName, sPropNames, oPropValues):
- oLine = self.insertControlModel2(
+ oLine = self.insertControlModel(
"com.sun.star.awt.UnoControlFixedLineModel",
sName, sPropNames, oPropValues)
return oLine
+
+ def insertLabel(self, sName, sPropNames, oPropValues):
+ oFixedText = self.insertControlModel(
+ "com.sun.star.awt.UnoControlFixedTextModel",
+ sName, sPropNames, oPropValues)
+ return oFixedText
+
def insertScrollBar(self, sName, sPropNames, oPropValues):
- oScrollBar = self.insertControlModel2(
+ oScrollBar = self.insertControlModel(
"com.sun.star.awt.UnoControlScrollBarModel",
sName, sPropNames, oPropValues)
return oScrollBar
def insertProgressBar(self, sName, sPropNames, oPropValues):
- oProgressBar = self.insertControlModel2(
+ oProgressBar = self.insertControlModel(
"com.sun.star.awt.UnoControlProgressBarModel",
sName, sPropNames, oPropValues)
return oProgressBar
def insertGroupBox(self, sName, sPropNames, oPropValues):
- oGroupBox = self.insertControlModel2(
+ oGroupBox = self.insertControlModel(
"com.sun.star.awt.UnoControlGroupBoxModel",
sName, sPropNames, oPropValues)
return oGroupBox
- def insertControlModel2(
- self, serviceName, componentName, sPropNames, oPropValues):
- try:
- xControlModel = self.insertControlModel(
- serviceName, componentName, (), ())
- Helper.setUnoPropertyValues(
- xControlModel, sPropNames, oPropValues)
- Helper.setUnoPropertyValue(xControlModel,
- PropertyNames.PROPERTY_NAME, componentName)
- except Exception, ex:
- traceback.print_exc()
-
- aObj = self.xUnoDialog.getControl(componentName)
- return aObj
-
- def setControlPropertiesDebug(self, model, names, values):
- i = 0
- while i < len(names):
- print " Settings: ", names[i]
- Helper.setUnoPropertyValue(model, names[i], values[i])
- i += 1
-
- def getControlModel(self, unoControl):
- obj = unoControl.Model
- return obj
-
def showMessageBox(self, windowServiceName, windowAttribute, MessageText):
return SystemDialog.showMessageBox(
xMSF, self.xControl.Peer,
diff --git a/wizards/com/sun/star/wizards/ui/WizardDialog.py b/wizards/com/sun/star/wizards/ui/WizardDialog.py
index ee0f7c62608a..9487d4077224 100644
--- a/wizards/com/sun/star/wizards/ui/WizardDialog.py
+++ b/wizards/com/sun/star/wizards/ui/WizardDialog.py
@@ -43,7 +43,6 @@ class WizardDialog(UnoDialog2):
self.sMsgEndAutopilot = self.__oWizardResource.getResText(
UIConsts.RID_DB_COMMON + 33)
self.oRoadmap = None
- #self.vetos = VetoableChangeSupport.VetoableChangeSupport_unknown(this)
def getResource(self):
return self.__oWizardResource
@@ -74,7 +73,7 @@ class WizardDialog(UnoDialog2):
return False
def setCurrentRoadmapItemID(self, ID):
- if self.oRoadmap != None:
+ if self.oRoadmap is not None:
nCurItemID = self.getCurrentRoadmapItemID()
if nCurItemID != ID:
Helper.setUnoPropertyValue(self.oRoadmap, "CurrentItemID",ID)
@@ -95,7 +94,8 @@ class WizardDialog(UnoDialog2):
# the roadmap control has got no real TabIndex ever
# that is not correct, but changing this would need time,
# so it is used without TabIndex as before
- self.oRoadmap = self.insertControlModel(
+
+ xRoadmapControl = self.insertControlModel(
"com.sun.star.awt.UnoControlRoadmapModel",
"rdmNavi",
(PropertyNames.PROPERTY_HEIGHT,
@@ -106,12 +106,9 @@ class WizardDialog(UnoDialog2):
PropertyNames.PROPERTY_WIDTH),
((iDialogHeight - 26), 0, 0, 0,
0, True, 85))
- self.oRoadmap.setPropertyValue(
- PropertyNames.PROPERTY_NAME, "rdmNavi")
-
- self.xRoadmapControl = self.xUnoDialog.getControl("rdmNavi")
+ self.oRoadmap = xRoadmapControl.Model
method = getattr(self, "itemStateChanged")
- self.xRoadmapControl.addItemListener(
+ xRoadmapControl.addItemListener(
ItemListenerProcAdapter(method))
Helper.setUnoPropertyValue(
@@ -146,9 +143,6 @@ class WizardDialog(UnoDialog2):
traceback.print_exc()
return -1
- def getRMItemCount(self):
- return self.oRoadmap.Count
-
def getRoadmapItemByID(self, _ID):
try:
getByIndex = self.oRoadmap.getByIndex
@@ -202,12 +196,6 @@ class WizardDialog(UnoDialog2):
self.enableNextButton(self.getNextAvailableStep() > 0)
self.enableBackButton(nNewStep != 1)
- def iscompleted(self, _ndialogpage):
- return False
-
- def ismodified(self, _ndialogpage):
- return False
-
def drawNaviBar(self):
try:
curtabindex = UIConsts.SOFIRSTWIZARDNAVITABINDEX
@@ -388,9 +376,7 @@ class WizardDialog(UnoDialog2):
while i <= self.nMaxStep:
if self.isStepEnabled(i):
return i
-
i += 1
-
return -1
def gotoNextAvailableStep(self):