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
34fbbe1a
Kaydet (Commit)
34fbbe1a
authored
Kas 15, 2012
tarafından
Xisco Fauli
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
pyfax: exceptions are python3 compatible
Change-Id: Ife2a935b25928db154756494798a5e9b619f902a
üst
bb16e912
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
100 additions
and
139 deletions
+100
-139
Desktop.py
wizards/com/sun/star/wizards/common/Desktop.py
+4
-4
FileAccess.py
wizards/com/sun/star/wizards/common/FileAccess.py
+0
-0
Helper.py
wizards/com/sun/star/wizards/common/Helper.py
+8
-8
NumberFormatter.py
wizards/com/sun/star/wizards/common/NumberFormatter.py
+4
-4
Resource.py
wizards/com/sun/star/wizards/common/Resource.py
+3
-3
SystemDialog.py
wizards/com/sun/star/wizards/common/SystemDialog.py
+9
-9
OfficeDocument.py
wizards/com/sun/star/wizards/document/OfficeDocument.py
+10
-13
FaxWizardDialogImpl.py
wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py
+8
-10
TextDocument.py
wizards/com/sun/star/wizards/text/TextDocument.py
+4
-11
TextFieldHandler.py
wizards/com/sun/star/wizards/text/TextFieldHandler.py
+16
-19
TextSectionHandler.py
wizards/com/sun/star/wizards/text/TextSectionHandler.py
+7
-7
ViewHandler.py
wizards/com/sun/star/wizards/text/ViewHandler.py
+3
-3
PathSelection.py
wizards/com/sun/star/wizards/ui/PathSelection.py
+2
-2
UnoDialog.py
wizards/com/sun/star/wizards/ui/UnoDialog.py
+7
-30
WizardDialog.py
wizards/com/sun/star/wizards/ui/WizardDialog.py
+14
-14
DataAware.py
wizards/com/sun/star/wizards/ui/event/DataAware.py
+1
-2
No files found.
wizards/com/sun/star/wizards/common/Desktop.py
Dosyayı görüntüle @
34fbbe1a
...
@@ -31,10 +31,10 @@ class Desktop(object):
...
@@ -31,10 +31,10 @@ class Desktop(object):
if
xMSF
is
not
None
:
if
xMSF
is
not
None
:
try
:
try
:
xDesktop
=
xMSF
.
createInstance
(
"com.sun.star.frame.Desktop"
)
xDesktop
=
xMSF
.
createInstance
(
"com.sun.star.frame.Desktop"
)
except
Exception
,
exception
:
except
Exception
:
traceback
.
print_exc
()
traceback
.
print_exc
()
else
:
else
:
print
"Can't create a desktop. null pointer !"
print
(
"Can't create a desktop. null pointer !"
)
return
xDesktop
return
xDesktop
...
@@ -55,7 +55,7 @@ class Desktop(object):
...
@@ -55,7 +55,7 @@ class Desktop(object):
oURLArray
[
0
]
=
oURL
oURLArray
[
0
]
=
oURL
xDispatch
=
xFrame
.
queryDispatch
(
oURLArray
[
0
],
_stargetframe
,
ALL
)
xDispatch
=
xFrame
.
queryDispatch
(
oURLArray
[
0
],
_stargetframe
,
ALL
)
return
xDispatch
return
xDispatch
except
Exception
,
e
:
except
Exception
:
traceback
.
print_exc
()
traceback
.
print_exc
()
return
None
return
None
...
@@ -99,7 +99,7 @@ class Desktop(object):
...
@@ -99,7 +99,7 @@ class Desktop(object):
aResult
=
ocharservice
.
parsePredefinedToken
(
KParseType
.
IDENTNAME
,
aResult
=
ocharservice
.
parsePredefinedToken
(
KParseType
.
IDENTNAME
,
_sString
,
0
,
_aLocale
,
nStartFlags
,
""
,
nStartFlags
,
" "
)
_sString
,
0
,
_aLocale
,
nStartFlags
,
""
,
nStartFlags
,
" "
)
return
aResult
.
EndPos
return
aResult
.
EndPos
except
Exception
,
e
:
except
Exception
:
traceback
.
print_exc
()
traceback
.
print_exc
()
return
-
1
return
-
1
...
...
wizards/com/sun/star/wizards/common/FileAccess.py
Dosyayı görüntüle @
34fbbe1a
This diff is collapsed.
Click to expand it.
wizards/com/sun/star/wizards/common/Helper.py
Dosyayı görüntüle @
34fbbe1a
...
@@ -31,7 +31,7 @@ class Helper(object):
...
@@ -31,7 +31,7 @@ class Helper(object):
setattr
(
xPSet
,
PropertyName
,
PropertyValue
)
setattr
(
xPSet
,
PropertyName
,
PropertyValue
)
except
AttributeError
:
except
AttributeError
:
raise
AttributeError
,
"No Such Property: '
%
s'"
%
PropertyName
raise
AttributeError
(
"No Such Property: '
%
s'"
%
PropertyName
)
except
Exception
:
except
Exception
:
traceback
.
print_exc
()
traceback
.
print_exc
()
...
@@ -43,7 +43,7 @@ class Helper(object):
...
@@ -43,7 +43,7 @@ class Helper(object):
else
:
else
:
raise
RuntimeException
()
raise
RuntimeException
()
except
Exception
,
exception
:
except
Exception
:
traceback
.
print_exc
()
traceback
.
print_exc
()
return
None
return
None
...
@@ -64,7 +64,7 @@ class Helper(object):
...
@@ -64,7 +64,7 @@ class Helper(object):
return
oObject
return
oObject
return
None
return
None
except
Exception
,
exception
:
except
Exception
:
traceback
.
print_exc
()
traceback
.
print_exc
()
return
None
return
None
...
@@ -76,7 +76,7 @@ class Helper(object):
...
@@ -76,7 +76,7 @@ class Helper(object):
if
isinstance
(
oObject
,
list
):
if
isinstance
(
oObject
,
list
):
return
getArrayValue
(
oObject
)
return
getArrayValue
(
oObject
)
except
Exception
,
exception
:
except
Exception
:
traceback
.
print_exc
()
traceback
.
print_exc
()
return
None
return
None
...
@@ -90,7 +90,7 @@ class Helper(object):
...
@@ -90,7 +90,7 @@ class Helper(object):
return
oObject
return
oObject
return
None
return
None
except
Exception
,
exception
:
except
Exception
:
traceback
.
print_exc
()
traceback
.
print_exc
()
return
None
return
None
...
@@ -128,7 +128,7 @@ class Helper(object):
...
@@ -128,7 +128,7 @@ class Helper(object):
else
:
else
:
return
oPropList
return
oPropList
except
Exception
,
exception
:
except
Exception
:
traceback
.
print_exc
()
traceback
.
print_exc
()
return
None
return
None
...
@@ -137,13 +137,13 @@ class Helper(object):
...
@@ -137,13 +137,13 @@ class Helper(object):
#try to add the path to the class loader
#try to add the path to the class loader
aHelper
=
PropertySetHelper
(
_xMSF
);
aHelper
=
PropertySetHelper
(
_xMSF
);
aDefaultContext
=
aHelper
.
getPropertyValueAsObject
(
"DefaultContext"
)
aDefaultContext
=
aHelper
.
getPropertyValueAsObject
(
"DefaultContext"
)
return
aDefaultContext
;
return
aDefaultContext
def
getMacroExpander
(
_xMSF
):
def
getMacroExpander
(
_xMSF
):
xComponentContext
=
self
.
getComponentContext
(
_xMSF
);
xComponentContext
=
self
.
getComponentContext
(
_xMSF
);
aSingleton
=
xComponentContext
.
getValueByName
(
aSingleton
=
xComponentContext
.
getValueByName
(
"/singletons/com.sun.star.util.theMacroExpander"
)
"/singletons/com.sun.star.util.theMacroExpander"
)
return
aSingleton
;
return
aSingleton
class
DateUtils
(
object
):
class
DateUtils
(
object
):
...
...
wizards/com/sun/star/wizards/common/NumberFormatter.py
Dosyayı görüntüle @
34fbbe1a
...
@@ -102,7 +102,7 @@ class NumberFormatter(object):
...
@@ -102,7 +102,7 @@ class NumberFormatter(object):
_FormatString
,
self
.
aLocale
)
_FormatString
,
self
.
aLocale
)
return
NewFormatKey
return
NewFormatKey
except
Exception
,
e
:
except
Exception
:
traceback
.
print_exc
()
traceback
.
print_exc
()
return
-
1
return
-
1
...
@@ -122,7 +122,7 @@ class NumberFormatter(object):
...
@@ -122,7 +122,7 @@ class NumberFormatter(object):
_FormatString
,
_aLocale
)
_FormatString
,
_aLocale
)
return
NewFormatKey
return
NewFormatKey
except
Exception
,
e
:
except
Exception
:
traceback
.
print_exc
()
traceback
.
print_exc
()
return
-
1
return
-
1
...
@@ -147,7 +147,7 @@ class NumberFormatter(object):
...
@@ -147,7 +147,7 @@ class NumberFormatter(object):
# TODO: throws a exception in a try catch environment, very helpful?
# TODO: throws a exception in a try catch environment, very helpful?
raise
Exception
raise
Exception
except
Exception
,
exception
:
except
Exception
:
traceback
.
print_exc
()
traceback
.
print_exc
()
def
getNullDateCorrection
(
self
):
def
getNullDateCorrection
(
self
):
...
@@ -174,7 +174,7 @@ class NumberFormatter(object):
...
@@ -174,7 +174,7 @@ class NumberFormatter(object):
self
.
iLogicalFormatKey
=
self
.
xNumberFormats
.
addNew
(
self
.
iLogicalFormatKey
=
self
.
xNumberFormats
.
addNew
(
FormatString
,
self
.
aLocale
)
FormatString
,
self
.
aLocale
)
except
Exception
,
e
:
except
Exception
:
#MalformedNumberFormat
#MalformedNumberFormat
traceback
.
print_exc
()
traceback
.
print_exc
()
self
.
iLogicalFormatKey
=
self
.
xNumberFormats
.
getStandardFormat
(
self
.
iLogicalFormatKey
=
self
.
xNumberFormats
.
getStandardFormat
(
...
...
wizards/com/sun/star/wizards/common/Resource.py
Dosyayı görüntüle @
34fbbe1a
...
@@ -37,14 +37,14 @@ class Resource(object):
...
@@ -37,14 +37,14 @@ class Resource(object):
if
self
.
xStringIndexAccess
is
None
:
if
self
.
xStringIndexAccess
is
None
:
raise
Exception
(
"could not initialize xStringIndexAccess"
)
raise
Exception
(
"could not initialize xStringIndexAccess"
)
except
Exception
,
exception
:
except
Exception
:
traceback
.
print_exc
()
traceback
.
print_exc
()
self
.
showCommonResourceError
(
self
.
xMSF
)
self
.
showCommonResourceError
(
self
.
xMSF
)
def
getResText
(
self
,
nID
):
def
getResText
(
self
,
nID
):
try
:
try
:
return
self
.
xStringIndexAccess
.
getByIndex
(
nID
)
return
self
.
xStringIndexAccess
.
getByIndex
(
nID
)
except
Exception
,
exception
:
except
Exception
:
traceback
.
print_exc
()
traceback
.
print_exc
()
raise
ValueError
(
"Resource with ID not "
+
str
(
nID
)
+
" not found"
)
raise
ValueError
(
"Resource with ID not "
+
str
(
nID
)
+
" not found"
)
...
@@ -56,7 +56,7 @@ class Resource(object):
...
@@ -56,7 +56,7 @@ class Resource(object):
ResArray
[
i
]
=
getResText
(
nID
+
i
)
ResArray
[
i
]
=
getResText
(
nID
+
i
)
i
+=
1
i
+=
1
return
ResArray
return
ResArray
except
Exception
,
exception
:
except
Exception
:
traceback
.
print_exc
()
traceback
.
print_exc
()
raise
ValueError
(
"Resource with ID not"
+
str
(
nID
)
+
" not found"
)
raise
ValueError
(
"Resource with ID not"
+
str
(
nID
)
+
" not found"
)
...
...
wizards/com/sun/star/wizards/common/SystemDialog.py
Dosyayı görüntüle @
34fbbe1a
...
@@ -40,7 +40,7 @@ class SystemDialog(object):
...
@@ -40,7 +40,7 @@ class SystemDialog(object):
if
self
.
systemDialog
is
not
None
:
if
self
.
systemDialog
is
not
None
:
self
.
systemDialog
.
initialize
((
Type
,))
self
.
systemDialog
.
initialize
((
Type
,))
except
Exception
,
exception
:
except
Exception
:
traceback
.
print_exc
()
traceback
.
print_exc
()
@classmethod
@classmethod
...
@@ -68,7 +68,7 @@ class SystemDialog(object):
...
@@ -68,7 +68,7 @@ class SystemDialog(object):
try
:
try
:
s
=
self
.
xStringSubstitution
.
substituteVariables
(
path
,
False
)
s
=
self
.
xStringSubstitution
.
substituteVariables
(
path
,
False
)
return
s
return
s
except
Exception
,
ex
:
except
Exception
:
traceback
.
print_exc
()
traceback
.
print_exc
()
return
path
return
path
...
@@ -85,7 +85,7 @@ class SystemDialog(object):
...
@@ -85,7 +85,7 @@ class SystemDialog(object):
sPathList
=
self
.
systemDialog
.
getFiles
()
sPathList
=
self
.
systemDialog
.
getFiles
()
self
.
sStorePath
=
sPathList
[
0
]
self
.
sStorePath
=
sPathList
[
0
]
except
Exception
,
exception
:
except
Exception
:
traceback
.
print_exc
()
traceback
.
print_exc
()
return
self
.
sStorePath
return
self
.
sStorePath
...
@@ -94,7 +94,7 @@ class SystemDialog(object):
...
@@ -94,7 +94,7 @@ class SystemDialog(object):
try
:
try
:
self
.
systemDialog
.
setDisplayDirectoryxPropertyValue
(
self
.
systemDialog
.
setDisplayDirectoryxPropertyValue
(
subst
(
displayDir
))
subst
(
displayDir
))
except
IllegalArgumentException
,
iae
:
except
IllegalArgumentException
as
iae
:
traceback
.
print_exc
()
traceback
.
print_exc
()
raise
AttributeError
(
iae
.
getMessage
());
raise
AttributeError
(
iae
.
getMessage
());
...
@@ -115,7 +115,7 @@ class SystemDialog(object):
...
@@ -115,7 +115,7 @@ class SystemDialog(object):
if
self
.
execute
(
self
.
systemDialog
):
if
self
.
execute
(
self
.
systemDialog
):
return
self
.
systemDialog
.
getFiles
()
return
self
.
systemDialog
.
getFiles
()
except
Exception
,
exception
:
except
Exception
:
traceback
.
print_exc
()
traceback
.
print_exc
()
return
None
return
None
...
@@ -127,7 +127,7 @@ class SystemDialog(object):
...
@@ -127,7 +127,7 @@ class SystemDialog(object):
pattern
=
"*."
+
sExtension
pattern
=
"*."
+
sExtension
#add the filter
#add the filter
self
.
addFilter
(
uiName
,
pattern
,
setToDefault
)
self
.
addFilter
(
uiName
,
pattern
,
setToDefault
)
except
Exception
,
exception
:
except
Exception
:
traceback
.
print_exc
()
traceback
.
print_exc
()
def
addFilter
(
self
,
uiName
,
pattern
,
setToDefault
):
def
addFilter
(
self
,
uiName
,
pattern
,
setToDefault
):
...
@@ -136,7 +136,7 @@ class SystemDialog(object):
...
@@ -136,7 +136,7 @@ class SystemDialog(object):
if
setToDefault
:
if
setToDefault
:
self
.
systemDialog
.
setCurrentFilter
(
uiName
)
self
.
systemDialog
.
setCurrentFilter
(
uiName
)
except
Exception
,
ex
:
except
Exception
:
traceback
.
print_exc
()
traceback
.
print_exc
()
'''
'''
...
@@ -157,7 +157,7 @@ class SystemDialog(object):
...
@@ -157,7 +157,7 @@ class SystemDialog(object):
raise
NullPointerException
(
raise
NullPointerException
(
"UIName property not found for Filter "
+
filterName
);
"UIName property not found for Filter "
+
filterName
);
except
Exception
,
exception
:
except
Exception
:
traceback
.
print_exc
()
traceback
.
print_exc
()
return
None
return
None
...
@@ -221,6 +221,6 @@ class SystemDialog(object):
...
@@ -221,6 +221,6 @@ class SystemDialog(object):
xPathSubst
=
xMSF
.
createInstance
(
xPathSubst
=
xMSF
.
createInstance
(
"com.sun.star.util.PathSubstitution"
)
"com.sun.star.util.PathSubstitution"
)
return
xPathSubst
return
xPathSubst
except
Exception
,
e
:
except
Exception
:
traceback
.
print_exc
()
traceback
.
print_exc
()
return
None
return
None
wizards/com/sun/star/wizards/document/OfficeDocument.py
Dosyayı görüntüle @
34fbbe1a
...
@@ -59,7 +59,7 @@ class OfficeDocument(object):
...
@@ -59,7 +59,7 @@ class OfficeDocument(object):
uno
.
invoke
(
xComponent
.
Events
,
"replaceByName"
,
uno
.
invoke
(
xComponent
.
Events
,
"replaceByName"
,
(
EventName
,
uno
.
Any
(
"[]com.sun.star.beans.PropertyValue"
,
(
EventName
,
uno
.
Any
(
"[]com.sun.star.beans.PropertyValue"
,
tuple
(
oEventProperties
))))
tuple
(
oEventProperties
))))
except
Exception
,
exception
:
except
Exception
:
traceback
.
print_exc
()
traceback
.
print_exc
()
def
dispose
(
self
,
xMSF
,
xComponent
):
def
dispose
(
self
,
xMSF
,
xComponent
):
...
@@ -71,7 +71,7 @@ class OfficeDocument(object):
...
@@ -71,7 +71,7 @@ class OfficeDocument(object):
Desktop
.
dispatchURL
(
xMSF
,
".uno:CloseDoc"
,
xFrame
)
Desktop
.
dispatchURL
(
xMSF
,
".uno:CloseDoc"
,
xFrame
)
except
PropertyVetoException
,
exception
:
except
PropertyVetoException
:
traceback
.
print_exc
()
traceback
.
print_exc
()
'''
'''
...
@@ -132,7 +132,7 @@ class OfficeDocument(object):
...
@@ -132,7 +132,7 @@ class OfficeDocument(object):
xToolkit
=
None
xToolkit
=
None
try
:
try
:
xToolkit
=
xMSF
.
createInstance
(
"com.sun.star.awt.Toolkit"
)
xToolkit
=
xMSF
.
createInstance
(
"com.sun.star.awt.Toolkit"
)
except
Exception
,
e
:
except
Exception
:
# TODO Auto-generated catch block
# TODO Auto-generated catch block
traceback
.
print_exc
()
traceback
.
print_exc
()
...
@@ -156,8 +156,7 @@ class OfficeDocument(object):
...
@@ -156,8 +156,7 @@ class OfficeDocument(object):
xPeer
=
None
xPeer
=
None
try
:
try
:
xPeer
=
xToolkit
.
createWindow
(
aDescriptor
)
xPeer
=
xToolkit
.
createWindow
(
aDescriptor
)
except
IllegalArgumentException
,
e
:
except
IllegalArgumentException
:
# TODO Auto-generated catch block
traceback
.
print_exc
()
traceback
.
print_exc
()
#define some further properties of the frame window
#define some further properties of the frame window
...
@@ -167,8 +166,7 @@ class OfficeDocument(object):
...
@@ -167,8 +166,7 @@ class OfficeDocument(object):
xFrame
=
None
xFrame
=
None
try
:
try
:
xFrame
=
xMSF
.
createInstance
(
"com.sun.star.frame.Frame"
)
xFrame
=
xMSF
.
createInstance
(
"com.sun.star.frame.Frame"
)
except
Exception
,
e
:
except
Exception
:
# TODO Auto-generated catch block
traceback
.
print_exc
()
traceback
.
print_exc
()
xFrame
.
initialize
(
xPeer
)
xFrame
.
initialize
(
xPeer
)
...
@@ -187,7 +185,7 @@ class OfficeDocument(object):
...
@@ -187,7 +185,7 @@ class OfficeDocument(object):
try
:
try
:
xComponent
=
xInterface
.
loadComponentFromURL
(
xComponent
=
xInterface
.
loadComponentFromURL
(
sURL
,
sFrame
,
0
,
tuple
(
xValues
))
sURL
,
sFrame
,
0
,
tuple
(
xValues
))
except
Exception
,
exception
:
except
Exception
:
traceback
.
print_exc
()
traceback
.
print_exc
()
return
xComponent
return
xComponent
...
@@ -223,9 +221,8 @@ class OfficeDocument(object):
...
@@ -223,9 +221,8 @@ class OfficeDocument(object):
return
True
return
True
except
ErrorCodeIOException
:
except
ErrorCodeIOException
:
return
True
return
True
#There's a bug here, fix later
pass
pass
except
Exception
,
exception
:
except
Exception
:
traceback
.
print_exc
()
traceback
.
print_exc
()
return
False
return
False
...
@@ -235,8 +232,8 @@ class OfficeDocument(object):
...
@@ -235,8 +232,8 @@ class OfficeDocument(object):
try
:
try
:
xComponent
.
close
(
True
)
xComponent
.
close
(
True
)
bState
=
True
bState
=
True
except
com
.
sun
.
star
.
util
.
CloseVetoException
,
exCloseVeto
:
except
com
.
sun
.
star
.
util
.
CloseVetoException
:
print
"could not close doc"
print
(
"could not close doc"
)
bState
=
False
bState
=
False
else
:
else
:
...
@@ -256,7 +253,7 @@ class OfficeDocument(object):
...
@@ -256,7 +253,7 @@ class OfficeDocument(object):
(
rowcount
+
ypos
)
-
1
)
(
rowcount
+
ypos
)
-
1
)
xNewRange
.
setDataArray
(
datalist
)
xNewRange
.
setDataArray
(
datalist
)
except
Exception
,
e
:
except
Exception
:
traceback
.
print_exc
()
traceback
.
print_exc
()
@classmethod
@classmethod
...
...
wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py
Dosyayı görüntüle @
34fbbe1a
...
@@ -134,7 +134,7 @@ class FaxWizardDialogImpl(FaxWizardDialog):
...
@@ -134,7 +134,7 @@ class FaxWizardDialogImpl(FaxWizardDialog):
self
.
removeTerminateListener
()
self
.
removeTerminateListener
()
self
.
closeDocument
()
self
.
closeDocument
()
self
.
running
=
False
self
.
running
=
False
except
Exception
,
exception
:
except
Exception
:
self
.
removeTerminateListener
()
self
.
removeTerminateListener
()
traceback
.
print_exc
()
traceback
.
print_exc
()
self
.
running
=
False
self
.
running
=
False
...
@@ -213,7 +213,7 @@ class FaxWizardDialogImpl(FaxWizardDialog):
...
@@ -213,7 +213,7 @@ class FaxWizardDialogImpl(FaxWizardDialog):
pass
pass
#TODO: Error Handling
#TODO: Error Handling
except
Exception
,
e
:
except
Exception
:
traceback
.
print_exc
()
traceback
.
print_exc
()
finally
:
finally
:
if
endWizard
:
if
endWizard
:
...
@@ -225,7 +225,7 @@ class FaxWizardDialogImpl(FaxWizardDialog):
...
@@ -225,7 +225,7 @@ class FaxWizardDialogImpl(FaxWizardDialog):
def
closeDocument
(
self
):
def
closeDocument
(
self
):
try
:
try
:
self
.
myFaxDoc
.
xFrame
.
close
(
False
)
self
.
myFaxDoc
.
xFrame
.
close
(
False
)
except
CloseVetoException
,
e
:
except
CloseVetoException
:
traceback
.
print_exc
()
traceback
.
print_exc
()
def
drawConstants
(
self
):
def
drawConstants
(
self
):
...
@@ -265,9 +265,7 @@ class FaxWizardDialogImpl(FaxWizardDialog):
...
@@ -265,9 +265,7 @@ class FaxWizardDialogImpl(FaxWizardDialog):
"Template"
,
"share"
,
"/wizard"
)
"Template"
,
"share"
,
"/wizard"
)
self
.
UserTemplatePath
=
FileAccess
.
getOfficePath2
(
self
.
xMSF
,
self
.
UserTemplatePath
=
FileAccess
.
getOfficePath2
(
self
.
xMSF
,
"Template"
,
"user"
,
""
)
"Template"
,
"user"
,
""
)
self
.
sBitmapPath
=
FileAccess
.
combinePaths
(
self
.
xMSF
,
except
NoValidPathException
:
self
.
sTemplatePath
,
"/../wizard/bitmap"
)
except
NoValidPathException
,
e
:
traceback
.
print_exc
()
traceback
.
print_exc
()
def
initializeTemplates
(
self
,
xMSF
):
def
initializeTemplates
(
self
,
xMSF
):
...
@@ -287,7 +285,7 @@ class FaxWizardDialogImpl(FaxWizardDialog):
...
@@ -287,7 +285,7 @@ class FaxWizardDialogImpl(FaxWizardDialog):
self
.
setControlProperty
(
"lstBusinessStyle"
,
"SelectedItems"
,
(
0
,))
self
.
setControlProperty
(
"lstBusinessStyle"
,
"SelectedItems"
,
(
0
,))
self
.
setControlProperty
(
"lstPrivateStyle"
,
"SelectedItems"
,
(
0
,))
self
.
setControlProperty
(
"lstPrivateStyle"
,
"SelectedItems"
,
(
0
,))
return
True
return
True
except
NoValidPathException
,
e
:
except
NoValidPathException
:
traceback
.
print_exc
()
traceback
.
print_exc
()
return
False
return
False
...
@@ -395,7 +393,7 @@ class FaxWizardDialogImpl(FaxWizardDialog):
...
@@ -395,7 +393,7 @@ class FaxWizardDialogImpl(FaxWizardDialog):
"cp_TemplateName"
,
self
.
txtTemplateName
,
True
)
.
updateUI
()
"cp_TemplateName"
,
self
.
txtTemplateName
,
True
)
.
updateUI
()
UnoDataAware
.
attachEditControl
(
cgl
,
"cp_TemplatePath"
,
UnoDataAware
.
attachEditControl
(
cgl
,
"cp_TemplatePath"
,
self
.
myPathSelection
.
xSaveTextBox
,
True
)
.
updateUI
()
self
.
myPathSelection
.
xSaveTextBox
,
True
)
.
updateUI
()
except
Exception
,
exception
:
except
Exception
:
traceback
.
print_exc
()
traceback
.
print_exc
()
def
saveConfiguration
(
self
):
def
saveConfiguration
(
self
):
...
@@ -404,7 +402,7 @@ class FaxWizardDialogImpl(FaxWizardDialog):
...
@@ -404,7 +402,7 @@ class FaxWizardDialogImpl(FaxWizardDialog):
"/org.openoffice.Office.Writer/Wizards/Fax"
,
True
)
"/org.openoffice.Office.Writer/Wizards/Fax"
,
True
)
self
.
myConfig
.
writeConfiguration
(
root
,
"cp_"
)
self
.
myConfig
.
writeConfiguration
(
root
,
"cp_"
)
root
.
commitChanges
()
root
.
commitChanges
()
except
Exception
,
e
:
except
Exception
:
traceback
.
print_exc
()
traceback
.
print_exc
()
def
setConfiguration
(
self
):
def
setConfiguration
(
self
):
...
@@ -617,7 +615,7 @@ class FaxWizardDialogImpl(FaxWizardDialog):
...
@@ -617,7 +615,7 @@ class FaxWizardDialogImpl(FaxWizardDialog):
FaxWizardDialogImpl
.
RM_FOOTER
)
FaxWizardDialogImpl
.
RM_FOOTER
)
Helper
.
setUnoPropertyValue
(
BPaperItem
,
Helper
.
setUnoPropertyValue
(
BPaperItem
,
PropertyNames
.
PROPERTY_ENABLED
,
bFooterPossible
)
PropertyNames
.
PROPERTY_ENABLED
,
bFooterPossible
)
except
Exception
,
exception
:
except
Exception
:
traceback
.
print_exc
()
traceback
.
print_exc
()
def
chkFooterNextPagesItemChanged
(
self
):
def
chkFooterNextPagesItemChanged
(
self
):
...
...
wizards/com/sun/star/wizards/text/TextDocument.py
Dosyayı görüntüle @
34fbbe1a
...
@@ -95,7 +95,7 @@ class TextDocument(object):
...
@@ -95,7 +95,7 @@ class TextDocument(object):
"private:object"
,
"_blank"
,
0
,
loadArgs
)
"private:object"
,
"_blank"
,
0
,
loadArgs
)
# remember some things for later usage
# remember some things for later usage
self
.
xFrame
=
self
.
xTextDocument
.
CurrentController
.
Frame
self
.
xFrame
=
self
.
xTextDocument
.
CurrentController
.
Frame
except
Exception
,
e
:
except
Exception
:
traceback
.
print_exc
()
traceback
.
print_exc
()
elif
_textDocument
is
not
None
:
elif
_textDocument
is
not
None
:
...
@@ -148,7 +148,7 @@ class TextDocument(object):
...
@@ -148,7 +148,7 @@ class TextDocument(object):
try
:
try
:
myViewHandler
.
setViewSetting
(
myViewHandler
.
setViewSetting
(
"ZoomType"
,
ENTIRE_PAGE
)
"ZoomType"
,
ENTIRE_PAGE
)
except
Exception
,
e
:
except
Exception
:
traceback
.
print_exc
()
traceback
.
print_exc
()
myFieldHandler
=
TextFieldHandler
(
self
.
xMSF
,
self
.
xTextDocument
)
myFieldHandler
=
TextFieldHandler
(
self
.
xMSF
,
self
.
xTextDocument
)
myFieldHandler
.
updateDocInfoFields
()
myFieldHandler
.
updateDocInfoFields
()
...
@@ -160,7 +160,7 @@ class TextDocument(object):
...
@@ -160,7 +160,7 @@ class TextDocument(object):
xPageStyleCollection
=
xNameAccess
.
getByName
(
"PageStyles"
)
xPageStyleCollection
=
xNameAccess
.
getByName
(
"PageStyles"
)
xPageStyle
=
xPageStyleCollection
.
getByName
(
"First Page"
)
xPageStyle
=
xPageStyleCollection
.
getByName
(
"First Page"
)
return
Helper
.
getUnoPropertyValue
(
xPageStyle
,
"Size"
)
return
Helper
.
getUnoPropertyValue
(
xPageStyle
,
"Size"
)
except
Exception
,
exception
:
except
Exception
:
traceback
.
print_exc
()
traceback
.
print_exc
()
return
None
return
None
...
@@ -207,14 +207,7 @@ class TextDocument(object):
...
@@ -207,14 +207,7 @@ class TextDocument(object):
description
=
description
.
replace
(
"<wizard_name>"
,
WizardName
)
description
=
description
.
replace
(
"<wizard_name>"
,
WizardName
)
description
=
description
.
replace
(
"<current_date>"
,
myDate
)
description
=
description
.
replace
(
"<current_date>"
,
myDate
)
xDocProps2
.
Description
=
description
xDocProps2
.
Description
=
description
except
NoSuchElementException
,
e
:
except
Exception
:
# TODO Auto-generated catch block
traceback
.
print_exc
()
except
WrappedTargetException
,
e
:
# TODO Auto-generated catch block
traceback
.
print_exc
()
except
Exception
,
e
:
# TODO Auto-generated catch block
traceback
.
print_exc
()
traceback
.
print_exc
()
'''
'''
...
...
wizards/com/sun/star/wizards/text/TextFieldHandler.py
Dosyayı görüntüle @
34fbbe1a
...
@@ -30,12 +30,12 @@ class TextFieldHandler(object):
...
@@ -30,12 +30,12 @@ class TextFieldHandler(object):
'''
'''
xTextFieldsSupplierAux
=
None
xTextFieldsSupplierAux
=
None
arrayTextFields
=
None
dictTextFields
=
None
def
__init__
(
self
,
xMSF
,
xTextDocument
):
def
__init__
(
self
,
xMSF
,
xTextDocument
):
self
.
xMSFDoc
=
xMSF
self
.
xMSFDoc
=
xMSF
self
.
xTextFieldsSupplier
=
xTextDocument
self
.
xTextFieldsSupplier
=
xTextDocument
self
.
arrayTextFields
=
{}
self
.
dictTextFields
=
[]
if
TextFieldHandler
.
xTextFieldsSupplierAux
is
not
\
if
TextFieldHandler
.
xTextFieldsSupplierAux
is
not
\
self
.
xTextFieldsSupplier
:
self
.
xTextFieldsSupplier
:
self
.
__getTextFields
()
self
.
__getTextFields
()
...
@@ -56,7 +56,7 @@ class TextFieldHandler(object):
...
@@ -56,7 +56,7 @@ class TextFieldHandler(object):
UserFieldContent
=
xMaster
.
getPropertyValue
(
"Content"
)
UserFieldContent
=
xMaster
.
getPropertyValue
(
"Content"
)
return
UserFieldContent
return
UserFieldContent
except
Exception
,
exception
:
except
Exception
:
traceback
.
print_exc
()
traceback
.
print_exc
()
return
""
return
""
...
@@ -76,7 +76,7 @@ class TextFieldHandler(object):
...
@@ -76,7 +76,7 @@ class TextFieldHandler(object):
xField
.
attachTextFieldMaster
(
xPSet
)
xField
.
attachTextFieldMaster
(
xPSet
)
xTextCursor
.
getText
()
.
insertTextContent
(
xTextCursor
.
getText
()
.
insertTextContent
(
xTextCursor
,
xField
,
False
)
xTextCursor
,
xField
,
False
)
except
com
.
sun
.
star
.
uno
.
Exception
,
e
xception
:
except
E
xception
:
traceback
.
print_exc
()
traceback
.
print_exc
()
def
createUserField
(
self
,
FieldName
,
FieldTitle
):
def
createUserField
(
self
,
FieldName
,
FieldTitle
):
...
@@ -89,25 +89,22 @@ class TextFieldHandler(object):
...
@@ -89,25 +89,22 @@ class TextFieldHandler(object):
def
__getTextFields
(
self
):
def
__getTextFields
(
self
):
try
:
try
:
if
self
.
xTextFieldsSupplier
.
TextFields
.
hasElements
():
if
self
.
xTextFieldsSupplier
.
TextFields
.
hasElements
():
TextFieldHandler
.
dictTextFields
=
{}
TextFieldHandler
.
arrayTextFields
=
[]
xEnum
=
\
xEnum
=
\
self
.
xTextFieldsSupplier
.
TextFields
.
createEnumeration
()
self
.
xTextFieldsSupplier
.
TextFields
.
createEnumeration
()
while
xEnum
.
hasMoreElements
():
while
xEnum
.
hasMoreElements
():
oTextField
=
xEnum
.
nextElement
()
oTextField
=
xEnum
.
nextElement
()
TextFieldHandler
.
arrayTextFields
.
append
(
oTextField
)
self
.
arrayTextFields
.
append
(
oTextField
)
xPropertySet
=
oTextField
.
TextFieldMaster
xPropertySet
=
oTextField
.
TextFieldMaster
if
xPropertySet
.
Name
:
if
xPropertySet
.
Name
:
TextFieldHandler
.
dictTextFields
[
xPropertySet
.
Name
]
=
\
self
.
dictTextFields
[
xPropertySet
.
Name
]
=
\
oTextField
oTextField
except
Exception
,
e
:
except
Exception
:
#TODO Auto-generated catch block
traceback
.
print_exc
()
traceback
.
print_exc
()
def
__getTextFieldsByProperty
(
def
__getTextFieldsByProperty
(
self
,
_PropertyName
,
_aPropertyValue
):
self
,
_PropertyName
,
_aPropertyValue
):
try
:
try
:
xProperty
=
TextFieldHandler
.
dictTextFields
[
_aPropertyValue
]
xProperty
=
self
.
dictTextFields
[
_aPropertyValue
]
xPropertySet
=
xProperty
.
TextFieldMaster
xPropertySet
=
xProperty
.
TextFieldMaster
if
xPropertySet
.
PropertySetInfo
.
hasPropertyByName
(
if
xPropertySet
.
PropertySetInfo
.
hasPropertyByName
(
_PropertyName
):
_PropertyName
):
...
@@ -117,7 +114,7 @@ class TextFieldHandler(object):
...
@@ -117,7 +114,7 @@ class TextFieldHandler(object):
if
sValue
==
_aPropertyValue
:
if
sValue
==
_aPropertyValue
:
return
xProperty
return
xProperty
return
None
return
None
except
KeyError
,
e
:
except
KeyError
:
return
None
return
None
def
changeUserFieldContent
(
self
,
_FieldName
,
_FieldContent
):
def
changeUserFieldContent
(
self
,
_FieldName
,
_FieldContent
):
...
@@ -129,7 +126,7 @@ class TextFieldHandler(object):
...
@@ -129,7 +126,7 @@ class TextFieldHandler(object):
def
updateDocInfoFields
(
self
):
def
updateDocInfoFields
(
self
):
try
:
try
:
for
i
in
TextFieldHandler
.
arrayTextFields
:
for
i
in
self
.
arrayTextFields
:
if
i
.
supportsService
(
if
i
.
supportsService
(
"com.sun.star.text.TextField.ExtendedUser"
):
"com.sun.star.text.TextField.ExtendedUser"
):
i
.
update
()
i
.
update
()
...
@@ -138,7 +135,7 @@ class TextFieldHandler(object):
...
@@ -138,7 +135,7 @@ class TextFieldHandler(object):
"com.sun.star.text.TextField.User"
):
"com.sun.star.text.TextField.User"
):
i
.
update
()
i
.
update
()
except
Exception
,
e
:
except
Exception
:
traceback
.
print_exc
()
traceback
.
print_exc
()
def
updateDateFields
(
self
):
def
updateDateFields
(
self
):
...
@@ -149,23 +146,23 @@ class TextFieldHandler(object):
...
@@ -149,23 +146,23 @@ class TextFieldHandler(object):
dt
.
Year
=
time
.
strftime
(
"
%
Y"
,
now
)
dt
.
Year
=
time
.
strftime
(
"
%
Y"
,
now
)
dt
.
Month
=
time
.
strftime
(
"
%
m"
,
now
)
dt
.
Month
=
time
.
strftime
(
"
%
m"
,
now
)
dt
.
Month
+=
1
dt
.
Month
+=
1
for
i
in
TextFieldHandler
.
arrayTextFields
:
for
i
in
self
.
arrayTextFields
:
if
i
.
supportsService
(
if
i
.
supportsService
(
"com.sun.star.text.TextField.DateTime"
):
"com.sun.star.text.TextField.DateTime"
):
i
.
setPropertyValue
(
"IsFixed"
,
False
)
i
.
setPropertyValue
(
"IsFixed"
,
False
)
i
.
setPropertyValue
(
"DateTimeValue"
,
dt
)
i
.
setPropertyValue
(
"DateTimeValue"
,
dt
)
except
Exception
,
e
:
except
Exception
:
traceback
.
print_exc
()
traceback
.
print_exc
()
def
fixDateFields
(
self
,
_bSetFixed
):
def
fixDateFields
(
self
,
_bSetFixed
):
try
:
try
:
for
i
in
TextFieldHandler
.
arrayTextFields
:
for
i
in
self
.
arrayTextFields
:
if
i
.
supportsService
(
if
i
.
supportsService
(
"com.sun.star.text.TextField.DateTime"
):
"com.sun.star.text.TextField.DateTime"
):
i
.
setPropertyValue
(
"IsFixed"
,
_bSetFixed
)
i
.
setPropertyValue
(
"IsFixed"
,
_bSetFixed
)
except
Exception
,
e
:
except
Exception
:
traceback
.
print_exc
()
traceback
.
print_exc
()
def
removeUserFieldByContent
(
self
,
_FieldContent
):
def
removeUserFieldByContent
(
self
,
_FieldContent
):
...
@@ -178,5 +175,5 @@ class TextFieldHandler(object):
...
@@ -178,5 +175,5 @@ class TextFieldHandler(object):
xDependentTextFields
[
i
]
.
dispose
()
xDependentTextFields
[
i
]
.
dispose
()
i
+=
1
i
+=
1
except
Exception
,
e
:
except
Exception
:
traceback
.
print_exc
()
traceback
.
print_exc
()
wizards/com/sun/star/wizards/text/TextSectionHandler.py
Dosyayı görüntüle @
34fbbe1a
...
@@ -35,7 +35,7 @@ class TextSectionHandler(object):
...
@@ -35,7 +35,7 @@ class TextSectionHandler(object):
self
.
removeTextSection
(
oTextSection
)
self
.
removeTextSection
(
oTextSection
)
except
Exception
,
exception
:
except
Exception
:
traceback
.
print_exc
()
traceback
.
print_exc
()
def
hasTextSectionByName
(
self
,
SectionName
):
def
hasTextSectionByName
(
self
,
SectionName
):
...
@@ -48,13 +48,13 @@ class TextSectionHandler(object):
...
@@ -48,13 +48,13 @@ class TextSectionHandler(object):
oTextSection
=
xAllTextSections
.
getByIndex
(
oTextSection
=
xAllTextSections
.
getByIndex
(
xAllTextSections
.
getCount
()
-
1
)
xAllTextSections
.
getCount
()
-
1
)
self
.
removeTextSection
(
oTextSection
)
self
.
removeTextSection
(
oTextSection
)
except
Exception
,
exception
:
except
Exception
:
traceback
.
print_exc
()
traceback
.
print_exc
()
def
removeTextSection
(
self
,
_oTextSection
):
def
removeTextSection
(
self
,
_oTextSection
):
try
:
try
:
self
.
xText
.
removeTextContent
(
_oTextSection
)
self
.
xText
.
removeTextContent
(
_oTextSection
)
except
Exception
,
exception
:
except
Exception
:
traceback
.
print_exc
()
traceback
.
print_exc
()
def
removeInvisibleTextSections
(
self
):
def
removeInvisibleTextSections
(
self
):
...
@@ -68,7 +68,7 @@ class TextSectionHandler(object):
...
@@ -68,7 +68,7 @@ class TextSectionHandler(object):
self
.
xText
.
removeTextContent
(
xTextContentTextSection
)
self
.
xText
.
removeTextContent
(
xTextContentTextSection
)
i
-=
1
i
-=
1
except
Exception
,
exception
:
except
Exception
:
traceback
.
print_exc
()
traceback
.
print_exc
()
def
removeAllTextSections
(
self
):
def
removeAllTextSections
(
self
):
...
@@ -78,7 +78,7 @@ class TextSectionHandler(object):
...
@@ -78,7 +78,7 @@ class TextSectionHandler(object):
for
i
in
xrange
(
TextSectionCount
-
1
,
-
1
,
-
1
):
for
i
in
xrange
(
TextSectionCount
-
1
,
-
1
,
-
1
):
xTextContentTextSection
=
xAllTextSections
.
getByIndex
(
i
)
xTextContentTextSection
=
xAllTextSections
.
getByIndex
(
i
)
self
.
xText
.
removeTextContent
(
xTextContentTextSection
)
self
.
xText
.
removeTextContent
(
xTextContentTextSection
)
except
Exception
,
exception
:
except
Exception
:
traceback
.
print_exc
()
traceback
.
print_exc
()
def
breakLinkOfTextSection
(
self
,
oTextSection
):
def
breakLinkOfTextSection
(
self
,
oTextSection
):
...
@@ -120,7 +120,7 @@ class TextSectionHandler(object):
...
@@ -120,7 +120,7 @@ class TextSectionHandler(object):
xSecondTextCursor
=
self
.
xText
.
createTextCursor
()
xSecondTextCursor
=
self
.
xText
.
createTextCursor
()
xSecondTextCursor
.
gotoEnd
(
False
)
xSecondTextCursor
.
gotoEnd
(
False
)
insertTextSection
(
GroupName
,
TemplateName
,
xSecondTextCursor
)
insertTextSection
(
GroupName
,
TemplateName
,
xSecondTextCursor
)
except
IllegalArgumentException
,
e
:
except
IllegalArgumentException
:
traceback
.
print_exc
()
traceback
.
print_exc
()
def
insertTextSection
(
self
,
sectionName
,
templateName
,
position
):
def
insertTextSection
(
self
,
sectionName
,
templateName
,
position
):
...
@@ -135,6 +135,6 @@ class TextSectionHandler(object):
...
@@ -135,6 +135,6 @@ class TextSectionHandler(object):
position
,
xTextSection
,
False
)
position
,
xTextSection
,
False
)
linkSectiontoTemplate
(
xTextSection
,
templateName
,
sectionName
)
linkSectiontoTemplate
(
xTextSection
,
templateName
,
sectionName
)
except
Exception
,
exception
:
except
Exception
:
traceback
.
print_exc
()
traceback
.
print_exc
()
wizards/com/sun/star/wizards/text/ViewHandler.py
Dosyayı görüntüle @
34fbbe1a
...
@@ -41,10 +41,10 @@ class ViewHandler(object):
...
@@ -41,10 +41,10 @@ class ViewHandler(object):
xViewTextCursor
.
gotoRange
(
xHeaderRange
,
False
)
xViewTextCursor
.
gotoRange
(
xHeaderRange
,
False
)
xViewTextCursor
.
collapseToStart
()
xViewTextCursor
.
collapseToStart
()
else
:
else
:
print
"No Headertext available"
print
(
"No Headertext available"
)
except
com
.
sun
.
star
.
uno
.
Exception
,
e
xception
:
except
E
xception
:
exception
.
printStackTrace
(
System
.
out
)
traceback
.
print_exc
(
)
def
setViewSetting
(
self
,
Setting
,
Value
):
def
setViewSetting
(
self
,
Setting
,
Value
):
self
.
xTextViewCursorSupplier
.
ViewSettings
.
setPropertyValue
(
Setting
,
Value
)
self
.
xTextViewCursorSupplier
.
ViewSettings
.
setPropertyValue
(
Setting
,
Value
)
...
...
wizards/com/sun/star/wizards/ui/PathSelection.py
Dosyayı görüntüle @
34fbbe1a
...
@@ -99,7 +99,7 @@ class PathSelection(object):
...
@@ -99,7 +99,7 @@ class PathSelection(object):
myFA
.
getPath
(
self
.
sDefaultDirectory
+
\
myFA
.
getPath
(
self
.
sDefaultDirectory
+
\
"/"
+
\
"/"
+
\
self
.
sDefaultName
,
None
))
self
.
sDefaultName
,
None
))
except
Exception
,
e
:
except
Exception
:
traceback
.
print_exc
()
traceback
.
print_exc
()
def
triggerPathPicker
(
self
):
def
triggerPathPicker
(
self
):
...
@@ -130,7 +130,7 @@ class PathSelection(object):
...
@@ -130,7 +130,7 @@ class PathSelection(object):
elif
iDialogType
==
DialogTypes
.
FILE
:
elif
iDialogType
==
DialogTypes
.
FILE
:
#TODO: write code for picking a file for loading
#TODO: write code for picking a file for loading
return
return
except
Exception
,
e
:
except
Exception
:
traceback
.
print_exc
()
traceback
.
print_exc
()
def
callXPathSelectionListener
(
self
):
def
callXPathSelectionListener
(
self
):
...
...
wizards/com/sun/star/wizards/ui/UnoDialog.py
Dosyayı görüntüle @
34fbbe1a
...
@@ -40,21 +40,9 @@ class UnoDialog(object):
...
@@ -40,21 +40,9 @@ class UnoDialog(object):
self
.
xUnoDialog
.
setModel
(
self
.
xDialogModel
)
self
.
xUnoDialog
.
setModel
(
self
.
xDialogModel
)
self
.
m_oPeerConfig
=
None
self
.
m_oPeerConfig
=
None
self
.
xWindowPeer
=
None
self
.
xWindowPeer
=
None
except
Exception
,
e
:
except
Exception
:
traceback
.
print_exc
()
traceback
.
print_exc
()
def
getControlKey
(
self
,
EventObject
,
ControlList
):
xControlModel
=
EventObject
.
getModel
()
try
:
sName
=
xControlModel
.
getPropertyValue
(
PropertyNames
.
PROPERTY_NAME
)
iKey
=
ControlList
.
get
(
sName
)
.
intValue
()
except
com
.
sun
.
star
.
uno
.
Exception
,
exception
:
traceback
.
print_exc
()
iKey
=
2000
return
iKey
def
getPeerConfiguration
(
self
):
def
getPeerConfiguration
(
self
):
if
self
.
m_oPeerConfig
is
None
:
if
self
.
m_oPeerConfig
is
None
:
self
.
m_oPeerConfig
=
PeerConfig
(
self
)
self
.
m_oPeerConfig
=
PeerConfig
(
self
)
...
@@ -68,7 +56,7 @@ class UnoDialog(object):
...
@@ -68,7 +56,7 @@ class UnoDialog(object):
xPSet
=
self
.
xDialogModel
.
getByName
(
ControlName
)
xPSet
=
self
.
xDialogModel
.
getByName
(
ControlName
)
setattr
(
xPSet
,
PropertyName
,
PropertyValue
)
setattr
(
xPSet
,
PropertyName
,
PropertyValue
)
except
Exception
,
exception
:
except
Exception
:
traceback
.
print_exc
()
traceback
.
print_exc
()
def
setControlProperties
(
def
setControlProperties
(
...
@@ -79,7 +67,7 @@ class UnoDialog(object):
...
@@ -79,7 +67,7 @@ class UnoDialog(object):
try
:
try
:
xPSet
=
self
.
xDialogModel
.
getByName
(
ControlName
)
xPSet
=
self
.
xDialogModel
.
getByName
(
ControlName
)
return
xPSet
.
getPropertyValue
(
PropertyName
)
return
xPSet
.
getPropertyValue
(
PropertyName
)
except
Exception
,
exception
:
except
Exception
:
traceback
.
print_exc
()
traceback
.
print_exc
()
return
None
return
None
...
@@ -92,7 +80,7 @@ class UnoDialog(object):
...
@@ -92,7 +80,7 @@ class UnoDialog(object):
while
i
<
allProps
.
length
:
while
i
<
allProps
.
length
:
sName
=
allProps
[
i
]
.
Name
sName
=
allProps
[
i
]
.
Name
i
+=
1
i
+=
1
except
Exception
,
exception
:
except
Exception
:
traceback
.
print_exc
()
traceback
.
print_exc
()
def
getMAPConversionFactor
(
self
,
ControlName
):
def
getMAPConversionFactor
(
self
,
ControlName
):
...
@@ -168,7 +156,7 @@ class UnoDialog(object):
...
@@ -168,7 +156,7 @@ class UnoDialog(object):
controlname
,
PropertyNames
.
PROPERTY_STEP
,
controlname
,
PropertyNames
.
PROPERTY_STEP
,
UIConsts
.
INVISIBLESTEP
)
UIConsts
.
INVISIBLESTEP
)
except
com
.
sun
.
star
.
uno
.
Exception
,
e
xception
:
except
E
xception
:
traceback
.
print_exc
()
traceback
.
print_exc
()
# repaints the currentDialogStep
# repaints the currentDialogStep
...
@@ -181,7 +169,7 @@ class UnoDialog(object):
...
@@ -181,7 +169,7 @@ class UnoDialog(object):
self
.
xDialogModel
,
PropertyNames
.
PROPERTY_STEP
,
99
)
self
.
xDialogModel
,
PropertyNames
.
PROPERTY_STEP
,
99
)
Helper
.
setUnoPropertyValue
(
Helper
.
setUnoPropertyValue
(
self
.
xDialogModel
,
PropertyNames
.
PROPERTY_STEP
,
ncurstep
)
self
.
xDialogModel
,
PropertyNames
.
PROPERTY_STEP
,
ncurstep
)
except
com
.
sun
.
star
.
uno
.
Exception
,
e
xception
:
except
E
xception
:
traceback
.
print_exc
()
traceback
.
print_exc
()
def
insertControlModel
(
def
insertControlModel
(
...
@@ -193,7 +181,7 @@ class UnoDialog(object):
...
@@ -193,7 +181,7 @@ class UnoDialog(object):
self
.
xDialogModel
.
insertByName
(
componentName
,
xControlModel
)
self
.
xDialogModel
.
insertByName
(
componentName
,
xControlModel
)
Helper
.
setUnoPropertyValue
(
xControlModel
,
Helper
.
setUnoPropertyValue
(
xControlModel
,
PropertyNames
.
PROPERTY_NAME
,
componentName
)
PropertyNames
.
PROPERTY_NAME
,
componentName
)
except
Exception
,
ex
:
except
Exception
:
traceback
.
print_exc
()
traceback
.
print_exc
()
aObj
=
self
.
xUnoDialog
.
getControl
(
componentName
)
aObj
=
self
.
xUnoDialog
.
getControl
(
componentName
)
...
@@ -203,17 +191,6 @@ class UnoDialog(object):
...
@@ -203,17 +191,6 @@ class UnoDialog(object):
oFocusControl
=
self
.
xUnoDialog
.
getControl
(
ControlName
)
oFocusControl
=
self
.
xUnoDialog
.
getControl
(
ControlName
)
oFocusControl
.
setFocus
()
oFocusControl
.
setFocus
()
def
combineListboxList
(
self
,
sFirstEntry
,
MainList
):
try
:
FirstList
=
[
sFirstEntry
]
ResultList
=
[
MainList
.
length
+
1
]
System
.
arraycopy
(
FirstList
,
0
,
ResultList
,
0
,
1
)
System
.
arraycopy
(
MainList
,
0
,
ResultList
,
1
,
len
(
MainList
))
return
ResultList
except
java
.
lang
.
Exception
,
jexception
:
traceback
.
print_exc
()
return
None
def
selectListBoxItem
(
self
,
xListBox
,
iFieldsSelIndex
):
def
selectListBoxItem
(
self
,
xListBox
,
iFieldsSelIndex
):
if
iFieldsSelIndex
>
-
1
:
if
iFieldsSelIndex
>
-
1
:
FieldCount
=
xListBox
.
getItemCount
()
FieldCount
=
xListBox
.
getItemCount
()
...
...
wizards/com/sun/star/wizards/ui/WizardDialog.py
Dosyayı görüntüle @
34fbbe1a
...
@@ -77,7 +77,7 @@ class WizardDialog(UnoDialog2):
...
@@ -77,7 +77,7 @@ class WizardDialog(UnoDialog2):
if
self
.
nNewStep
!=
self
.
nOldStep
:
if
self
.
nNewStep
!=
self
.
nOldStep
:
self
.
switchToStep
()
self
.
switchToStep
()
except
IllegalArgumentException
,
exception
:
except
IllegalArgumentException
:
traceback
.
print_exc
()
traceback
.
print_exc
()
def
setRoadmapInteractive
(
self
,
_bInteractive
):
def
setRoadmapInteractive
(
self
,
_bInteractive
):
...
@@ -89,7 +89,7 @@ class WizardDialog(UnoDialog2):
...
@@ -89,7 +89,7 @@ class WizardDialog(UnoDialog2):
def
isRoadmapComplete
(
self
):
def
isRoadmapComplete
(
self
):
try
:
try
:
return
bool
(
Helper
.
getUnoPropertyValue
(
self
.
oRoadmap
,
"Complete"
))
return
bool
(
Helper
.
getUnoPropertyValue
(
self
.
oRoadmap
,
"Complete"
))
except
IllegalArgumentException
,
exception
:
except
IllegalArgumentException
:
traceback
.
print_exc
()
traceback
.
print_exc
()
return
False
return
False
...
@@ -103,7 +103,7 @@ class WizardDialog(UnoDialog2):
...
@@ -103,7 +103,7 @@ class WizardDialog(UnoDialog2):
try
:
try
:
return
int
(
Helper
.
getUnoPropertyValue
(
return
int
(
Helper
.
getUnoPropertyValue
(
self
.
oRoadmap
,
"CurrentItemID"
))
self
.
oRoadmap
,
"CurrentItemID"
))
except
Exception
,
exception
:
except
Exception
:
traceback
.
print_exc
()
traceback
.
print_exc
()
return
-
1
return
-
1
...
@@ -135,9 +135,9 @@ class WizardDialog(UnoDialog2):
...
@@ -135,9 +135,9 @@ class WizardDialog(UnoDialog2):
Helper
.
setUnoPropertyValue
(
Helper
.
setUnoPropertyValue
(
self
.
oRoadmap
,
"Text"
,
self
.
oRoadmap
,
"Text"
,
self
.
__oWizardResource
.
getResText
(
UIConsts
.
RID_COMMON
+
16
))
self
.
__oWizardResource
.
getResText
(
UIConsts
.
RID_COMMON
+
16
))
except
NoSuchMethodException
,
ex
:
except
NoSuchMethodException
:
Resource
.
showCommonResourceError
(
xMSF
)
Resource
.
showCommonResourceError
(
xMSF
)
except
Exception
,
jexception
:
except
Exception
:
traceback
.
print_exc
()
traceback
.
print_exc
()
def
setRMItemLabels
(
self
,
_oResource
,
StartResID
):
def
setRMItemLabels
(
self
,
_oResource
,
StartResID
):
...
@@ -155,7 +155,7 @@ class WizardDialog(UnoDialog2):
...
@@ -155,7 +155,7 @@ class WizardDialog(UnoDialog2):
PropertyNames
.
PROPERTY_ENABLED
,
_bEnabled
)
PropertyNames
.
PROPERTY_ENABLED
,
_bEnabled
)
Helper
.
setUnoPropertyValue
(
oRoadmapItem
,
"ID"
,
_CurItemID
)
Helper
.
setUnoPropertyValue
(
oRoadmapItem
,
"ID"
,
_CurItemID
)
self
.
oRoadmap
.
insertByIndex
(
Index
,
oRoadmapItem
)
self
.
oRoadmap
.
insertByIndex
(
Index
,
oRoadmapItem
)
except
Exception
,
exception
:
except
Exception
:
traceback
.
print_exc
()
traceback
.
print_exc
()
def
getRoadmapItemByID
(
self
,
_ID
):
def
getRoadmapItemByID
(
self
,
_ID
):
...
@@ -168,7 +168,7 @@ class WizardDialog(UnoDialog2):
...
@@ -168,7 +168,7 @@ class WizardDialog(UnoDialog2):
return
CurRoadmapItem
return
CurRoadmapItem
return
None
return
None
except
Exception
,
exception
:
except
Exception
:
traceback
.
print_exc
()
traceback
.
print_exc
()
return
None
return
None
...
@@ -303,7 +303,7 @@ class WizardDialog(UnoDialog2):
...
@@ -303,7 +303,7 @@ class WizardDialog(UnoDialog2):
uno
.
Any
(
"short"
,(
curtabindex
+
1
)),
uno
.
Any
(
"short"
,(
curtabindex
+
1
)),
iButtonWidth
),
self
)
iButtonWidth
),
self
)
self
.
setControlProperty
(
"btnWizardNext"
,
"DefaultButton"
,
True
)
self
.
setControlProperty
(
"btnWizardNext"
,
"DefaultButton"
,
True
)
except
Exception
,
exception
:
except
Exception
:
traceback
.
print_exc
()
traceback
.
print_exc
()
def
insertRoadMapItems
(
self
,
enabled
,
items
):
def
insertRoadMapItems
(
self
,
enabled
,
items
):
...
@@ -356,7 +356,7 @@ class WizardDialog(UnoDialog2):
...
@@ -356,7 +356,7 @@ class WizardDialog(UnoDialog2):
bIsEnabled
=
bool
(
Helper
.
getUnoPropertyValue
(
xRoadmapItem
,
bIsEnabled
=
bool
(
Helper
.
getUnoPropertyValue
(
xRoadmapItem
,
PropertyNames
.
PROPERTY_ENABLED
))
PropertyNames
.
PROPERTY_ENABLED
))
return
bIsEnabled
return
bIsEnabled
except
Exception
,
exception
:
except
Exception
:
traceback
.
print_exc
()
traceback
.
print_exc
()
return
False
return
False
...
@@ -374,7 +374,7 @@ class WizardDialog(UnoDialog2):
...
@@ -374,7 +374,7 @@ class WizardDialog(UnoDialog2):
if
(
self
.
nNewStep
==
0
):
if
(
self
.
nNewStep
==
0
):
self
.
nNewStep
=
self
.
nOldStep
self
.
nNewStep
=
self
.
nOldStep
self
.
switchToStep
()
self
.
switchToStep
()
except
Exception
,
e
:
except
Exception
:
traceback
.
print_exc
()
traceback
.
print_exc
()
#TODO discuss with rp
#TODO discuss with rp
...
@@ -394,7 +394,7 @@ class WizardDialog(UnoDialog2):
...
@@ -394,7 +394,7 @@ class WizardDialog(UnoDialog2):
self
.
nNewStep
=
self
.
getNextAvailableStep
()
self
.
nNewStep
=
self
.
getNextAvailableStep
()
if
self
.
nNewStep
>
-
1
:
if
self
.
nNewStep
>
-
1
:
self
.
switchToStep
()
self
.
switchToStep
()
except
Exception
,
e
:
except
Exception
:
traceback
.
print_exc
()
traceback
.
print_exc
()
@abstractmethod
@abstractmethod
...
@@ -415,7 +415,7 @@ class WizardDialog(UnoDialog2):
...
@@ -415,7 +415,7 @@ class WizardDialog(UnoDialog2):
if
success
:
if
success
:
self
.
removeTerminateListener
()
self
.
removeTerminateListener
()
except
Exception
,
e
:
except
Exception
:
traceback
.
print_exc
()
traceback
.
print_exc
()
def
getMaximalStep
(
self
):
def
getMaximalStep
(
self
):
...
@@ -425,7 +425,7 @@ class WizardDialog(UnoDialog2):
...
@@ -425,7 +425,7 @@ class WizardDialog(UnoDialog2):
try
:
try
:
return
int
(
Helper
.
getUnoPropertyValue
(
self
.
xDialogModel
,
return
int
(
Helper
.
getUnoPropertyValue
(
self
.
xDialogModel
,
PropertyNames
.
PROPERTY_STEP
))
PropertyNames
.
PROPERTY_STEP
))
except
Exception
,
exception
:
except
Exception
:
traceback
.
print_exc
()
traceback
.
print_exc
()
return
-
1
return
-
1
...
@@ -478,7 +478,7 @@ class WizardDialog(UnoDialog2):
...
@@ -478,7 +478,7 @@ class WizardDialog(UnoDialog2):
try
:
try
:
self
.
cancelWizard
()
self
.
cancelWizard
()
self
.
removeTerminateListener
()
self
.
removeTerminateListener
()
except
Exception
,
e
:
except
Exception
:
traceback
.
print_exc
()
traceback
.
print_exc
()
def
queryTermination
(
self
):
def
queryTermination
(
self
):
...
...
wizards/com/sun/star/wizards/ui/event/DataAware.py
Dosyayı görüntüle @
34fbbe1a
...
@@ -79,9 +79,8 @@ class DataAware(object):
...
@@ -79,9 +79,8 @@ class DataAware(object):
if
data
is
not
ui
:
if
data
is
not
ui
:
try
:
try
:
self
.
setToUI
(
data
)
self
.
setToUI
(
data
)
except
Exception
,
ex
:
except
Exception
:
traceback
.
print_exc
()
traceback
.
print_exc
()
#TODO tell user...
self
.
enableControls
(
data
)
self
.
enableControls
(
data
)
'''
'''
...
...
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