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
f835b7e3
Kaydet (Commit)
f835b7e3
authored
Kas 26, 2012
tarafından
Xisco Fauli
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
pyletter: adapt this wizard to python3.3
Change-Id: I6617478a335cf1b5b6b128f86148029dc7bd81af
üst
5b56643f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
15 deletions
+19
-15
LetterDocument.py
wizards/com/sun/star/wizards/letter/LetterDocument.py
+3
-0
LetterWizardDialogImpl.py
...rds/com/sun/star/wizards/letter/LetterWizardDialogImpl.py
+11
-11
LetterWizardDialogResources.py
...om/sun/star/wizards/letter/LetterWizardDialogResources.py
+3
-3
TextFieldHandler.py
wizards/com/sun/star/wizards/text/TextFieldHandler.py
+2
-1
No files found.
wizards/com/sun/star/wizards/letter/LetterDocument.py
Dosyayı görüntüle @
f835b7e3
...
@@ -32,6 +32,7 @@ from com.sun.star.text.TextContentAnchorType import AT_PAGE
...
@@ -32,6 +32,7 @@ from com.sun.star.text.TextContentAnchorType import AT_PAGE
from
com.sun.star.text.SizeType
import
FIX
from
com.sun.star.text.SizeType
import
FIX
from
com.sun.star.text.WrapTextMode
import
THROUGHT
from
com.sun.star.text.WrapTextMode
import
THROUGHT
from
com.sun.star.awt.FontWeight
import
BOLD
from
com.sun.star.awt.FontWeight
import
BOLD
from
com.sun.star.beans
import
UnknownPropertyException
class
LetterDocument
(
TextDocument
):
class
LetterDocument
(
TextDocument
):
...
@@ -272,5 +273,7 @@ class BusinessPaperObject(object):
...
@@ -272,5 +273,7 @@ class BusinessPaperObject(object):
try
:
try
:
self
.
xTextDocument
.
Text
.
removeTextContent
(
self
.
xTextDocument
.
Text
.
removeTextContent
(
self
.
xFrame
)
self
.
xFrame
)
except
UnknownPropertyException
:
pass
except
Exception
:
except
Exception
:
traceback
.
print_exc
()
traceback
.
print_exc
()
wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py
Dosyayı görüntüle @
f835b7e3
...
@@ -154,7 +154,7 @@ class LetterWizardDialogImpl(LetterWizardDialog):
...
@@ -154,7 +154,7 @@ class LetterWizardDialogImpl(LetterWizardDialog):
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
...
@@ -218,7 +218,7 @@ class LetterWizardDialogImpl(LetterWizardDialog):
...
@@ -218,7 +218,7 @@ class LetterWizardDialogImpl(LetterWizardDialog):
self
.
saveConfiguration
()
self
.
saveConfiguration
()
xIH
=
self
.
xMSF
.
createInstance
(
xIH
=
self
.
xMSF
.
createInstance
(
"com.sun.star.comp.uui.UUIInteractionHandler"
)
"com.sun.star.comp.uui.UUIInteractionHandler"
)
loadValues
=
range
(
4
)
loadValues
=
list
(
range
(
4
)
)
loadValues
[
0
]
=
uno
.
createUnoStruct
(
\
loadValues
[
0
]
=
uno
.
createUnoStruct
(
\
'com.sun.star.beans.PropertyValue'
)
'com.sun.star.beans.PropertyValue'
)
loadValues
[
0
]
.
Name
=
"AsTemplate"
loadValues
[
0
]
.
Name
=
"AsTemplate"
...
@@ -247,7 +247,7 @@ class LetterWizardDialogImpl(LetterWizardDialog):
...
@@ -247,7 +247,7 @@ class LetterWizardDialogImpl(LetterWizardDialog):
else
:
else
:
pass
pass
except
Exception
,
e
:
except
Exception
:
traceback
.
print_exc
()
traceback
.
print_exc
()
finally
:
finally
:
if
endWizard
:
if
endWizard
:
...
@@ -260,7 +260,7 @@ class LetterWizardDialogImpl(LetterWizardDialog):
...
@@ -260,7 +260,7 @@ class LetterWizardDialogImpl(LetterWizardDialog):
try
:
try
:
xCloseable
=
self
.
myLetterDoc
.
xFrame
xCloseable
=
self
.
myLetterDoc
.
xFrame
xCloseable
.
close
(
False
)
xCloseable
.
close
(
False
)
except
CloseVetoException
,
e
:
except
CloseVetoException
:
traceback
.
print_exc
()
traceback
.
print_exc
()
def
optBusinessLetterItemChanged
(
self
):
def
optBusinessLetterItemChanged
(
self
):
...
@@ -636,7 +636,7 @@ class LetterWizardDialogImpl(LetterWizardDialog):
...
@@ -636,7 +636,7 @@ class LetterWizardDialogImpl(LetterWizardDialog):
and
(
self
.
chkUseLogo
.
State
!=
0
)
and
(
self
.
chkUseLogo
.
State
!=
0
)
self
.
myLetterDoc
.
switchElement
(
self
.
myLetterDoc
.
switchElement
(
"Company Logo"
,
logostatus
)
"Company Logo"
,
logostatus
)
except
IllegalArgumentException
,
e
:
except
IllegalArgumentException
:
traceback
.
print_exc
()
traceback
.
print_exc
()
def
chkUseAddressReceiverItemChanged
(
self
):
def
chkUseAddressReceiverItemChanged
(
self
):
...
@@ -650,7 +650,7 @@ class LetterWizardDialogImpl(LetterWizardDialog):
...
@@ -650,7 +650,7 @@ class LetterWizardDialogImpl(LetterWizardDialog):
self
.
myLetterDoc
.
switchElement
(
self
.
myLetterDoc
.
switchElement
(
"Sender Address Repeated"
,
rstatus
)
"Sender Address Repeated"
,
rstatus
)
except
IllegalArgumentException
,
e
:
except
IllegalArgumentException
:
traceback
.
print_exc
()
traceback
.
print_exc
()
def
chkUseSignsItemChanged
(
self
):
def
chkUseSignsItemChanged
(
self
):
...
@@ -676,7 +676,7 @@ class LetterWizardDialogImpl(LetterWizardDialog):
...
@@ -676,7 +676,7 @@ class LetterWizardDialogImpl(LetterWizardDialog):
if
self
.
chkFooterNextPages
.
State
!=
0
:
if
self
.
chkFooterNextPages
.
State
!=
0
:
self
.
myLetterDoc
.
switchFooter
(
self
.
myLetterDoc
.
switchFooter
(
"First Page"
,
False
,
self
.
chkFooterPageNumbers
.
State
!=
0
,
"First Page"
,
False
,
self
.
chkFooterPageNumbers
.
State
!=
0
,
txtFooter
.
Text
)
self
.
txtFooter
.
Text
)
self
.
myLetterDoc
.
switchFooter
(
"Standard"
,
bFooterPossible
,
self
.
myLetterDoc
.
switchFooter
(
"Standard"
,
bFooterPossible
,
self
.
chkFooterPageNumbers
.
State
!=
0
,
self
.
txtFooter
.
Text
)
self
.
chkFooterPageNumbers
.
State
!=
0
,
self
.
txtFooter
.
Text
)
else
:
else
:
...
@@ -691,7 +691,7 @@ class LetterWizardDialogImpl(LetterWizardDialog):
...
@@ -691,7 +691,7 @@ class LetterWizardDialogImpl(LetterWizardDialog):
self
.
getRoadmapItemByID
(
LetterWizardDialogImpl
.
RM_FOOTER
)
self
.
getRoadmapItemByID
(
LetterWizardDialogImpl
.
RM_FOOTER
)
Helper
.
setUnoPropertyValue
(
Helper
.
setUnoPropertyValue
(
BPaperItem
,
PropertyNames
.
PROPERTY_ENABLED
,
bFooterPossible
)
BPaperItem
,
PropertyNames
.
PROPERTY_ENABLED
,
bFooterPossible
)
except
Exception
,
exception
:
except
Exception
:
traceback
.
print_exc
()
traceback
.
print_exc
()
def
chkFooterNextPagesItemChanged
(
self
):
def
chkFooterNextPagesItemChanged
(
self
):
...
@@ -899,7 +899,7 @@ class LetterWizardDialogImpl(LetterWizardDialog):
...
@@ -899,7 +899,7 @@ class LetterWizardDialogImpl(LetterWizardDialog):
self
.
xMSF
,
"Template"
,
"share"
,
"/wizard"
)
self
.
xMSF
,
"Template"
,
"share"
,
"/wizard"
)
self
.
sUserTemplatePath
=
\
self
.
sUserTemplatePath
=
\
FileAccess
.
getOfficePath2
(
self
.
xMSF
,
"Template"
,
"user"
,
""
)
FileAccess
.
getOfficePath2
(
self
.
xMSF
,
"Template"
,
"user"
,
""
)
except
NoValidPathException
,
e
:
except
NoValidPathException
:
traceback
.
print_exc
()
traceback
.
print_exc
()
def
initializeTemplates
(
self
,
xMSF
):
def
initializeTemplates
(
self
,
xMSF
):
...
@@ -1133,7 +1133,7 @@ class LetterWizardDialogImpl(LetterWizardDialog):
...
@@ -1133,7 +1133,7 @@ class LetterWizardDialogImpl(LetterWizardDialog):
UnoDataAware
.
attachEditControl
(
UnoDataAware
.
attachEditControl
(
cgl
,
"cp_TemplatePath"
,
self
.
myPathSelection
.
xSaveTextBox
,
cgl
,
"cp_TemplatePath"
,
self
.
myPathSelection
.
xSaveTextBox
,
True
)
.
updateUI
()
True
)
.
updateUI
()
except
Exception
,
exception
:
except
Exception
:
traceback
.
print_exc
()
traceback
.
print_exc
()
def
saveConfiguration
(
self
):
def
saveConfiguration
(
self
):
...
@@ -1142,7 +1142,7 @@ class LetterWizardDialogImpl(LetterWizardDialog):
...
@@ -1142,7 +1142,7 @@ class LetterWizardDialogImpl(LetterWizardDialog):
"/org.openoffice.Office.Writer/Wizards/Letter"
,
True
)
"/org.openoffice.Office.Writer/Wizards/Letter"
,
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
validatePath
(
self
):
def
validatePath
(
self
):
...
...
wizards/com/sun/star/wizards/letter/LetterWizardDialogResources.py
Dosyayı görüntüle @
f835b7e3
...
@@ -256,19 +256,19 @@ class LetterWizardDialogResources(Resource):
...
@@ -256,19 +256,19 @@ class LetterWizardDialogResources(Resource):
self
.
loadGreetingResources
()
self
.
loadGreetingResources
()
def
loadRoadmapResources
(
self
):
def
loadRoadmapResources
(
self
):
for
i
in
x
range
(
6
):
for
i
in
range
(
6
):
self
.
RoadmapLabels
.
append
(
self
.
getResText
(
self
.
RoadmapLabels
.
append
(
self
.
getResText
(
LetterWizardDialogResources
.
RID_LETTERWIZARDROADMAP_START
+
\
LetterWizardDialogResources
.
RID_LETTERWIZARDROADMAP_START
+
\
i
+
1
))
i
+
1
))
def
loadSalutationResources
(
self
):
def
loadSalutationResources
(
self
):
for
i
in
x
range
(
3
):
for
i
in
range
(
3
):
self
.
SalutationLabels
.
append
(
self
.
getResText
(
self
.
SalutationLabels
.
append
(
self
.
getResText
(
LetterWizardDialogResources
.
RID_LETTERWIZARDSALUTATION_START
+
\
LetterWizardDialogResources
.
RID_LETTERWIZARDSALUTATION_START
+
\
i
+
1
))
i
+
1
))
def
loadGreetingResources
(
self
):
def
loadGreetingResources
(
self
):
for
i
in
x
range
(
3
):
for
i
in
range
(
3
):
self
.
GreetingLabels
.
append
(
self
.
getResText
(
self
.
GreetingLabels
.
append
(
self
.
getResText
(
LetterWizardDialogResources
.
RID_LETTERWIZARDGREETING_START
+
\
LetterWizardDialogResources
.
RID_LETTERWIZARDGREETING_START
+
\
i
+
1
))
i
+
1
))
wizards/com/sun/star/wizards/text/TextFieldHandler.py
Dosyayı görüntüle @
f835b7e3
...
@@ -21,6 +21,7 @@ from ..common.PropertyNames import PropertyNames
...
@@ -21,6 +21,7 @@ from ..common.PropertyNames import PropertyNames
from
com.sun.star.util
import
DateTime
from
com.sun.star.util
import
DateTime
from
com.sun.star.uno
import
RuntimeException
from
com.sun.star.uno
import
RuntimeException
from
com.sun.star.beans
import
UnknownPropertyException
class
TextFieldHandler
(
object
):
class
TextFieldHandler
(
object
):
...
@@ -102,7 +103,7 @@ class TextFieldHandler(object):
...
@@ -102,7 +103,7 @@ class TextFieldHandler(object):
xProperty
=
TextFieldHandler
.
dictTextFields
[
_aPropertyValue
]
xProperty
=
TextFieldHandler
.
dictTextFields
[
_aPropertyValue
]
try
:
try
:
xPropertySet
=
xProperty
.
TextFieldMaster
xPropertySet
=
xProperty
.
TextFieldMaster
except
Exception
:
except
UnknownProperty
Exception
:
return
return
if
xPropertySet
.
PropertySetInfo
.
hasPropertyByName
(
if
xPropertySet
.
PropertySetInfo
.
hasPropertyByName
(
_PropertyName
):
_PropertyName
):
...
...
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