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
d03f2be8
Kaydet (Commit)
d03f2be8
authored
Kas 26, 2012
tarafından
Xisco Fauli
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
pyfax: adapt it to python3.3. it can be already launched
Change-Id: Id0c98e95d6b40dabe0dc07af232bda84989d1815
üst
7ce4ca1c
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
13 additions
and
16 deletions
+13
-16
FileAccess.py
wizards/com/sun/star/wizards/common/FileAccess.py
+2
-4
NoValidPathException.py
wizards/com/sun/star/wizards/common/NoValidPathException.py
+1
-1
OfficeDocument.py
wizards/com/sun/star/wizards/document/OfficeDocument.py
+5
-5
FaxWizardDialogImpl.py
wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py
+1
-2
TextDocument.py
wizards/com/sun/star/wizards/text/TextDocument.py
+2
-2
WizardDialog.py
wizards/com/sun/star/wizards/ui/WizardDialog.py
+2
-2
No files found.
wizards/com/sun/star/wizards/common/FileAccess.py
Dosyayı görüntüle @
d03f2be8
...
@@ -16,7 +16,6 @@
...
@@ -16,7 +16,6 @@
# the License at http://www.apache.org/licenses/LICENSE-2.0 .
# the License at http://www.apache.org/licenses/LICENSE-2.0 .
#
#
import
traceback
import
traceback
import
types
from
os
import
path
as
osPath
from
os
import
path
as
osPath
from
.NoValidPathException
import
NoValidPathException
from
.NoValidPathException
import
NoValidPathException
...
@@ -101,9 +100,9 @@ class FileAccess(object):
...
@@ -101,9 +100,9 @@ class FileAccess(object):
sPath
+
"_internal"
)
sPath
+
"_internal"
)
Template_user
=
xPathInterface
.
getPropertyValue
(
Template_user
=
xPathInterface
.
getPropertyValue
(
sPath
+
"_user"
)
sPath
+
"_user"
)
if
type
(
Template_internal
)
is
not
types
.
InstanceType
:
if
not
hasattr
(
Template_internal
,
'__dict__'
)
:
ReadPaths
=
ReadPaths
+
Template_internal
ReadPaths
=
ReadPaths
+
Template_internal
if
type
(
Template_user
)
is
not
types
.
InstanceType
:
if
not
hasattr
(
Template_user
,
'__dict__'
)
:
ReadPaths
=
ReadPaths
+
Template_user
ReadPaths
=
ReadPaths
+
Template_user
ReadPaths
=
ReadPaths
+
(
Template_writable
,)
ReadPaths
=
ReadPaths
+
(
Template_writable
,)
if
sType
.
lower
()
==
"user"
:
if
sType
.
lower
()
==
"user"
:
...
@@ -125,7 +124,6 @@ class FileAccess(object):
...
@@ -125,7 +124,6 @@ class FileAccess(object):
if
not
bexists
:
if
not
bexists
:
raise
NoValidPathException
(
xMSF
,
""
);
raise
NoValidPathException
(
xMSF
,
""
);
return
ResultPath
return
ResultPath
@classmethod
@classmethod
...
...
wizards/com/sun/star/wizards/common/NoValidPathException.py
Dosyayı görüntüle @
d03f2be8
...
@@ -20,7 +20,7 @@ class NoValidPathException(Exception):
...
@@ -20,7 +20,7 @@ class NoValidPathException(Exception):
def
__init__
(
self
,
xMSF
,
_sText
):
def
__init__
(
self
,
xMSF
,
_sText
):
super
(
NoValidPathException
,
self
)
.
__init__
(
_sText
)
super
(
NoValidPathException
,
self
)
.
__init__
(
_sText
)
# TODO: NEVER open a dialog in an exception
# TODO: NEVER open a dialog in an exception
from
SystemDialog
import
SystemDialog
from
.
SystemDialog
import
SystemDialog
if
xMSF
:
if
xMSF
:
SystemDialog
.
showErrorBox
(
xMSF
,
SystemDialog
.
showErrorBox
(
xMSF
,
"dbwizres"
,
"dbw"
,
521
)
#OfficePathnotavailable
"dbwizres"
,
"dbw"
,
521
)
#OfficePathnotavailable
...
...
wizards/com/sun/star/wizards/document/OfficeDocument.py
Dosyayı görüntüle @
d03f2be8
...
@@ -46,7 +46,7 @@ class OfficeDocument(object):
...
@@ -46,7 +46,7 @@ class OfficeDocument(object):
@classmethod
@classmethod
def
attachEventCall
(
self
,
xComponent
,
EventName
,
EventType
,
EventURL
):
def
attachEventCall
(
self
,
xComponent
,
EventName
,
EventType
,
EventURL
):
try
:
try
:
oEventProperties
=
range
(
2
)
oEventProperties
=
list
(
range
(
2
)
)
oEventProperties
[
0
]
=
uno
.
createUnoStruct
(
oEventProperties
[
0
]
=
uno
.
createUnoStruct
(
'com.sun.star.beans.PropertyValue'
)
'com.sun.star.beans.PropertyValue'
)
oEventProperties
[
0
]
.
Name
=
"EventType"
oEventProperties
[
0
]
.
Name
=
"EventType"
...
@@ -85,7 +85,7 @@ class OfficeDocument(object):
...
@@ -85,7 +85,7 @@ class OfficeDocument(object):
@classmethod
@classmethod
def
createNewDocument
(
self
,
frame
,
sDocumentType
,
preview
,
readonly
):
def
createNewDocument
(
self
,
frame
,
sDocumentType
,
preview
,
readonly
):
loadValues
=
range
(
2
)
loadValues
=
list
(
range
(
2
)
)
loadValues
[
0
]
=
uno
.
createUnoStruct
(
loadValues
[
0
]
=
uno
.
createUnoStruct
(
'com.sun.star.beans.PropertyValue'
)
'com.sun.star.beans.PropertyValue'
)
loadValues
[
0
]
.
Name
=
"ReadOnly"
loadValues
[
0
]
.
Name
=
"ReadOnly"
...
@@ -194,7 +194,7 @@ class OfficeDocument(object):
...
@@ -194,7 +194,7 @@ class OfficeDocument(object):
def
store
(
self
,
xMSF
,
xComponent
,
StorePath
,
FilterName
):
def
store
(
self
,
xMSF
,
xComponent
,
StorePath
,
FilterName
):
try
:
try
:
if
len
(
FilterName
):
if
len
(
FilterName
):
oStoreProperties
=
range
(
2
)
oStoreProperties
=
list
(
range
(
2
)
)
oStoreProperties
[
0
]
=
uno
.
createUnoStruct
(
oStoreProperties
[
0
]
=
uno
.
createUnoStruct
(
'com.sun.star.beans.PropertyValue'
)
'com.sun.star.beans.PropertyValue'
)
oStoreProperties
[
0
]
.
Name
=
"FilterName"
oStoreProperties
[
0
]
.
Name
=
"FilterName"
...
@@ -205,7 +205,7 @@ class OfficeDocument(object):
...
@@ -205,7 +205,7 @@ class OfficeDocument(object):
oStoreProperties
[
1
]
.
Value
=
xMSF
.
createInstance
(
oStoreProperties
[
1
]
.
Value
=
xMSF
.
createInstance
(
"com.sun.star.comp.uui.UUIInteractionHandler"
)
"com.sun.star.comp.uui.UUIInteractionHandler"
)
else
:
else
:
oStoreProperties
=
range
(
0
)
oStoreProperties
=
list
(
range
(
0
)
)
if
StorePath
.
startswith
(
"file://"
):
if
StorePath
.
startswith
(
"file://"
):
#Unix
#Unix
...
@@ -260,7 +260,7 @@ class OfficeDocument(object):
...
@@ -260,7 +260,7 @@ class OfficeDocument(object):
def
getFileMediaDecriptor
(
self
,
xmsf
,
url
):
def
getFileMediaDecriptor
(
self
,
xmsf
,
url
):
typeDetect
=
xmsf
.
createInstance
(
typeDetect
=
xmsf
.
createInstance
(
"com.sun.star.document.TypeDetection"
)
"com.sun.star.document.TypeDetection"
)
mediaDescr
=
range
(
1
)
mediaDescr
=
list
(
range
(
1
)
)
mediaDescr
[
0
]
=
uno
.
createUnoStruct
(
mediaDescr
[
0
]
=
uno
.
createUnoStruct
(
'com.sun.star.beans.PropertyValue'
)
'com.sun.star.beans.PropertyValue'
)
mediaDescr
[
0
]
.
Name
=
"URL"
mediaDescr
[
0
]
.
Name
=
"URL"
...
...
wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py
Dosyayı görüntüle @
d03f2be8
...
@@ -151,7 +151,6 @@ class FaxWizardDialogImpl(FaxWizardDialog):
...
@@ -151,7 +151,6 @@ class FaxWizardDialogImpl(FaxWizardDialog):
try
:
try
:
fileAccess
=
FileAccess
(
self
.
xMSF
)
fileAccess
=
FileAccess
(
self
.
xMSF
)
self
.
sPath
=
self
.
myPathSelection
.
getSelectedPath
()
self
.
sPath
=
self
.
myPathSelection
.
getSelectedPath
()
print
os
.
path
.
exists
(
self
.
sPath
)
if
not
self
.
sPath
or
not
os
.
path
.
exists
(
self
.
sPath
):
if
not
self
.
sPath
or
not
os
.
path
.
exists
(
self
.
sPath
):
self
.
myPathSelection
.
triggerPathPicker
()
self
.
myPathSelection
.
triggerPathPicker
()
self
.
sPath
=
self
.
myPathSelection
.
getSelectedPath
()
self
.
sPath
=
self
.
myPathSelection
.
getSelectedPath
()
...
@@ -184,7 +183,7 @@ class FaxWizardDialogImpl(FaxWizardDialog):
...
@@ -184,7 +183,7 @@ class FaxWizardDialogImpl(FaxWizardDialog):
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"
...
...
wizards/com/sun/star/wizards/text/TextDocument.py
Dosyayı görüntüle @
d03f2be8
...
@@ -120,7 +120,7 @@ class TextDocument(object):
...
@@ -120,7 +120,7 @@ class TextDocument(object):
self
.
xProgressBar
.
setValue
(
5
)
self
.
xProgressBar
.
setValue
(
5
)
def
loadAsPreview
(
self
,
sDefaultTemplate
,
asTemplate
):
def
loadAsPreview
(
self
,
sDefaultTemplate
,
asTemplate
):
loadValues
=
range
(
3
)
loadValues
=
list
(
range
(
3
)
)
# open document in the Preview mode
# open document in the Preview mode
loadValues
[
0
]
=
uno
.
createUnoStruct
(
loadValues
[
0
]
=
uno
.
createUnoStruct
(
'com.sun.star.beans.PropertyValue'
)
'com.sun.star.beans.PropertyValue'
)
...
@@ -244,7 +244,7 @@ class TextDocument(object):
...
@@ -244,7 +244,7 @@ class TextDocument(object):
auxList
=
[]
auxList
=
[]
allItems
=
self
.
xTextDocument
.
findAll
(
sd
)
allItems
=
self
.
xTextDocument
.
findAll
(
sd
)
for
i
in
x
range
(
allItems
.
Count
):
for
i
in
range
(
allItems
.
Count
):
auxList
.
append
(
allItems
.
getByIndex
(
i
))
auxList
.
append
(
allItems
.
getByIndex
(
i
))
return
auxList
return
auxList
wizards/com/sun/star/wizards/ui/WizardDialog.py
Dosyayı görüntüle @
d03f2be8
...
@@ -161,7 +161,7 @@ class WizardDialog(UnoDialog2):
...
@@ -161,7 +161,7 @@ class WizardDialog(UnoDialog2):
def
getRoadmapItemByID
(
self
,
_ID
):
def
getRoadmapItemByID
(
self
,
_ID
):
try
:
try
:
getByIndex
=
self
.
oRoadmap
.
getByIndex
getByIndex
=
self
.
oRoadmap
.
getByIndex
for
i
in
x
range
(
self
.
oRoadmap
.
Count
):
for
i
in
range
(
self
.
oRoadmap
.
Count
):
CurRoadmapItem
=
getByIndex
(
i
)
CurRoadmapItem
=
getByIndex
(
i
)
CurID
=
int
(
Helper
.
getUnoPropertyValue
(
CurRoadmapItem
,
"ID"
))
CurID
=
int
(
Helper
.
getUnoPropertyValue
(
CurRoadmapItem
,
"ID"
))
if
CurID
==
_ID
:
if
CurID
==
_ID
:
...
@@ -339,7 +339,7 @@ class WizardDialog(UnoDialog2):
...
@@ -339,7 +339,7 @@ class WizardDialog(UnoDialog2):
def
enablefromStep
(
self
,
_iStep
,
_bDoEnable
):
def
enablefromStep
(
self
,
_iStep
,
_bDoEnable
):
if
_iStep
<=
self
.
nMaxStep
:
if
_iStep
<=
self
.
nMaxStep
:
for
i
in
x
range
(
_iStep
,
self
.
nMaxStep
):
for
i
in
range
(
_iStep
,
self
.
nMaxStep
):
self
.
setStepEnabled
(
i
,
_bDoEnable
)
self
.
setStepEnabled
(
i
,
_bDoEnable
)
enableFinishButton
(
_bDoEnable
)
enableFinishButton
(
_bDoEnable
)
if
not
_bDoEnable
:
if
not
_bDoEnable
:
...
...
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