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
0ca978e9
Kaydet (Commit)
0ca978e9
authored
Kas 24, 2013
tarafından
Xisco Fauli
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
pyweb: some pyflakes love
Change-Id: I317656ca26eec5946959ac21e7da335196dd8548
üst
59e09804
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
17 additions
and
106 deletions
+17
-106
AbstractErrorHandler.py
wizards/com/sun/star/wizards/web/AbstractErrorHandler.py
+4
-4
BackgroundsDialog.py
wizards/com/sun/star/wizards/web/BackgroundsDialog.py
+0
-1
ErrorHandler.py
wizards/com/sun/star/wizards/web/ErrorHandler.py
+1
-1
FTPDialog.py
wizards/com/sun/star/wizards/web/FTPDialog.py
+4
-12
LogTaskListener.py
wizards/com/sun/star/wizards/web/LogTaskListener.py
+0
-49
Process.py
wizards/com/sun/star/wizards/web/Process.py
+0
-5
StatusDialog.py
wizards/com/sun/star/wizards/web/StatusDialog.py
+1
-3
TOCPreview.py
wizards/com/sun/star/wizards/web/TOCPreview.py
+0
-2
WWD_Events.py
wizards/com/sun/star/wizards/web/WWD_Events.py
+5
-6
WWD_General.py
wizards/com/sun/star/wizards/web/WWD_General.py
+1
-1
WWD_Startup.py
wizards/com/sun/star/wizards/web/WWD_Startup.py
+0
-6
WebConfigSet.py
wizards/com/sun/star/wizards/web/WebConfigSet.py
+1
-2
WebWizardDialog.py
wizards/com/sun/star/wizards/web/WebWizardDialog.py
+0
-2
CGDocument.py
wizards/com/sun/star/wizards/web/data/CGDocument.py
+0
-3
CGLayout.py
wizards/com/sun/star/wizards/web/data/CGLayout.py
+0
-2
CGSession.py
wizards/com/sun/star/wizards/web/data/CGSession.py
+0
-2
CGSettings.py
wizards/com/sun/star/wizards/web/data/CGSettings.py
+0
-2
AbstractExporter.py
wizards/com/sun/star/wizards/web/export/AbstractExporter.py
+0
-1
ConfiguredExporter.py
...rds/com/sun/star/wizards/web/export/ConfiguredExporter.py
+0
-1
FilterExporter.py
wizards/com/sun/star/wizards/web/export/FilterExporter.py
+0
-1
No files found.
wizards/com/sun/star/wizards/web/AbstractErrorHandler.py
Dosyayı görüntüle @
0ca978e9
...
...
@@ -66,7 +66,7 @@ class AbstractErrorHandler(ErrorHandler):
return
self
.
showMessage
(
self
.
getMessageFor
(
ex
,
arg
,
ix
,
errorType
),
errorType
)
elif
(
errorType
==
ErrorHandler
.
ERROR_MESSAGE
):
return
self
.
showMessage
(
self
.
getMessageFor
(
ex
,
arg
,
ix
,
errorType
),
errorType
)
raise
IllegalArgumentException
(
"unknown error type"
)
raise
ValueError
(
"unknown error type"
)
# @deprecated
# @param message
...
...
@@ -109,7 +109,7 @@ class AbstractErrorHandler(ErrorHandler):
return
2
elif
(
errorType
in
(
ErrorHandler
.
ERROR_WARNING
,
ErrorHandler
.
ERROR_MESSAGE
)):
return
1
raise
IllegalArgumentException
(
"unkonown error type"
)
raise
ValueError
(
"unkonown error type"
)
# @param errorType
...
...
@@ -136,7 +136,7 @@ class AbstractErrorHandler(ErrorHandler):
return
OK
elif
(
errorType
==
ErrorHandler
.
ERROR_MESSAGE
):
return
OK
raise
IllegalArgumentException
(
"unkonown error type"
)
raise
ValueError
(
"unkonown error type"
)
# @deprecated
# @param errorType
...
...
@@ -163,7 +163,7 @@ class AbstractErrorHandler(ErrorHandler):
return
"warningbox"
elif
(
errorType
==
ErrorHandler
.
ERROR_MESSAGE
):
return
"infobox"
raise
IllegalArgumentException
(
"unkonown error type"
)
raise
ValueError
(
"unkonown error type"
)
# renders the error
# @param ex the exception
...
...
wizards/com/sun/star/wizards/web/BackgroundsDialog.py
Dosyayı görüntüle @
0ca978e9
...
...
@@ -15,7 +15,6 @@
# except in compliance with the License. You may obtain a copy of
# the License at http://www.apache.org/licenses/LICENSE-2.0 .
#
import
uno
import
traceback
from
.ImageListDialog
import
ImageListDialog
...
...
wizards/com/sun/star/wizards/web/ErrorHandler.py
Dosyayı görüntüle @
0ca978e9
...
...
@@ -16,7 +16,7 @@
# the License at http://www.apache.org/licenses/LICENSE-2.0 .
from
com.sun.star.awt.VclWindowPeerAttribute
import
OK
,
DEF_OK
,
OK_CANCEL
,
DEF_CANCEL
from
com.sun.star.awt.VclWindowPeerAttribute
import
YES_NO
,
DEF_NO
,
DEF_YES
from
com.sun.star.awt.VclWindowPeerAttribute
import
YES_NO
,
DEF_NO
class
ErrorHandler
:
...
...
wizards/com/sun/star/wizards/web/FTPDialog.py
Dosyayı görüntüle @
0ca978e9
...
...
@@ -28,8 +28,6 @@ from ..common.SystemDialog import SystemDialog
from
..common.FileAccess
import
FileAccess
from
..common.HelpIds
import
HelpIds
from
..common.UCB
import
UCB
from
.data.CGPublish
import
CGPublish
from
.data.CGSettings
import
CGSettings
from
com.sun.star.ucb
import
AuthenticationRequest
from
com.sun.star.ucb
import
InteractiveAugmentedIOException
...
...
@@ -305,18 +303,18 @@ class FTPDialog(UnoDialog2, UIConsts):
try
:
self
.
connect1
(
self
.
getFullUrl
())
success
=
True
except
InteractiveAugmentedIOException
as
iaioex
:
except
InteractiveAugmentedIOException
:
try
:
self
.
connect1
(
self
.
getAccountUrl
())
self
.
setDir
(
"/"
)
success
=
True
except
Exception
:
self
.
setLabel
(
self
.
STATUS_NO_RIGHTS
)
except
InteractiveNetworkResolveNameException
as
inrne
:
except
InteractiveNetworkResolveNameException
:
self
.
setLabel
(
self
.
STATUS_SERVER_NOT_FOUND
)
except
AuthenticationRequest
as
ar
:
except
AuthenticationRequest
:
self
.
setLabel
(
self
.
STATUS_USER_PWD_WRONG
)
except
InteractiveNetworkConnectException
as
incx
:
except
InteractiveNetworkConnectException
:
self
.
setLabel
(
self
.
STATUS_HOST_UNREACHABLE
)
except
Exception
:
self
.
setLabel
(
-
1
)
...
...
@@ -341,9 +339,6 @@ class FTPDialog(UnoDialog2, UIConsts):
def
connect1
(
self
,
acountUrl
):
content
=
self
.
ucb
.
getContent
(
self
.
getAccountUrl
())
# list files in the content.
l
=
self
.
ucb
.
listFiles
(
self
.
getAccountUrl
(),
None
)
# open the content
aArg
=
OpenCommandArgument2
()
aArg
.
Mode
=
FOLDERS
# FOLDER, DOCUMENTS -> simple filter
...
...
@@ -351,9 +346,6 @@ class FTPDialog(UnoDialog2, UIConsts):
self
.
ucb
.
executeCommand
(
content
,
"open"
,
aArg
)
# get the title property of the content.
obj
=
self
.
ucb
.
getContentProperty
(
content
,
"Title"
,
str
)
# changes the ftp subdirectory, in both
# the UI and the data.
# @param s the directory.
...
...
wizards/com/sun/star/wizards/web/LogTaskListener.py
deleted
100644 → 0
Dosyayı görüntüle @
59e09804
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# This file incorporates work covered by the following license notice:
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed
# with this work for additional information regarding copyright
# ownership. The ASF licenses this file to you under the Apache
# License, Version 2.0 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.apache.org/licenses/LICENSE-2.0 .
# used for debugging.
class
LogTaskListener
(
TaskListener
,
ErrorHandler
):
out
def
__init__
(
os
):
out
=
os
def
__init__
():
self
.
__init__
(
System
.
out
)
# @see com.sun.star.wizards.web.status.TaskListener#taskStarted(com.sun.star.wizards.web.status.TaskEvent)
def
taskStarted
(
te
):
out
.
println
(
"TASK "
+
te
.
getTask
()
.
getTaskName
()
+
" STARTED."
)
#@see com.sun.star.wizards.web.status.TaskListener#taskFinished(com.sun.star.wizards.web.status.TaskEvent)
def
taskFinished
(
te
):
out
.
println
(
"TASK "
+
te
.
getTask
()
.
getTaskName
()
+
" FINISHED: "
+
te
.
getTask
()
.
getSuccessfull
()
+
"/"
+
te
.
getTask
()
.
getMax
()
+
"Succeeded."
)
#@see com.sun.star.wizards.web.status.TaskListener#taskStatusChanged(com.sun.star.wizards.web.status.TaskEvent)
def
taskStatusChanged
(
te
):
out
.
println
(
"TASK "
+
te
.
getTask
()
.
getTaskName
()
+
" status : "
+
te
.
getTask
()
.
getSuccessfull
()
+
"(+"
+
te
.
getTask
()
.
getFailed
()
+
")/"
+
te
.
getTask
()
.
getMax
())
#@see com.sun.star.wizards.web.status.TaskListener#subtaskNameChanged(com.sun.star.wizards.web.status.TaskEvent)
def
subtaskNameChanged
(
te
):
out
.
println
(
"SUBTASK Name:"
+
te
.
getTask
()
.
getSubtaskName
())
# @see com.sun.star.wizards.web.status.ErrorReporter#error(java.lang.Exception, java.lang.Object, java.lang.String)
def
error
(
ex
,
arg
,
ix
,
i
):
print
(
PropertyNames
.
EMPTY_STRING
+
arg
+
"//"
+
ix
+
"//Exception: "
+
ex
.
getLocalizedMessage
())
ex
.
printStackTrace
()
return
True
;
wizards/com/sun/star/wizards/web/Process.py
Dosyayı görüntüle @
0ca978e9
...
...
@@ -25,12 +25,7 @@ from ..ui.event.CommonListener import StreamListenerProcAdapter
from
.ProcessErrors
import
ProcessErrors
from
.ExtensionVerifier
import
ExtensionVerifier
from
.ErrorHandler
import
ErrorHandler
from
.data.CGContent
import
CGContent
from
.data.CGDocument
import
CGDocument
from
.data.CGExporter
import
CGExporter
from
.data.CGLayout
import
CGLayout
from
.data.CGPublish
import
CGPublish
from
.data.CGSettings
import
CGSettings
from
com.sun.star.io
import
IOException
from
com.sun.star.uno
import
SecurityException
...
...
wizards/com/sun/star/wizards/web/StatusDialog.py
Dosyayı görüntüle @
0ca978e9
...
...
@@ -18,8 +18,6 @@ import uno
import
traceback
from
..ui.UnoDialog2
import
UnoDialog2
from
..ui.UnoDialog
import
UnoDialog
from
..ui.event.TaskListener
import
TaskListener
from
..common.PropertyNames
import
PropertyNames
# Note on the argument resource:
...
...
@@ -45,7 +43,7 @@ class StatusDialog(UnoDialog2):
self
.
res
=
resources
if
not
(
len
(
self
.
res
)
==
6
):
# display a close button?
raise
IllegalArgumentException
(
"The resources argument should contain 6 Strings, see doc on constructor."
)
raise
ValueError
(
"The resources argument should contain 6 Strings, see doc on constructor."
)
b
=
not
(
self
.
enableBreak
or
self
.
closeOnFinish
)
...
...
wizards/com/sun/star/wizards/web/TOCPreview.py
Dosyayı görüntüle @
0ca978e9
...
...
@@ -15,8 +15,6 @@
# except in compliance with the License. You may obtain a copy of
# the License at http://www.apache.org/licenses/LICENSE-2.0 .
#
import
traceback
from
.Process
import
Process
from
..ui.event.Task
import
Task
from
..common.FileAccess
import
FileAccess
...
...
wizards/com/sun/star/wizards/web/WWD_Events.py
Dosyayı görüntüle @
0ca978e9
...
...
@@ -16,10 +16,9 @@
# the License at http://www.apache.org/licenses/LICENSE-2.0 .
#
import
traceback
import
uno
from
.WWD_Startup
import
WWD_Startup
from
.WWD_General
import
WWD_General
from
.WebWizardConst
import
*
from
..common.FileAccess
import
FileAccess
from
..common.Configuration
import
Configuration
...
...
@@ -561,7 +560,7 @@ class WWD_Events(WWD_Startup):
try
:
fileAccess
.
xInterface
.
createFolder
(
p
.
cp_URL
)
except
Exception
as
ex
:
except
Exception
:
message
=
self
.
resources
.
resLocalTargetCouldNotCreate
.
replace
(
"
%
FILENAME"
,
path
)
AbstractErrorHandler
.
showMessage1
(
...
...
@@ -643,7 +642,7 @@ class WWD_Events(WWD_Startup):
try
:
fileAccess
.
mkdir
(
p
.
url
)
except
Exception
as
ex
:
except
Exception
:
message
=
self
.
resources
.
resFTPTargetCouldNotCreate
.
replace
(
"
%
FILENAME"
,
path
)
AbstractErrorHandler
.
showMessage1
(
...
...
@@ -679,7 +678,7 @@ class WWD_Events(WWD_Startup):
ErrorHandler
.
ERROR_NORMAL_IGNORE
):
return
False
#remove the old session
Configuration
.
removeNode
(
conf
,
name
)
except
NoSuchElementException
as
nsex
:
except
NoSuchElementException
:
pass
self
.
settings
.
cp_DefaultSession
.
cp_Index
=
0
...
...
@@ -892,7 +891,7 @@ class WWD_Events(WWD_Startup):
#if ProcessStatusRenderer is not None:
# ProcessStatusRenderer.close(False)
except
Exception
as
ex
:
except
Exception
:
traceback
.
print_exc
()
class
LoadDocs
(
object
):
...
...
wizards/com/sun/star/wizards/web/WWD_General.py
Dosyayı görüntüle @
0ca978e9
...
...
@@ -300,6 +300,6 @@ class WWD_General(WebWizardDialog):
def
substitute
(
self
,
path
):
try
:
return
self
.
xStringSubstitution
.
substituteVariables
(
path
,
False
)
except
Exception
as
ex
:
except
Exception
:
traceback
.
print_exc
()
return
path
wizards/com/sun/star/wizards/web/WWD_Startup.py
Dosyayı görüntüle @
0ca978e9
...
...
@@ -16,15 +16,12 @@
# the License at http://www.apache.org/licenses/LICENSE-2.0 .
#
import
traceback
import
uno
from
.WWD_General
import
WWD_General
from
.WebWizardConst
import
*
from
.StylePreview
import
StylePreview
from
..common.Configuration
import
Configuration
from
..common.FileAccess
import
FileAccess
from
..common.Desktop
import
Desktop
from
..common.Properties
import
Properties
from
..document.OfficeDocument
import
OfficeDocument
from
.data.CGSettings
import
CGSettings
from
.data.CGDocument
import
CGDocument
...
...
@@ -39,8 +36,6 @@ from ..ui.DocumentPreview import DocumentPreview
from
..ui.event.DataAware
import
DataAware
from
..ui.event.Task
import
Task
from
com.sun.star.lang
import
IllegalArgumentException
'''
Web Wizard Dialog implementation : Startup.
This class contains the startup implementation and session mounting methods.
...
...
@@ -131,7 +126,6 @@ class WWD_Startup(WWD_General):
self
.
txtZip
.
Model
.
Enabled
=
False
self
.
buildStepX
()
self
.
xMSF
=
xmsf
xDesktop
=
Desktop
.
getDesktop
(
xmsf
)
self
.
terminateListener
=
TerminateListenerProcAdapter
(
self
)
self
.
myFrame
=
OfficeDocument
.
createNewFrame
(
xmsf
,
self
.
terminateListener
)
doc
=
OfficeDocument
.
createNewDocument
(
...
...
wizards/com/sun/star/wizards/web/WebConfigSet.py
Dosyayı görüntüle @
0ca978e9
...
...
@@ -18,7 +18,6 @@
import
traceback
from
..common.ConfigGroup
import
ConfigGroup
from
..common.Configuration
import
Configuration
from
..common.XMLProvider
import
XMLProvider
from
..ui.event.EventListenerList
import
EventListenerList
from
..ui.event.ListDataEvent
import
ListDataEvent
from
..ui.event.ListDataListener
import
ListDataListener
...
...
@@ -124,7 +123,7 @@ class WebConfigSet(ConfigGroup):
self
.
childrenMap
.
clear
()
del
self
.
childrenList
[:]
def
update
(
i
):
def
update
(
self
,
i
):
self
.
fireListDataListenerContentsChanged
(
i
,
i
)
def
createDOM
(
self
,
parent
):
...
...
wizards/com/sun/star/wizards/web/WebWizardDialog.py
Dosyayı görüntüle @
0ca978e9
...
...
@@ -15,8 +15,6 @@
# except in compliance with the License. You may obtain a copy of
# the License at http://www.apache.org/licenses/LICENSE-2.0 .
#
import
unohelper
from
..ui.WizardDialog
import
WizardDialog
,
uno
,
PropertyNames
from
.WebWizardDialogResources
import
WebWizardDialogResources
from
.WebWizardConst
import
*
...
...
wizards/com/sun/star/wizards/web/data/CGDocument.py
Dosyayı görüntüle @
0ca978e9
...
...
@@ -15,8 +15,6 @@
# except in compliance with the License. You may obtain a copy of
# the License at http://www.apache.org/licenses/LICENSE-2.0 .
#
import
uno
from
os
import
sep
as
separator
from
...common.ConfigGroup
import
ConfigGroup
from
...document.OfficeDocument
import
OfficeDocument
...
...
@@ -142,7 +140,6 @@ class CGDocument(ConfigGroup):
task
.
advance
(
True
)
#5
valid
=
True
if
self
.
cp_Title
==
""
:
self
.
cp_Title
=
self
.
title
...
...
wizards/com/sun/star/wizards/web/data/CGLayout.py
Dosyayı görüntüle @
0ca978e9
...
...
@@ -32,7 +32,6 @@ class CGLayout(ConfigGroup):
def
createTemplates
(
self
,
xmsf
):
self
.
templates
=
{}
workPath
=
self
.
getSettings
()
.
workPath
fa
=
FileAccess
(
xmsf
)
stylesheetPath
=
fa
.
getURL
(
self
.
getSettings
()
.
workPath
,
"layouts/"
+
self
.
cp_FSName
)
...
...
@@ -46,7 +45,6 @@ class CGLayout(ConfigGroup):
i
+=
1
def
getImageUrls
(
self
):
sRetUrls
=
range
(
1
)
ResId
=
UIConsts
.
RID_IMG_WEB
+
(
self
.
cp_Index
*
2
)
return
[
ResId
,
ResId
+
1
]
...
...
wizards/com/sun/star/wizards/web/data/CGSession.py
Dosyayı görüntüle @
0ca978e9
...
...
@@ -15,8 +15,6 @@
# except in compliance with the License. You may obtain a copy of
# the License at http://www.apache.org/licenses/LICENSE-2.0 .
#
import
uno
from
...common.ConfigGroup
import
ConfigGroup
from
..WebConfigSet
import
WebConfigSet
from
...common.XMLHelper
import
XMLHelper
...
...
wizards/com/sun/star/wizards/web/data/CGSettings.py
Dosyayı görüntüle @
0ca978e9
...
...
@@ -16,7 +16,6 @@
# the License at http://www.apache.org/licenses/LICENSE-2.0 .
#
import
traceback
import
uno
from
datetime
import
date
as
dateTimeObject
from
...common.FileAccess
import
FileAccess
...
...
@@ -35,7 +34,6 @@ from .CGSession import CGSession
from
com.sun.star.i18n.NumberFormatIndex
import
DATE_SYS_DMMMYYYY
from
com.sun.star.i18n.NumberFormatIndex
import
NUMBER_1000DEC2
from
com.sun.star.util
import
DateTime
class
CGSettings
(
ConfigGroup
):
...
...
wizards/com/sun/star/wizards/web/export/AbstractExporter.py
Dosyayı görüntüle @
0ca978e9
...
...
@@ -16,7 +16,6 @@
# the License at http://www.apache.org/licenses/LICENSE-2.0 .
#
import
traceback
import
uno
from
.Exporter
import
Exporter
from
..TypeDetection
import
*
...
...
wizards/com/sun/star/wizards/web/export/ConfiguredExporter.py
Dosyayı görüntüle @
0ca978e9
...
...
@@ -48,4 +48,3 @@ class ConfiguredExporter(FilterExporter):
if
(
s
==
"true"
):
return
True
return
None
wizards/com/sun/star/wizards/web/export/FilterExporter.py
Dosyayı görüntüle @
0ca978e9
...
...
@@ -18,7 +18,6 @@
from
.AbstractExporter
import
AbstractExporter
from
...common.Properties
import
Properties
from
...ui.event.Task
import
Task
from
com.sun.star.io
import
IOException
...
...
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