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