Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
8569e285
Kaydet (Commit)
8569e285
authored
Tem 16, 2011
tarafından
Xisco Fauli
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Revert "clean up"
This reverts commit 2c266efe9d82ebb46370b5a72d55f6c2d61c1763.
üst
24b36296
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
349 additions
and
70 deletions
+349
-70
FileAccess.py
wizards/com/sun/star/wizards/common/FileAccess.py
+3
-3
Helper.py
wizards/com/sun/star/wizards/common/Helper.py
+1
-1
OfficeDocument.py
wizards/com/sun/star/wizards/document/OfficeDocument.py
+16
-0
FaxWizardDialog.py
wizards/com/sun/star/wizards/fax/FaxWizardDialog.py
+21
-21
FaxWizardDialogResources.py
wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.py
+1
-0
LetterWizardDialog.py
wizards/com/sun/star/wizards/letter/LetterWizardDialog.py
+0
-0
LetterWizardDialogResources.py
...om/sun/star/wizards/letter/LetterWizardDialogResources.py
+1
-0
TextDocument.py
wizards/com/sun/star/wizards/text/TextDocument.py
+1
-1
TextFieldHandler.py
wizards/com/sun/star/wizards/text/TextFieldHandler.py
+31
-7
UnoDialog.py
wizards/com/sun/star/wizards/ui/UnoDialog.py
+214
-12
UnoDialog2.py
wizards/com/sun/star/wizards/ui/UnoDialog2.py
+41
-20
WizardDialog.py
wizards/com/sun/star/wizards/ui/WizardDialog.py
+19
-5
No files found.
wizards/com/sun/star/wizards/common/FileAccess.py
Dosyayı görüntüle @
8569e285
...
@@ -715,10 +715,10 @@ class FileAccess(object):
...
@@ -715,10 +715,10 @@ class FileAccess(object):
def
connectURLs
(
self
,
urlFolder
,
urlFilename
):
def
connectURLs
(
self
,
urlFolder
,
urlFilename
):
stringFolder
=
""
stringFolder
=
""
stringFileName
=
urlFilename
stringFileName
=
urlFilename
if
not
urlFolder
.
ends
w
ith
(
"/"
):
if
not
urlFolder
.
ends
W
ith
(
"/"
):
stringFolder
=
"/"
stringFolder
=
"/"
if
urlFilename
.
starts
w
ith
(
"/"
):
if
urlFilename
.
starts
W
ith
(
"/"
):
stringFileName
=
urlFilename
[
1
:]
stringFileName
=
urlFilename
.
substring
(
1
)
return
urlFolder
+
stringFolder
+
stringFileName
return
urlFolder
+
stringFolder
+
stringFileName
@classmethod
@classmethod
...
...
wizards/com/sun/star/wizards/common/Helper.py
Dosyayı görüntüle @
8569e285
...
@@ -157,7 +157,7 @@ class Helper(object):
...
@@ -157,7 +157,7 @@ class Helper(object):
class
DateUtils
(
object
):
class
DateUtils
(
object
):
def
__init__
(
self
,
xmsf
,
document
):
def
__init__
(
self
,
xmsf
,
document
):
defaults
=
xmsf
.
createInstance
(
"com.sun.star.text.Defaults"
)
defaults
=
document
.
createInstance
(
"com.sun.star.text.Defaults"
)
l
=
Helper
.
getUnoStructValue
(
defaults
,
"CharLocale"
)
l
=
Helper
.
getUnoStructValue
(
defaults
,
"CharLocale"
)
self
.
formatSupplier
=
document
self
.
formatSupplier
=
document
formatSettings
=
self
.
formatSupplier
.
getNumberFormatSettings
()
formatSettings
=
self
.
formatSupplier
.
getNumberFormatSettings
()
...
...
wizards/com/sun/star/wizards/document/OfficeDocument.py
Dosyayı görüntüle @
8569e285
...
@@ -270,8 +270,24 @@ class OfficeDocument(object):
...
@@ -270,8 +270,24 @@ class OfficeDocument(object):
def
getSlideCount
(
self
,
model
):
def
getSlideCount
(
self
,
model
):
return
model
.
getDrawPages
()
.
getCount
()
return
model
.
getDrawPages
()
.
getCount
()
def
getDocumentProperties
(
self
,
document
):
return
document
.
getDocumentProperties
()
def
showMessageBox
(
def
showMessageBox
(
self
,
xMSF
,
windowServiceName
,
windowAttribute
,
MessageText
):
self
,
xMSF
,
windowServiceName
,
windowAttribute
,
MessageText
):
return
SystemDialog
.
showMessageBox
(
return
SystemDialog
.
showMessageBox
(
xMSF
,
windowServiceName
,
windowAttribute
,
MessageText
)
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
wizards/com/sun/star/wizards/fax/FaxWizardDialog.py
Dosyayı görüntüle @
8569e285
...
@@ -86,7 +86,7 @@ class FaxWizardDialog(WizardDialog):
...
@@ -86,7 +86,7 @@ class FaxWizardDialog(WizardDialog):
PropertyNames
.
PROPERTY_WIDTH
),
PropertyNames
.
PROPERTY_WIDTH
),
(
True
,
12
,
LSTPRIVATESTYLE_HID
,
180
,
95
,
1
,
(
True
,
12
,
LSTPRIVATESTYLE_HID
,
180
,
95
,
1
,
4
,
74
),
self
)
4
,
74
),
self
)
self
.
insertLabel
(
"lblBusinessStyle"
,
self
.
lblBusinessStyle
=
self
.
insertLabel
(
"lblBusinessStyle"
,
(
PropertyNames
.
PROPERTY_HEIGHT
,
(
PropertyNames
.
PROPERTY_HEIGHT
,
PropertyNames
.
PROPERTY_LABEL
,
PropertyNames
.
PROPERTY_LABEL
,
PropertyNames
.
PROPERTY_POSITION_X
,
PropertyNames
.
PROPERTY_POSITION_X
,
...
@@ -97,7 +97,7 @@ class FaxWizardDialog(WizardDialog):
...
@@ -97,7 +97,7 @@ class FaxWizardDialog(WizardDialog):
(
8
,
self
.
resources
.
reslblBusinessStyle_value
,
(
8
,
self
.
resources
.
reslblBusinessStyle_value
,
110
,
42
,
1
,
32
,
60
))
110
,
42
,
1
,
32
,
60
))
self
.
insertLabel
(
"lblTitle1"
,
self
.
lblTitle1
=
self
.
insertLabel
(
"lblTitle1"
,
(
"FontDescriptor"
,
PropertyNames
.
PROPERTY_HEIGHT
,
(
"FontDescriptor"
,
PropertyNames
.
PROPERTY_HEIGHT
,
PropertyNames
.
PROPERTY_LABEL
,
PropertyNames
.
PROPERTY_LABEL
,
PropertyNames
.
PROPERTY_MULTILINE
,
PropertyNames
.
PROPERTY_MULTILINE
,
...
@@ -108,7 +108,7 @@ class FaxWizardDialog(WizardDialog):
...
@@ -108,7 +108,7 @@ class FaxWizardDialog(WizardDialog):
PropertyNames
.
PROPERTY_WIDTH
),
PropertyNames
.
PROPERTY_WIDTH
),
(
self
.
fontDescriptor5
,
16
,
self
.
resources
.
reslblTitle1_value
,
(
self
.
fontDescriptor5
,
16
,
self
.
resources
.
reslblTitle1_value
,
True
,
91
,
8
,
1
,
37
,
212
))
True
,
91
,
8
,
1
,
37
,
212
))
self
.
insertLabel
(
"lblPrivateStyle"
,
self
.
lblPrivateStyle
=
self
.
insertLabel
(
"lblPrivateStyle"
,
(
PropertyNames
.
PROPERTY_HEIGHT
,
(
PropertyNames
.
PROPERTY_HEIGHT
,
PropertyNames
.
PROPERTY_LABEL
,
PropertyNames
.
PROPERTY_LABEL
,
PropertyNames
.
PROPERTY_POSITION_X
,
PropertyNames
.
PROPERTY_POSITION_X
,
...
@@ -117,7 +117,7 @@ class FaxWizardDialog(WizardDialog):
...
@@ -117,7 +117,7 @@ class FaxWizardDialog(WizardDialog):
PropertyNames
.
PROPERTY_TABINDEX
,
PropertyNames
.
PROPERTY_TABINDEX
,
PropertyNames
.
PROPERTY_WIDTH
),
PropertyNames
.
PROPERTY_WIDTH
),
(
8
,
self
.
resources
.
reslblPrivateStyle_value
,
110
,
95
,
1
,
50
,
60
))
(
8
,
self
.
resources
.
reslblPrivateStyle_value
,
110
,
95
,
1
,
50
,
60
))
self
.
insertLabel
(
"lblIntroduction"
,
self
.
lblIntroduction
=
self
.
insertLabel
(
"lblIntroduction"
,
(
PropertyNames
.
PROPERTY_HEIGHT
,
(
PropertyNames
.
PROPERTY_HEIGHT
,
PropertyNames
.
PROPERTY_LABEL
,
PropertyNames
.
PROPERTY_LABEL
,
PropertyNames
.
PROPERTY_MULTILINE
,
PropertyNames
.
PROPERTY_MULTILINE
,
...
@@ -264,7 +264,7 @@ class FaxWizardDialog(WizardDialog):
...
@@ -264,7 +264,7 @@ class FaxWizardDialog(WizardDialog):
(
8
,
CHKUSEFOOTER_HID
,
(
8
,
CHKUSEFOOTER_HID
,
self
.
resources
.
reschkUseFooter_value
,
97
,
163
,
self
.
resources
.
reschkUseFooter_value
,
97
,
163
,
0
,
2
,
14
,
212
),
self
)
0
,
2
,
14
,
212
),
self
)
self
.
insertLabel
(
"lblTitle3"
,
self
.
lblTitle3
=
self
.
insertLabel
(
"lblTitle3"
,
(
"FontDescriptor"
,
PropertyNames
.
PROPERTY_HEIGHT
,
(
"FontDescriptor"
,
PropertyNames
.
PROPERTY_HEIGHT
,
PropertyNames
.
PROPERTY_LABEL
,
PropertyNames
.
PROPERTY_LABEL
,
PropertyNames
.
PROPERTY_MULTILINE
,
PropertyNames
.
PROPERTY_MULTILINE
,
...
@@ -397,7 +397,7 @@ class FaxWizardDialog(WizardDialog):
...
@@ -397,7 +397,7 @@ class FaxWizardDialog(WizardDialog):
(
8
,
OPTRECEIVERDATABASE_HID
,
(
8
,
OPTRECEIVERDATABASE_HID
,
self
.
resources
.
resoptReceiverDatabase_value
,
104
,
160
,
3
,
self
.
resources
.
resoptReceiverDatabase_value
,
104
,
160
,
3
,
24
,
200
),
self
)
24
,
200
),
self
)
self
.
insertLabel
(
"lblSenderAddress"
,
self
.
lblSenderAddress
=
self
.
insertLabel
(
"lblSenderAddress"
,
(
PropertyNames
.
PROPERTY_HEIGHT
,
(
PropertyNames
.
PROPERTY_HEIGHT
,
PropertyNames
.
PROPERTY_LABEL
,
PropertyNames
.
PROPERTY_LABEL
,
PropertyNames
.
PROPERTY_POSITION_X
,
PropertyNames
.
PROPERTY_POSITION_X
,
...
@@ -406,14 +406,14 @@ class FaxWizardDialog(WizardDialog):
...
@@ -406,14 +406,14 @@ class FaxWizardDialog(WizardDialog):
PropertyNames
.
PROPERTY_TABINDEX
,
PropertyNames
.
PROPERTY_TABINDEX
,
PropertyNames
.
PROPERTY_WIDTH
),
PropertyNames
.
PROPERTY_WIDTH
),
(
8
,
self
.
resources
.
reslblSenderAddress_value
,
97
,
28
,
3
,
46
,
136
))
(
8
,
self
.
resources
.
reslblSenderAddress_value
,
97
,
28
,
3
,
46
,
136
))
self
.
insertFixedLine
(
"FixedLine2"
,
(
PropertyNames
.
PROPERTY_HEIGHT
,
self
.
FixedLine2
=
self
.
insertFixedLine
(
"FixedLine2"
,
(
PropertyNames
.
PROPERTY_HEIGHT
,
PropertyNames
.
PROPERTY_POSITION_X
,
PropertyNames
.
PROPERTY_POSITION_X
,
PropertyNames
.
PROPERTY_POSITION_Y
,
PropertyNames
.
PROPERTY_POSITION_Y
,
PropertyNames
.
PROPERTY_STEP
,
PropertyNames
.
PROPERTY_STEP
,
PropertyNames
.
PROPERTY_TABINDEX
,
PropertyNames
.
PROPERTY_TABINDEX
,
PropertyNames
.
PROPERTY_WIDTH
),
PropertyNames
.
PROPERTY_WIDTH
),
(
5
,
90
,
126
,
3
,
51
,
212
))
(
5
,
90
,
126
,
3
,
51
,
212
))
self
.
insertLabel
(
"lblSenderName"
,
self
.
lblSenderName
=
self
.
insertLabel
(
"lblSenderName"
,
(
PropertyNames
.
PROPERTY_HEIGHT
,
(
PropertyNames
.
PROPERTY_HEIGHT
,
PropertyNames
.
PROPERTY_LABEL
,
PropertyNames
.
PROPERTY_LABEL
,
PropertyNames
.
PROPERTY_POSITION_X
,
PropertyNames
.
PROPERTY_POSITION_X
,
...
@@ -423,7 +423,7 @@ class FaxWizardDialog(WizardDialog):
...
@@ -423,7 +423,7 @@ class FaxWizardDialog(WizardDialog):
PropertyNames
.
PROPERTY_WIDTH
),
PropertyNames
.
PROPERTY_WIDTH
),
(
8
,
self
.
resources
.
reslblSenderName_value
,
113
,
69
,
3
,
(
8
,
self
.
resources
.
reslblSenderName_value
,
113
,
69
,
3
,
52
,
68
))
52
,
68
))
self
.
insertLabel
(
"lblSenderStreet"
,
self
.
lblSenderStreet
=
self
.
insertLabel
(
"lblSenderStreet"
,
(
PropertyNames
.
PROPERTY_HEIGHT
,
(
PropertyNames
.
PROPERTY_HEIGHT
,
PropertyNames
.
PROPERTY_LABEL
,
PropertyNames
.
PROPERTY_LABEL
,
PropertyNames
.
PROPERTY_POSITION_X
,
PropertyNames
.
PROPERTY_POSITION_X
,
...
@@ -433,7 +433,7 @@ class FaxWizardDialog(WizardDialog):
...
@@ -433,7 +433,7 @@ class FaxWizardDialog(WizardDialog):
PropertyNames
.
PROPERTY_WIDTH
),
PropertyNames
.
PROPERTY_WIDTH
),
(
8
,
self
.
resources
.
reslblSenderStreet_value
,
113
,
82
,
3
,
(
8
,
self
.
resources
.
reslblSenderStreet_value
,
113
,
82
,
3
,
53
,
68
))
53
,
68
))
self
.
insertLabel
(
"lblPostCodeCity"
,
self
.
lblPostCodeCity
=
self
.
insertLabel
(
"lblPostCodeCity"
,
(
PropertyNames
.
PROPERTY_HEIGHT
,
(
PropertyNames
.
PROPERTY_HEIGHT
,
PropertyNames
.
PROPERTY_LABEL
,
PropertyNames
.
PROPERTY_LABEL
,
PropertyNames
.
PROPERTY_POSITION_X
,
PropertyNames
.
PROPERTY_POSITION_X
,
...
@@ -443,7 +443,7 @@ class FaxWizardDialog(WizardDialog):
...
@@ -443,7 +443,7 @@ class FaxWizardDialog(WizardDialog):
PropertyNames
.
PROPERTY_WIDTH
),
PropertyNames
.
PROPERTY_WIDTH
),
(
8
,
self
.
resources
.
reslblPostCodeCity_value
,
(
8
,
self
.
resources
.
reslblPostCodeCity_value
,
113
,
97
,
3
,
54
,
68
))
113
,
97
,
3
,
54
,
68
))
self
.
insertLabel
(
"lblTitle4"
,
self
.
lblTitle4
=
self
.
insertLabel
(
"lblTitle4"
,
(
"FontDescriptor"
,
(
"FontDescriptor"
,
PropertyNames
.
PROPERTY_HEIGHT
,
PropertyNames
.
PROPERTY_HEIGHT
,
PropertyNames
.
PROPERTY_LABEL
,
PropertyNames
.
PROPERTY_LABEL
,
...
@@ -455,7 +455,7 @@ class FaxWizardDialog(WizardDialog):
...
@@ -455,7 +455,7 @@ class FaxWizardDialog(WizardDialog):
PropertyNames
.
PROPERTY_WIDTH
),
PropertyNames
.
PROPERTY_WIDTH
),
(
self
.
fontDescriptor5
,
16
,
self
.
resources
.
reslblTitle4_value
,
(
self
.
fontDescriptor5
,
16
,
self
.
resources
.
reslblTitle4_value
,
True
,
91
,
8
,
3
,
60
,
212
))
True
,
91
,
8
,
3
,
60
,
212
))
self
.
insertLabel
(
"lblSenderFax"
,
self
.
Label1
=
self
.
insertLabel
(
"lblSenderFax"
,
(
PropertyNames
.
PROPERTY_HEIGHT
,
(
PropertyNames
.
PROPERTY_HEIGHT
,
PropertyNames
.
PROPERTY_LABEL
,
PropertyNames
.
PROPERTY_LABEL
,
PropertyNames
.
PROPERTY_POSITION_X
,
PropertyNames
.
PROPERTY_POSITION_X
,
...
@@ -464,7 +464,7 @@ class FaxWizardDialog(WizardDialog):
...
@@ -464,7 +464,7 @@ class FaxWizardDialog(WizardDialog):
PropertyNames
.
PROPERTY_TABINDEX
,
PropertyNames
.
PROPERTY_TABINDEX
,
PropertyNames
.
PROPERTY_WIDTH
),
PropertyNames
.
PROPERTY_WIDTH
),
(
8
,
self
.
resources
.
resLabel1_value
,
113
,
111
,
3
,
68
,
68
))
(
8
,
self
.
resources
.
resLabel1_value
,
113
,
111
,
3
,
68
,
68
))
self
.
insertLabel
(
"Label2"
,
self
.
Label2
=
self
.
insertLabel
(
"Label2"
,
(
PropertyNames
.
PROPERTY_HEIGHT
,
(
PropertyNames
.
PROPERTY_HEIGHT
,
PropertyNames
.
PROPERTY_LABEL
,
PropertyNames
.
PROPERTY_LABEL
,
PropertyNames
.
PROPERTY_POSITION_X
,
PropertyNames
.
PROPERTY_POSITION_X
,
...
@@ -514,7 +514,7 @@ class FaxWizardDialog(WizardDialog):
...
@@ -514,7 +514,7 @@ class FaxWizardDialog(WizardDialog):
(
8
,
CHKFOOTERPAGENUMBERS_HID
,
(
8
,
CHKFOOTERPAGENUMBERS_HID
,
self
.
resources
.
reschkFooterPageNumbers_value
,
97
,
106
,
self
.
resources
.
reschkFooterPageNumbers_value
,
97
,
106
,
0
,
4
,
27
,
201
),
self
)
0
,
4
,
27
,
201
),
self
)
self
.
insertLabel
(
"lblFooter"
,
self
.
lblFooter
=
self
.
insertLabel
(
"lblFooter"
,
(
"FontDescriptor"
,
(
"FontDescriptor"
,
PropertyNames
.
PROPERTY_HEIGHT
,
PropertyNames
.
PROPERTY_HEIGHT
,
PropertyNames
.
PROPERTY_LABEL
,
PropertyNames
.
PROPERTY_LABEL
,
...
@@ -525,7 +525,7 @@ class FaxWizardDialog(WizardDialog):
...
@@ -525,7 +525,7 @@ class FaxWizardDialog(WizardDialog):
PropertyNames
.
PROPERTY_WIDTH
),
PropertyNames
.
PROPERTY_WIDTH
),
(
self
.
fontDescriptor4
,
8
,
self
.
resources
.
reslblFooter_value
,
(
self
.
fontDescriptor4
,
8
,
self
.
resources
.
reslblFooter_value
,
97
,
28
,
4
,
33
,
116
))
97
,
28
,
4
,
33
,
116
))
self
.
insertLabel
(
"lblTitle5"
,
self
.
lblTitle5
=
self
.
insertLabel
(
"lblTitle5"
,
(
"FontDescriptor"
,
(
"FontDescriptor"
,
PropertyNames
.
PROPERTY_HEIGHT
,
PropertyNames
.
PROPERTY_HEIGHT
,
PropertyNames
.
PROPERTY_LABEL
,
PropertyNames
.
PROPERTY_LABEL
,
...
@@ -576,7 +576,7 @@ class FaxWizardDialog(WizardDialog):
...
@@ -576,7 +576,7 @@ class FaxWizardDialog(WizardDialog):
PropertyNames
.
PROPERTY_WIDTH
),
PropertyNames
.
PROPERTY_WIDTH
),
(
8
,
OPTMAKECHANGES_HID
,
self
.
resources
.
resoptMakeChanges_value
,
(
8
,
OPTMAKECHANGES_HID
,
self
.
resources
.
resoptMakeChanges_value
,
104
,
123
,
5
,
31
,
198
),
self
)
104
,
123
,
5
,
31
,
198
),
self
)
self
.
insertLabel
(
"lblFinalExplanation1"
,
self
.
lblFinalExplanation1
=
self
.
insertLabel
(
"lblFinalExplanation1"
,
(
PropertyNames
.
PROPERTY_HEIGHT
,
(
PropertyNames
.
PROPERTY_HEIGHT
,
PropertyNames
.
PROPERTY_LABEL
,
PropertyNames
.
PROPERTY_LABEL
,
PropertyNames
.
PROPERTY_MULTILINE
,
PropertyNames
.
PROPERTY_MULTILINE
,
...
@@ -587,7 +587,7 @@ class FaxWizardDialog(WizardDialog):
...
@@ -587,7 +587,7 @@ class FaxWizardDialog(WizardDialog):
PropertyNames
.
PROPERTY_WIDTH
),
PropertyNames
.
PROPERTY_WIDTH
),
(
28
,
self
.
resources
.
reslblFinalExplanation1_value
,
(
28
,
self
.
resources
.
reslblFinalExplanation1_value
,
True
,
97
,
28
,
5
,
34
,
205
))
True
,
97
,
28
,
5
,
34
,
205
))
self
.
insertLabel
(
"lblProceed"
,
self
.
lblProceed
=
self
.
insertLabel
(
"lblProceed"
,
(
PropertyNames
.
PROPERTY_HEIGHT
,
(
PropertyNames
.
PROPERTY_HEIGHT
,
PropertyNames
.
PROPERTY_LABEL
,
PropertyNames
.
PROPERTY_LABEL
,
PropertyNames
.
PROPERTY_POSITION_X
,
PropertyNames
.
PROPERTY_POSITION_X
,
...
@@ -597,7 +597,7 @@ class FaxWizardDialog(WizardDialog):
...
@@ -597,7 +597,7 @@ class FaxWizardDialog(WizardDialog):
PropertyNames
.
PROPERTY_WIDTH
),
PropertyNames
.
PROPERTY_WIDTH
),
(
8
,
self
.
resources
.
reslblProceed_value
,
97
,
100
,
5
,
(
8
,
self
.
resources
.
reslblProceed_value
,
97
,
100
,
5
,
35
,
204
))
35
,
204
))
self
.
insertLabel
(
"lblFinalExplanation2"
,
self
.
lblFinalExplanation2
=
self
.
insertLabel
(
"lblFinalExplanation2"
,
(
PropertyNames
.
PROPERTY_HEIGHT
,
(
PropertyNames
.
PROPERTY_HEIGHT
,
PropertyNames
.
PROPERTY_LABEL
,
PropertyNames
.
PROPERTY_LABEL
,
PropertyNames
.
PROPERTY_MULTILINE
,
PropertyNames
.
PROPERTY_MULTILINE
,
...
@@ -608,7 +608,7 @@ class FaxWizardDialog(WizardDialog):
...
@@ -608,7 +608,7 @@ class FaxWizardDialog(WizardDialog):
PropertyNames
.
PROPERTY_WIDTH
),
PropertyNames
.
PROPERTY_WIDTH
),
(
33
,
self
.
resources
.
reslblFinalExplanation2_value
,
True
,
104
,
145
,
5
,
(
33
,
self
.
resources
.
reslblFinalExplanation2_value
,
True
,
104
,
145
,
5
,
36
,
199
))
36
,
199
))
self
.
insertImage
(
"ImageControl2"
,
self
.
ImageControl2
=
self
.
insertImage
(
"ImageControl2"
,
(
"Border"
,
(
"Border"
,
PropertyNames
.
PROPERTY_HEIGHT
,
PropertyNames
.
PROPERTY_HEIGHT
,
PropertyNames
.
PROPERTY_IMAGEURL
,
PropertyNames
.
PROPERTY_IMAGEURL
,
...
@@ -620,7 +620,7 @@ class FaxWizardDialog(WizardDialog):
...
@@ -620,7 +620,7 @@ class FaxWizardDialog(WizardDialog):
PropertyNames
.
PROPERTY_WIDTH
),
PropertyNames
.
PROPERTY_WIDTH
),
(
0
,
10
,
UIConsts
.
INFOIMAGEURL
,
92
,
145
,
(
0
,
10
,
UIConsts
.
INFOIMAGEURL
,
92
,
145
,
False
,
5
,
47
,
10
))
False
,
5
,
47
,
10
))
self
.
insertLabel
(
"lblTemplateName"
,
self
.
lblTemplateName
=
self
.
insertLabel
(
"lblTemplateName"
,
(
PropertyNames
.
PROPERTY_HEIGHT
,
(
PropertyNames
.
PROPERTY_HEIGHT
,
PropertyNames
.
PROPERTY_LABEL
,
PropertyNames
.
PROPERTY_LABEL
,
PropertyNames
.
PROPERTY_POSITION_X
,
PropertyNames
.
PROPERTY_POSITION_X
,
...
@@ -631,7 +631,7 @@ class FaxWizardDialog(WizardDialog):
...
@@ -631,7 +631,7 @@ class FaxWizardDialog(WizardDialog):
(
8
,
self
.
resources
.
reslblTemplateName_value
,
97
,
58
,
5
,
(
8
,
self
.
resources
.
reslblTemplateName_value
,
97
,
58
,
5
,
57
,
101
))
57
,
101
))
self
.
insertLabel
(
"lblTitle6"
,
self
.
lblTitle6
=
self
.
insertLabel
(
"lblTitle6"
,
(
"FontDescriptor"
,
(
"FontDescriptor"
,
PropertyNames
.
PROPERTY_HEIGHT
,
PropertyNames
.
PROPERTY_HEIGHT
,
PropertyNames
.
PROPERTY_LABEL
,
PropertyNames
.
PROPERTY_LABEL
,
...
...
wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.py
Dosyayı görüntüle @
8569e285
from
common.Resource
import
Resource
from
common.Resource
import
Resource
class
FaxWizardDialogResources
(
Resource
):
class
FaxWizardDialogResources
(
Resource
):
UNIT_NAME
=
"dbwizres"
MODULE_NAME
=
"dbw"
MODULE_NAME
=
"dbw"
RID_FAXWIZARDDIALOG_START
=
3200
RID_FAXWIZARDDIALOG_START
=
3200
RID_FAXWIZARDCOMMUNICATION_START
=
3270
RID_FAXWIZARDCOMMUNICATION_START
=
3270
...
...
wizards/com/sun/star/wizards/letter/LetterWizardDialog.py
Dosyayı görüntüle @
8569e285
This diff is collapsed.
Click to expand it.
wizards/com/sun/star/wizards/letter/LetterWizardDialogResources.py
Dosyayı görüntüle @
8569e285
from
common.Resource
import
Resource
from
common.Resource
import
Resource
class
LetterWizardDialogResources
(
Resource
):
class
LetterWizardDialogResources
(
Resource
):
UNIT_NAME
=
"dbwizres"
MODULE_NAME
=
"dbw"
MODULE_NAME
=
"dbw"
RID_LETTERWIZARDDIALOG_START
=
3000
RID_LETTERWIZARDDIALOG_START
=
3000
RID_LETTERWIZARDGREETING_START
=
3080
RID_LETTERWIZARDGREETING_START
=
3080
...
...
wizards/com/sun/star/wizards/text/TextDocument.py
Dosyayı görüntüle @
8569e285
...
@@ -92,7 +92,7 @@ class TextDocument(object):
...
@@ -92,7 +92,7 @@ class TextDocument(object):
def
init
(
self
):
def
init
(
self
):
self
.
xWindowPeer
=
self
.
xFrame
.
getComponentWindow
()
self
.
xWindowPeer
=
self
.
xFrame
.
getComponentWindow
()
self
.
m_xDocProps
=
TextDocument
.
xTextDocument
.
DocumentProperties
self
.
m_xDocProps
=
TextDocument
.
xTextDocument
.
getDocumentProperties
()
self
.
CharLocale
=
Helper
.
getUnoStructValue
(
self
.
CharLocale
=
Helper
.
getUnoStructValue
(
TextDocument
.
xTextDocument
,
"CharLocale"
)
TextDocument
.
xTextDocument
,
"CharLocale"
)
self
.
xText
=
TextDocument
.
xTextDocument
.
Text
self
.
xText
=
TextDocument
.
xTextDocument
.
Text
...
...
wizards/com/sun/star/wizards/text/TextFieldHandler.py
Dosyayı görüntüle @
8569e285
...
@@ -89,24 +89,32 @@ class TextFieldHandler(object):
...
@@ -89,24 +89,32 @@ class TextFieldHandler(object):
traceback
.
print_exc
()
traceback
.
print_exc
()
def
__getTextFieldsByProperty
(
def
__getTextFieldsByProperty
(
self
,
_PropertyName
,
_aPropertyValue
):
self
,
_PropertyName
,
_aPropertyValue
,
_TypeName
):
try
:
try
:
xProperty
=
TextFieldHandler
.
dictTextFields
[
_aPropertyValue
]
xProperty
=
TextFieldHandler
.
dictTextFields
[
_aPropertyValue
]
xPropertySet
=
xProperty
.
TextFieldMaster
xPropertySet
=
xProperty
.
TextFieldMaster
if
xPropertySet
.
PropertySetInfo
.
hasPropertyByName
(
if
xPropertySet
.
PropertySetInfo
.
hasPropertyByName
(
_PropertyName
):
_PropertyName
):
oValue
=
xPropertySet
.
getPropertyValue
(
_PropertyName
)
oValue
=
xPropertySet
.
getPropertyValue
(
_PropertyName
)
sValue
=
unicodedata
.
normalize
(
if
_TypeName
==
"String"
:
'NFKD'
,
oValue
)
.
encode
(
'ascii'
,
'ignore'
)
sValue
=
unicodedata
.
normalize
(
if
sValue
==
_aPropertyValue
:
'NFKD'
,
oValue
)
.
encode
(
'ascii'
,
'ignore'
)
return
xProperty
if
sValue
==
_aPropertyValue
:
return
xProperty
#COMMENTED
'''elif AnyConverter.isShort(oValue):
if _TypeName.equals("Short"):
iShortParam = (_aPropertyValue).shortValue()
ishortValue = AnyConverter.toShort(oValue)
if ishortValue == iShortParam:
xDependentVector.append(oTextField) '''
return
None
return
None
except
KeyError
,
e
:
except
KeyError
,
e
:
return
None
return
None
def
changeUserFieldContent
(
self
,
_FieldName
,
_FieldContent
):
def
changeUserFieldContent
(
self
,
_FieldName
,
_FieldContent
):
DependentTextFields
=
self
.
__getTextFieldsByProperty
(
DependentTextFields
=
self
.
__getTextFieldsByProperty
(
PropertyNames
.
PROPERTY_NAME
,
_FieldName
)
PropertyNames
.
PROPERTY_NAME
,
_FieldName
,
"String"
)
if
DependentTextFields
is
not
None
:
if
DependentTextFields
is
not
None
:
DependentTextFields
.
TextFieldMaster
.
setPropertyValue
(
"Content"
,
_FieldContent
)
DependentTextFields
.
TextFieldMaster
.
setPropertyValue
(
"Content"
,
_FieldContent
)
self
.
refreshTextFields
()
self
.
refreshTextFields
()
...
@@ -155,7 +163,7 @@ class TextFieldHandler(object):
...
@@ -155,7 +163,7 @@ class TextFieldHandler(object):
def
removeUserFieldByContent
(
self
,
_FieldContent
):
def
removeUserFieldByContent
(
self
,
_FieldContent
):
try
:
try
:
xDependentTextFields
=
self
.
__getTextFieldsByProperty
(
xDependentTextFields
=
self
.
__getTextFieldsByProperty
(
"Content"
,
_FieldContent
)
"Content"
,
_FieldContent
,
"String"
)
if
xDependentTextFields
!=
None
:
if
xDependentTextFields
!=
None
:
i
=
0
i
=
0
while
i
<
xDependentTextFields
.
length
:
while
i
<
xDependentTextFields
.
length
:
...
@@ -164,3 +172,19 @@ class TextFieldHandler(object):
...
@@ -164,3 +172,19 @@ class TextFieldHandler(object):
except
Exception
,
e
:
except
Exception
,
e
:
traceback
.
print_exc
()
traceback
.
print_exc
()
def
changeExtendedUserFieldContent
(
self
,
UserDataPart
,
_FieldContent
):
try
:
xDependentTextFields
=
self
.
__getTextFieldsByProperty
(
"UserDataType"
,
UserDataPart
,
"Short"
)
if
xDependentTextFields
!=
None
:
i
=
0
while
i
<
xDependentTextFields
.
length
:
xDependentTextFields
[
i
]
.
getTextFieldMaster
()
.
setPropertyValue
(
"Content"
,
_FieldContent
)
i
+=
1
self
.
refreshTextFields
()
except
Exception
,
e
:
traceback
.
print_exc
()
wizards/com/sun/star/wizards/ui/UnoDialog.py
Dosyayı görüntüle @
8569e285
...
@@ -124,6 +124,206 @@ class UnoDialog(object):
...
@@ -124,6 +124,206 @@ class UnoDialog(object):
if
iSelIndex
!=
-
1
:
if
iSelIndex
!=
-
1
:
xListBox
.
selectItemPos
(
iSelIndex
,
True
)
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
The problem with setting the visibility of controls
is that changing the current step of a dialog will automatically
is that changing the current step of a dialog will automatically
...
@@ -175,6 +375,7 @@ class UnoDialog(object):
...
@@ -175,6 +375,7 @@ class UnoDialog(object):
# repaints the currentDialogStep
# repaints the currentDialogStep
def
repaintDialogStep
(
self
):
def
repaintDialogStep
(
self
):
try
:
try
:
ncurstep
=
int
(
Helper
.
getUnoPropertyValue
(
ncurstep
=
int
(
Helper
.
getUnoPropertyValue
(
...
@@ -186,20 +387,15 @@ class UnoDialog(object):
...
@@ -186,20 +387,15 @@ class UnoDialog(object):
except
com
.
sun
.
star
.
uno
.
Exception
,
exception
:
except
com
.
sun
.
star
.
uno
.
Exception
,
exception
:
traceback
.
print_exc
()
traceback
.
print_exc
()
def
insertControlModel
(
def
insertControlModel
(
self
,
ServiceName
,
sName
,
sProperties
,
sValues
):
self
,
serviceName
,
componentName
,
sPropNames
,
oPropValues
):
try
:
try
:
xControlModel
=
self
.
xDialogModel
.
createInstance
(
serviceName
)
xControlModel
=
self
.
xDialogModel
.
createInstance
(
ServiceName
)
Helper
.
setUnoPropertyValues
(
Helper
.
setUnoPropertyValues
(
xControlModel
,
sProperties
,
sValues
)
xControlModel
,
sPropNames
,
oPropValues
)
self
.
xDialogModel
.
insertByName
(
sName
,
xControlModel
)
self
.
xDialogModel
.
insertByName
(
componentName
,
xControlModel
)
return
xControlModel
Helper
.
setUnoPropertyValue
(
xControlModel
,
except
Exception
,
exception
:
PropertyNames
.
PROPERTY_NAME
,
componentName
)
except
Exception
,
ex
:
traceback
.
print_exc
()
traceback
.
print_exc
()
return
None
aObj
=
self
.
xUnoDialog
.
getControl
(
componentName
)
return
aObj
def
setFocus
(
self
,
ControlName
):
def
setFocus
(
self
,
ControlName
):
oFocusControl
=
self
.
xUnoDialog
.
getControl
(
ControlName
)
oFocusControl
=
self
.
xUnoDialog
.
getControl
(
ControlName
)
...
@@ -348,3 +544,9 @@ class UnoDialog(object):
...
@@ -348,3 +544,9 @@ class UnoDialog(object):
def
addResourceHandler
(
self
,
_Unit
,
_Module
):
def
addResourceHandler
(
self
,
_Unit
,
_Module
):
self
.
m_oResource
=
Resource
(
self
.
xMSF
,
_Unit
,
_Module
)
self
.
m_oResource
=
Resource
(
self
.
xMSF
,
_Unit
,
_Module
)
def
setInitialTabindex
(
self
,
_istep
):
return
(
short
)(
_istep
*
100
)
def
getListBoxLineCount
(
self
):
return
20
wizards/com/sun/star/wizards/ui/UnoDialog2.py
Dosyayı görüntüle @
8569e285
...
@@ -25,7 +25,7 @@ class UnoDialog2(UnoDialog):
...
@@ -25,7 +25,7 @@ class UnoDialog2(UnoDialog):
def
insertButton
(
def
insertButton
(
self
,
sName
,
actionPerformed
,
sPropNames
,
oPropValues
,
listener
):
self
,
sName
,
actionPerformed
,
sPropNames
,
oPropValues
,
listener
):
xButton
=
self
.
insertControlModel
(
xButton
=
self
.
insertControlModel
2
(
"com.sun.star.awt.UnoControlButtonModel"
,
"com.sun.star.awt.UnoControlButtonModel"
,
sName
,
sPropNames
,
oPropValues
)
sName
,
sPropNames
,
oPropValues
)
if
actionPerformed
is
not
None
:
if
actionPerformed
is
not
None
:
...
@@ -37,7 +37,7 @@ class UnoDialog2(UnoDialog):
...
@@ -37,7 +37,7 @@ class UnoDialog2(UnoDialog):
def
insertImageButton
(
def
insertImageButton
(
self
,
sName
,
actionPerformed
,
sPropNames
,
oPropValues
,
listener
):
self
,
sName
,
actionPerformed
,
sPropNames
,
oPropValues
,
listener
):
xButton
=
self
.
insertControlModel
(
xButton
=
self
.
insertControlModel
2
(
"com.sun.star.awt.UnoControlButtonModel"
,
"com.sun.star.awt.UnoControlButtonModel"
,
sName
,
sPropNames
,
oPropValues
)
sName
,
sPropNames
,
oPropValues
)
if
actionPerformed
is
not
None
:
if
actionPerformed
is
not
None
:
...
@@ -49,7 +49,7 @@ class UnoDialog2(UnoDialog):
...
@@ -49,7 +49,7 @@ class UnoDialog2(UnoDialog):
def
insertCheckBox
(
def
insertCheckBox
(
self
,
sName
,
itemChanged
,
sPropNames
,
oPropValues
,
listener
):
self
,
sName
,
itemChanged
,
sPropNames
,
oPropValues
,
listener
):
xCheckBox
=
self
.
insertControlModel
(
xCheckBox
=
self
.
insertControlModel
2
(
"com.sun.star.awt.UnoControlCheckBoxModel"
,
"com.sun.star.awt.UnoControlCheckBoxModel"
,
sName
,
sPropNames
,
oPropValues
)
sName
,
sPropNames
,
oPropValues
)
if
itemChanged
is
not
None
:
if
itemChanged
is
not
None
:
...
@@ -61,7 +61,7 @@ class UnoDialog2(UnoDialog):
...
@@ -61,7 +61,7 @@ class UnoDialog2(UnoDialog):
def
insertComboBox
(
def
insertComboBox
(
self
,
sName
,
actionPerformed
,
itemChanged
,
self
,
sName
,
actionPerformed
,
itemChanged
,
textChanged
,
sPropNames
,
oPropValues
,
listener
):
textChanged
,
sPropNames
,
oPropValues
,
listener
):
xComboBox
=
self
.
insertControlModel
(
xComboBox
=
self
.
insertControlModel
2
(
"com.sun.star.awt.UnoControlComboBoxModel"
,
"com.sun.star.awt.UnoControlComboBoxModel"
,
sName
,
sPropNames
,
oPropValues
)
sName
,
sPropNames
,
oPropValues
)
if
actionPerformed
is
not
None
:
if
actionPerformed
is
not
None
:
...
@@ -82,7 +82,7 @@ class UnoDialog2(UnoDialog):
...
@@ -82,7 +82,7 @@ class UnoDialog2(UnoDialog):
def
insertListBox
(
def
insertListBox
(
self
,
sName
,
actionPerformed
,
itemChanged
,
self
,
sName
,
actionPerformed
,
itemChanged
,
sPropNames
,
oPropValues
,
listener
):
sPropNames
,
oPropValues
,
listener
):
xListBox
=
self
.
insertControlModel
(
xListBox
=
self
.
insertControlModel
2
(
"com.sun.star.awt.UnoControlListBoxModel"
,
"com.sun.star.awt.UnoControlListBoxModel"
,
sName
,
sPropNames
,
oPropValues
)
sName
,
sPropNames
,
oPropValues
)
...
@@ -98,7 +98,7 @@ class UnoDialog2(UnoDialog):
...
@@ -98,7 +98,7 @@ class UnoDialog2(UnoDialog):
def
insertRadioButton
(
def
insertRadioButton
(
self
,
sName
,
itemChanged
,
sPropNames
,
oPropValues
,
listener
):
self
,
sName
,
itemChanged
,
sPropNames
,
oPropValues
,
listener
):
xRadioButton
=
self
.
insertControlModel
(
xRadioButton
=
self
.
insertControlModel
2
(
"com.sun.star.awt.UnoControlRadioButtonModel"
,
"com.sun.star.awt.UnoControlRadioButtonModel"
,
sName
,
sPropNames
,
oPropValues
)
sName
,
sPropNames
,
oPropValues
)
if
itemChanged
is
not
None
:
if
itemChanged
is
not
None
:
...
@@ -106,10 +106,11 @@ class UnoDialog2(UnoDialog):
...
@@ -106,10 +106,11 @@ class UnoDialog2(UnoDialog):
xRadioButton
.
addItemListener
(
xRadioButton
.
addItemListener
(
ItemListenerProcAdapter
(
itemChanged
))
ItemListenerProcAdapter
(
itemChanged
))
return
xRadioButton
return
xRadioButton
def
insertTitledBox
(
self
,
sName
,
sPropNames
,
oPropValues
):
def
insertTitledBox
(
self
,
sName
,
sPropNames
,
oPropValues
):
oTitledBox
=
self
.
insertControlModel
(
oTitledBox
=
self
.
insertControlModel
2
(
"com.sun.star.awt.UnoControlGroupBoxModel"
,
"com.sun.star.awt.UnoControlGroupBoxModel"
,
sName
,
sPropNames
,
oPropValues
)
sName
,
sPropNames
,
oPropValues
)
return
oTitledBox
return
oTitledBox
...
@@ -121,7 +122,7 @@ class UnoDialog2(UnoDialog):
...
@@ -121,7 +122,7 @@ class UnoDialog2(UnoDialog):
sPropNames
,
oPropValues
,
listener
)
sPropNames
,
oPropValues
,
listener
)
def
insertImage
(
self
,
sName
,
sPropNames
,
oPropValues
):
def
insertImage
(
self
,
sName
,
sPropNames
,
oPropValues
):
return
self
.
insertControlModel
(
return
self
.
insertControlModel
2
(
"com.sun.star.awt.UnoControlImageControlModel"
,
"com.sun.star.awt.UnoControlImageControlModel"
,
sName
,
sPropNames
,
oPropValues
)
sName
,
sPropNames
,
oPropValues
)
...
@@ -146,11 +147,12 @@ class UnoDialog2(UnoDialog):
...
@@ -146,11 +147,12 @@ class UnoDialog2(UnoDialog):
def
insertEditField
(
def
insertEditField
(
self
,
sName
,
sTextChanged
,
sModelClass
,
self
,
sName
,
sTextChanged
,
sModelClass
,
sPropNames
,
oPropValues
,
listener
):
sPropNames
,
oPropValues
,
listener
):
xField
=
self
.
insertControlModel
(
sModelClass
,
xField
=
self
.
insertControlModel
2
(
sModelClass
,
sName
,
sPropNames
,
oPropValues
)
sName
,
sPropNames
,
oPropValues
)
if
sTextChanged
is
not
None
:
if
sTextChanged
is
not
None
:
sTextChanged
=
getattr
(
listener
,
sTextChanged
)
sTextChanged
=
getattr
(
listener
,
sTextChanged
)
xField
.
addTextListener
(
TextListenerProcAdapter
(
sTextChanged
))
xField
.
addTextListener
(
TextListenerProcAdapter
(
sTextChanged
))
return
xField
return
xField
def
insertFileControl
(
def
insertFileControl
(
...
@@ -201,36 +203,55 @@ class UnoDialog2(UnoDialog):
...
@@ -201,36 +203,55 @@ class UnoDialog2(UnoDialog):
sPropNames
,
oPropValues
,
listener
)
sPropNames
,
oPropValues
,
listener
)
def
insertFixedLine
(
self
,
sName
,
sPropNames
,
oPropValues
):
def
insertFixedLine
(
self
,
sName
,
sPropNames
,
oPropValues
):
oLine
=
self
.
insertControlModel
(
oLine
=
self
.
insertControlModel
2
(
"com.sun.star.awt.UnoControlFixedLineModel"
,
"com.sun.star.awt.UnoControlFixedLineModel"
,
sName
,
sPropNames
,
oPropValues
)
sName
,
sPropNames
,
oPropValues
)
return
oLine
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
):
def
insertScrollBar
(
self
,
sName
,
sPropNames
,
oPropValues
):
oScrollBar
=
self
.
insertControlModel
(
oScrollBar
=
self
.
insertControlModel
2
(
"com.sun.star.awt.UnoControlScrollBarModel"
,
"com.sun.star.awt.UnoControlScrollBarModel"
,
sName
,
sPropNames
,
oPropValues
)
sName
,
sPropNames
,
oPropValues
)
return
oScrollBar
return
oScrollBar
def
insertProgressBar
(
self
,
sName
,
sPropNames
,
oPropValues
):
def
insertProgressBar
(
self
,
sName
,
sPropNames
,
oPropValues
):
oProgressBar
=
self
.
insertControlModel
(
oProgressBar
=
self
.
insertControlModel
2
(
"com.sun.star.awt.UnoControlProgressBarModel"
,
"com.sun.star.awt.UnoControlProgressBarModel"
,
sName
,
sPropNames
,
oPropValues
)
sName
,
sPropNames
,
oPropValues
)
return
oProgressBar
return
oProgressBar
def
insertGroupBox
(
self
,
sName
,
sPropNames
,
oPropValues
):
def
insertGroupBox
(
self
,
sName
,
sPropNames
,
oPropValues
):
oGroupBox
=
self
.
insertControlModel
(
oGroupBox
=
self
.
insertControlModel
2
(
"com.sun.star.awt.UnoControlGroupBoxModel"
,
"com.sun.star.awt.UnoControlGroupBoxModel"
,
sName
,
sPropNames
,
oPropValues
)
sName
,
sPropNames
,
oPropValues
)
return
oGroupBox
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
):
def
showMessageBox
(
self
,
windowServiceName
,
windowAttribute
,
MessageText
):
return
SystemDialog
.
showMessageBox
(
return
SystemDialog
.
showMessageBox
(
xMSF
,
self
.
xControl
.
Peer
,
xMSF
,
self
.
xControl
.
Peer
,
...
...
wizards/com/sun/star/wizards/ui/WizardDialog.py
Dosyayı görüntüle @
8569e285
...
@@ -43,6 +43,7 @@ class WizardDialog(UnoDialog2):
...
@@ -43,6 +43,7 @@ class WizardDialog(UnoDialog2):
self
.
sMsgEndAutopilot
=
self
.
__oWizardResource
.
getResText
(
self
.
sMsgEndAutopilot
=
self
.
__oWizardResource
.
getResText
(
UIConsts
.
RID_DB_COMMON
+
33
)
UIConsts
.
RID_DB_COMMON
+
33
)
self
.
oRoadmap
=
None
self
.
oRoadmap
=
None
#self.vetos = VetoableChangeSupport.VetoableChangeSupport_unknown(this)
def
getResource
(
self
):
def
getResource
(
self
):
return
self
.
__oWizardResource
return
self
.
__oWizardResource
...
@@ -73,7 +74,7 @@ class WizardDialog(UnoDialog2):
...
@@ -73,7 +74,7 @@ class WizardDialog(UnoDialog2):
return
False
return
False
def
setCurrentRoadmapItemID
(
self
,
ID
):
def
setCurrentRoadmapItemID
(
self
,
ID
):
if
self
.
oRoadmap
is
not
None
:
if
self
.
oRoadmap
!=
None
:
nCurItemID
=
self
.
getCurrentRoadmapItemID
()
nCurItemID
=
self
.
getCurrentRoadmapItemID
()
if
nCurItemID
!=
ID
:
if
nCurItemID
!=
ID
:
Helper
.
setUnoPropertyValue
(
self
.
oRoadmap
,
"CurrentItemID"
,
ID
)
Helper
.
setUnoPropertyValue
(
self
.
oRoadmap
,
"CurrentItemID"
,
ID
)
...
@@ -94,8 +95,7 @@ class WizardDialog(UnoDialog2):
...
@@ -94,8 +95,7 @@ class WizardDialog(UnoDialog2):
# the roadmap control has got no real TabIndex ever
# the roadmap control has got no real TabIndex ever
# that is not correct, but changing this would need time,
# that is not correct, but changing this would need time,
# so it is used without TabIndex as before
# so it is used without TabIndex as before
self
.
oRoadmap
=
self
.
insertControlModel
(
xRoadmapControl
=
self
.
insertControlModel
(
"com.sun.star.awt.UnoControlRoadmapModel"
,
"com.sun.star.awt.UnoControlRoadmapModel"
,
"rdmNavi"
,
"rdmNavi"
,
(
PropertyNames
.
PROPERTY_HEIGHT
,
(
PropertyNames
.
PROPERTY_HEIGHT
,
...
@@ -106,9 +106,12 @@ class WizardDialog(UnoDialog2):
...
@@ -106,9 +106,12 @@ class WizardDialog(UnoDialog2):
PropertyNames
.
PROPERTY_WIDTH
),
PropertyNames
.
PROPERTY_WIDTH
),
((
iDialogHeight
-
26
),
0
,
0
,
0
,
((
iDialogHeight
-
26
),
0
,
0
,
0
,
0
,
True
,
85
))
0
,
True
,
85
))
self
.
oRoadmap
=
xRoadmapControl
.
Model
self
.
oRoadmap
.
setPropertyValue
(
PropertyNames
.
PROPERTY_NAME
,
"rdmNavi"
)
self
.
xRoadmapControl
=
self
.
xUnoDialog
.
getControl
(
"rdmNavi"
)
method
=
getattr
(
self
,
"itemStateChanged"
)
method
=
getattr
(
self
,
"itemStateChanged"
)
xRoadmapControl
.
addItemListener
(
self
.
xRoadmapControl
.
addItemListener
(
ItemListenerProcAdapter
(
method
))
ItemListenerProcAdapter
(
method
))
Helper
.
setUnoPropertyValue
(
Helper
.
setUnoPropertyValue
(
...
@@ -143,6 +146,9 @@ class WizardDialog(UnoDialog2):
...
@@ -143,6 +146,9 @@ class WizardDialog(UnoDialog2):
traceback
.
print_exc
()
traceback
.
print_exc
()
return
-
1
return
-
1
def
getRMItemCount
(
self
):
return
self
.
oRoadmap
.
Count
def
getRoadmapItemByID
(
self
,
_ID
):
def
getRoadmapItemByID
(
self
,
_ID
):
try
:
try
:
getByIndex
=
self
.
oRoadmap
.
getByIndex
getByIndex
=
self
.
oRoadmap
.
getByIndex
...
@@ -196,6 +202,12 @@ class WizardDialog(UnoDialog2):
...
@@ -196,6 +202,12 @@ class WizardDialog(UnoDialog2):
self
.
enableNextButton
(
self
.
getNextAvailableStep
()
>
0
)
self
.
enableNextButton
(
self
.
getNextAvailableStep
()
>
0
)
self
.
enableBackButton
(
nNewStep
!=
1
)
self
.
enableBackButton
(
nNewStep
!=
1
)
def
iscompleted
(
self
,
_ndialogpage
):
return
False
def
ismodified
(
self
,
_ndialogpage
):
return
False
def
drawNaviBar
(
self
):
def
drawNaviBar
(
self
):
try
:
try
:
curtabindex
=
UIConsts
.
SOFIRSTWIZARDNAVITABINDEX
curtabindex
=
UIConsts
.
SOFIRSTWIZARDNAVITABINDEX
...
@@ -376,7 +388,9 @@ class WizardDialog(UnoDialog2):
...
@@ -376,7 +388,9 @@ class WizardDialog(UnoDialog2):
while
i
<=
self
.
nMaxStep
:
while
i
<=
self
.
nMaxStep
:
if
self
.
isStepEnabled
(
i
):
if
self
.
isStepEnabled
(
i
):
return
i
return
i
i
+=
1
i
+=
1
return
-
1
return
-
1
def
gotoNextAvailableStep
(
self
):
def
gotoNextAvailableStep
(
self
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment