[Libreoffice-commits] core.git: 4 commits - wizards/com wizards/Pyuno_web.mk
Xisco Fauli
anistenis at gmail.com
Sun Nov 24 09:23:34 PST 2013
wizards/Pyuno_web.mk | 1
wizards/com/sun/star/wizards/agenda/AgendaDocument.py | 11 --
wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.py | 8 -
wizards/com/sun/star/wizards/agenda/CGTopic.py | 1
wizards/com/sun/star/wizards/agenda/TopicsControl.py | 7 -
wizards/com/sun/star/wizards/common/ConfigGroup.py | 1
wizards/com/sun/star/wizards/common/ConfigSet.py | 1
wizards/com/sun/star/wizards/common/Desktop.py | 2
wizards/com/sun/star/wizards/common/NumberFormatter.py | 2
wizards/com/sun/star/wizards/common/Resource.py | 1
wizards/com/sun/star/wizards/document/OfficeDocument.py | 1
wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py | 1
wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py | 7 -
wizards/com/sun/star/wizards/text/TextDocument.py | 2
wizards/com/sun/star/wizards/text/TextElement.py | 1
wizards/com/sun/star/wizards/ui/ControlScroller.py | 2
wizards/com/sun/star/wizards/ui/WizardDialog.py | 3
wizards/com/sun/star/wizards/ui/event/DataAware.py | 1
wizards/com/sun/star/wizards/ui/event/ListDataEvent.py | 2
wizards/com/sun/star/wizards/ui/event/ListDataListener.py | 1
wizards/com/sun/star/wizards/ui/event/RadioDataAware.py | 1
wizards/com/sun/star/wizards/ui/event/TaskEvent.py | 2
wizards/com/sun/star/wizards/ui/event/UnoDataAware.py | 5 -
wizards/com/sun/star/wizards/web/AbstractErrorHandler.py | 8 -
wizards/com/sun/star/wizards/web/BackgroundsDialog.py | 1
wizards/com/sun/star/wizards/web/ErrorHandler.py | 2
wizards/com/sun/star/wizards/web/FTPDialog.py | 16 ---
wizards/com/sun/star/wizards/web/LogTaskListener.py | 49 ----------
wizards/com/sun/star/wizards/web/Process.py | 5 -
wizards/com/sun/star/wizards/web/StatusDialog.py | 4
wizards/com/sun/star/wizards/web/TOCPreview.py | 2
wizards/com/sun/star/wizards/web/WWD_Events.py | 11 +-
wizards/com/sun/star/wizards/web/WWD_General.py | 2
wizards/com/sun/star/wizards/web/WWD_Startup.py | 6 -
wizards/com/sun/star/wizards/web/WebConfigSet.py | 3
wizards/com/sun/star/wizards/web/WebWizardDialog.py | 2
wizards/com/sun/star/wizards/web/data/CGDocument.py | 3
wizards/com/sun/star/wizards/web/data/CGLayout.py | 2
wizards/com/sun/star/wizards/web/data/CGSession.py | 2
wizards/com/sun/star/wizards/web/data/CGSettings.py | 2
wizards/com/sun/star/wizards/web/export/AbstractExporter.py | 1
wizards/com/sun/star/wizards/web/export/ConfiguredExporter.py | 1
wizards/com/sun/star/wizards/web/export/FilterExporter.py | 1
43 files changed, 27 insertions(+), 160 deletions(-)
New commits:
commit 233d247f40dd5069451204f3c3ef2c298e2cad74
Author: Xisco Fauli <anistenis at gmail.com>
Date: Sun Nov 24 18:22:01 2013 +0100
pyweb: update makefile
Change-Id: I69953716656446ab26a9d97d0a6921f87e8b8995
diff --git a/wizards/Pyuno_web.mk b/wizards/Pyuno_web.mk
index 3933b27..6b56a4d 100644
--- a/wizards/Pyuno_web.mk
+++ b/wizards/Pyuno_web.mk
@@ -18,7 +18,6 @@ $(eval $(call gb_Pyuno_add_files,web,wizards/web,\
FTPDialogResources.py \
IconsDialog.py \
ImageListDialog.py \
- LogTaskListener.py \
Process.py \
ProcessErrorHandler.py \
ProcessErrors.py \
commit 76ee4517c1b153a4b6f1065dff596118f6b563fc
Author: Xisco Fauli <anistenis at gmail.com>
Date: Sun Nov 24 18:16:22 2013 +0100
pywizards: Some more pyflakes love
Change-Id: I3da78c004068cd7306ef79f5d019ab5bf07cac0b
diff --git a/wizards/com/sun/star/wizards/agenda/AgendaDocument.py b/wizards/com/sun/star/wizards/agenda/AgendaDocument.py
index d9013ba..180b83f 100644
--- a/wizards/com/sun/star/wizards/agenda/AgendaDocument.py
+++ b/wizards/com/sun/star/wizards/agenda/AgendaDocument.py
@@ -571,15 +571,6 @@ class AgendaDocument(TextDocument):
rows = table.Rows
rows.insertByIndex(start, count)
- '''returns the row index for this cell name.
- @param cellName
- @return the row index for this cell name.
- '''
-
- @classmethod
- def getRowIndex(self, cellName):
- return int(cellName.RangeName[1:])
-
'''
returns the rows count of this table, assuming
there is no vertical merged cells.
@@ -699,8 +690,6 @@ class ItemsTable(object):
if cellName == cursor.RangeName:
return
- rowIndex = AgendaDocument.getRowIndex(cursor)
- rowsCount = AgendaDocument.getRowCount(ItemsTable.table)
'''
now before deleteing i move the cursor up so it
does not disappear, because it will crash office.
diff --git a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.py b/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.py
index 243365a..8b21e7e 100644
--- a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.py
+++ b/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.py
@@ -35,9 +35,9 @@ from ..common.Configuration import Configuration
from ..common.FileAccess import FileAccess
from ..document.OfficeDocument import OfficeDocument
+from com.sun.star.util import CloseVetoException
from com.sun.star.view.DocumentZoomType import OPTIMAL
from com.sun.star.awt.VclWindowPeerAttribute import YES_NO, DEF_NO
-from com.sun.star.awt.VclWindowPeerAttribute import OK
class AgendaWizardDialogImpl(AgendaWizardDialog):
@@ -260,9 +260,6 @@ class AgendaWizardDialogImpl(AgendaWizardDialog):
#checkbox listeners
def chkUseMeetingTypeItemChanged(self):
- self.myAgendaDoc.agenda.cp_IncludeMinutes = bool(self.chkMinutes.State)
-
- def chkUseMeetingTypeItemChanged(self):
self.myAgendaDoc.redraw(self.templateConsts.FILLIN_MEETING_TYPE)
def chkUseReadItemChanged(self):
@@ -316,7 +313,6 @@ class AgendaWizardDialogImpl(AgendaWizardDialog):
bSaveSuccess = False
endWizard = True
try:
- fileAccess = FileAccess(self.xMSF)
self.sPath = self.myPathSelection.getSelectedPath()
if not self.sPath or not os.path.exists(self.sPath):
self.myPathSelection.triggerPathPicker()
@@ -388,7 +384,7 @@ class AgendaWizardDialogImpl(AgendaWizardDialog):
def closeDocument(self):
try:
- xCloseable = self.myAgendaDoc.xFrame.close(False)
+ self.myAgendaDoc.xFrame.close(False)
except CloseVetoException:
traceback.print_exc()
diff --git a/wizards/com/sun/star/wizards/agenda/CGTopic.py b/wizards/com/sun/star/wizards/agenda/CGTopic.py
index 240ad0e..c094363 100644
--- a/wizards/com/sun/star/wizards/agenda/CGTopic.py
+++ b/wizards/com/sun/star/wizards/agenda/CGTopic.py
@@ -41,7 +41,6 @@ class CGTopic(ConfigGroup):
self.cp_Responsible = str()
self.cp_Time = str()
else:
- num = row[0].Value
self.cp_Index = int(row[0].Value[:-1])
self.cp_Topic = row[1].Value
self.cp_Responsible = row[2].Value
diff --git a/wizards/com/sun/star/wizards/agenda/TopicsControl.py b/wizards/com/sun/star/wizards/agenda/TopicsControl.py
index 65af661..8e7dbc2 100644
--- a/wizards/com/sun/star/wizards/agenda/TopicsControl.py
+++ b/wizards/com/sun/star/wizards/agenda/TopicsControl.py
@@ -16,9 +16,8 @@
# the License at http://www.apache.org/licenses/LICENSE-2.0 .
#
import uno
-from .CGTopic import CGTopic
from ..ui.ControlScroller import ControlScroller, PropertyNames, traceback, \
- HelpIds, UnoDialog
+ HelpIds
from .AgendaWizardDialogConst import HID
from ..common.Properties import Properties
from ..ui.event.CommonListener import FocusListenerProcAdapter, \
@@ -436,8 +435,8 @@ class TopicsControl(ControlScroller):
if (event.KeyCode == TAB) and \
(event.Modifiers == SHIFT):
if self.nscrollvalue > 0:
- setScrollValue(self.nscrollvalue - 1)
- focus(self.lastTime)
+ self.setScrollValue(self.nscrollvalue - 1)
+ self.focus(self.lastTime)
'''
sets focus to the given control.
diff --git a/wizards/com/sun/star/wizards/common/ConfigGroup.py b/wizards/com/sun/star/wizards/common/ConfigGroup.py
index bd05981..200d4ef 100644
--- a/wizards/com/sun/star/wizards/common/ConfigGroup.py
+++ b/wizards/com/sun/star/wizards/common/ConfigGroup.py
@@ -16,7 +16,6 @@
# the License at http://www.apache.org/licenses/LICENSE-2.0 .
#
import inspect
-from .Configuration import Configuration
class ConfigGroup(object):
diff --git a/wizards/com/sun/star/wizards/common/ConfigSet.py b/wizards/com/sun/star/wizards/common/ConfigSet.py
index 79ae0e3..d4cc7e4 100644
--- a/wizards/com/sun/star/wizards/common/ConfigSet.py
+++ b/wizards/com/sun/star/wizards/common/ConfigSet.py
@@ -17,7 +17,6 @@
#
import traceback
from .ConfigGroup import ConfigGroup
-from .Configuration import Configuration
class ConfigSet(ConfigGroup):
'''
diff --git a/wizards/com/sun/star/wizards/common/Desktop.py b/wizards/com/sun/star/wizards/common/Desktop.py
index f91caa9..4a18ca0 100644
--- a/wizards/com/sun/star/wizards/common/Desktop.py
+++ b/wizards/com/sun/star/wizards/common/Desktop.py
@@ -18,7 +18,7 @@
import uno
import traceback
-from com.sun.star.frame.FrameSearchFlag import ALL, PARENT
+from com.sun.star.frame.FrameSearchFlag import ALL
from com.sun.star.util import URL
from com.sun.star.i18n.KParseTokens import ANY_LETTER_OR_NUMBER, ASC_UNDERSCORE
diff --git a/wizards/com/sun/star/wizards/common/NumberFormatter.py b/wizards/com/sun/star/wizards/common/NumberFormatter.py
index 316659f..9cb1763 100644
--- a/wizards/com/sun/star/wizards/common/NumberFormatter.py
+++ b/wizards/com/sun/star/wizards/common/NumberFormatter.py
@@ -17,8 +17,6 @@
#
import traceback
from com.sun.star.lang import Locale
-from com.sun.star.util.NumberFormat import \
- DATE, LOGICAL, DATETIME, TEXT, NUMBER
class NumberFormatter(object):
diff --git a/wizards/com/sun/star/wizards/common/Resource.py b/wizards/com/sun/star/wizards/common/Resource.py
index 450565e..e35820c 100644
--- a/wizards/com/sun/star/wizards/common/Resource.py
+++ b/wizards/com/sun/star/wizards/common/Resource.py
@@ -16,7 +16,6 @@
# the License at http://www.apache.org/licenses/LICENSE-2.0 .
#
import traceback
-from .Configuration import Configuration
from com.sun.star.awt.VclWindowPeerAttribute import OK
diff --git a/wizards/com/sun/star/wizards/document/OfficeDocument.py b/wizards/com/sun/star/wizards/document/OfficeDocument.py
index 35d3183..3886f1e 100644
--- a/wizards/com/sun/star/wizards/document/OfficeDocument.py
+++ b/wizards/com/sun/star/wizards/document/OfficeDocument.py
@@ -18,7 +18,6 @@
import uno
import traceback
from unohelper import systemPathToFileUrl, absolutize
-from ..ui.event.CommonListener import TerminateListenerProcAdapter
from ..common.Desktop import Desktop
from com.sun.star.awt import WindowDescriptor
diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py
index 9328757..bbc281c 100644
--- a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py
+++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py
@@ -148,7 +148,6 @@ class FaxWizardDialogImpl(FaxWizardDialog):
self.switchToStep(self.getCurrentStep(), self.nMaxStep)
endWizard = True
try:
- fileAccess = FileAccess(self.xMSF)
self.sPath = self.myPathSelection.getSelectedPath()
if not self.sPath or not os.path.exists(self.sPath):
self.myPathSelection.triggerPathPicker()
diff --git a/wizards/com/sun/star/wizards/text/TextDocument.py b/wizards/com/sun/star/wizards/text/TextDocument.py
index aae3d59..b52f885 100644
--- a/wizards/com/sun/star/wizards/text/TextDocument.py
+++ b/wizards/com/sun/star/wizards/text/TextDocument.py
@@ -25,8 +25,6 @@ from ..common.Desktop import Desktop
from ..common.Configuration import Configuration
from ..common.NumberFormatter import NumberFormatter
-from com.sun.star.container import NoSuchElementException
-from com.sun.star.lang import WrappedTargetException
from com.sun.star.i18n.NumberFormatIndex import DATE_SYS_DDMMYY
from com.sun.star.view.DocumentZoomType import ENTIRE_PAGE
from com.sun.star.beans.PropertyState import DIRECT_VALUE
diff --git a/wizards/com/sun/star/wizards/text/TextElement.py b/wizards/com/sun/star/wizards/text/TextElement.py
index 840c70e..57aa4ea 100644
--- a/wizards/com/sun/star/wizards/text/TextElement.py
+++ b/wizards/com/sun/star/wizards/text/TextElement.py
@@ -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 traceback
class TextElement(object):
diff --git a/wizards/com/sun/star/wizards/ui/ControlScroller.py b/wizards/com/sun/star/wizards/ui/ControlScroller.py
index 2f6d4a4..e6dfc12 100644
--- a/wizards/com/sun/star/wizards/ui/ControlScroller.py
+++ b/wizards/com/sun/star/wizards/ui/ControlScroller.py
@@ -21,7 +21,7 @@ from ..common.Desktop import Desktop
from ..common.PropertyNames import PropertyNames
from ..common.HelpIds import HelpIds
-from com.sun.star.awt.ScrollBarOrientation import HORIZONTAL, VERTICAL
+from com.sun.star.awt.ScrollBarOrientation import VERTICAL
class ControlScroller(object):
diff --git a/wizards/com/sun/star/wizards/ui/WizardDialog.py b/wizards/com/sun/star/wizards/ui/WizardDialog.py
index fc1ce41..cd1d921 100644
--- a/wizards/com/sun/star/wizards/ui/WizardDialog.py
+++ b/wizards/com/sun/star/wizards/ui/WizardDialog.py
@@ -20,11 +20,8 @@ import traceback
from abc import ABCMeta, abstractmethod
from .UnoDialog2 import UnoDialog2, Desktop, PropertyNames, UIConsts, \
ItemListenerProcAdapter
-from .event.CommonListener import TerminateListenerProcAdapter
from ..common.Resource import Resource
from ..common.HelpIds import HelpIds
-from ..document.OfficeDocument import OfficeDocument
-from ..text.TextDocument import TextDocument
from com.sun.star.lang import NoSuchMethodException
from com.sun.star.frame import TerminationVetoException
diff --git a/wizards/com/sun/star/wizards/ui/event/DataAware.py b/wizards/com/sun/star/wizards/ui/event/DataAware.py
index 70e52df..3a4a0ef 100644
--- a/wizards/com/sun/star/wizards/ui/event/DataAware.py
+++ b/wizards/com/sun/star/wizards/ui/event/DataAware.py
@@ -18,7 +18,6 @@
import traceback
import uno
from abc import ABCMeta, abstractmethod
-from ...common.PropertyNames import PropertyNames
from com.sun.star.util import Date
from com.sun.star.util import Time
diff --git a/wizards/com/sun/star/wizards/ui/event/ListDataEvent.py b/wizards/com/sun/star/wizards/ui/event/ListDataEvent.py
index 0aeb914..50588dd 100644
--- a/wizards/com/sun/star/wizards/ui/event/ListDataEvent.py
+++ b/wizards/com/sun/star/wizards/ui/event/ListDataEvent.py
@@ -14,9 +14,7 @@
# 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 .
-from com.sun.star.document import EventObject
-#class ListDataEvent(EventObject):
class ListDataEvent:
INTERVAL_ADDED = 1
diff --git a/wizards/com/sun/star/wizards/ui/event/ListDataListener.py b/wizards/com/sun/star/wizards/ui/event/ListDataListener.py
index 56b4c6f..e3f7465 100644
--- a/wizards/com/sun/star/wizards/ui/event/ListDataListener.py
+++ b/wizards/com/sun/star/wizards/ui/event/ListDataListener.py
@@ -16,7 +16,6 @@
# the License at http://www.apache.org/licenses/LICENSE-2.0 .
#
from abc import abstractmethod
-from com.sun.star.script import EventListener
class ListDataListener():
diff --git a/wizards/com/sun/star/wizards/ui/event/RadioDataAware.py b/wizards/com/sun/star/wizards/ui/event/RadioDataAware.py
index 9a263c1..67ba0ce 100644
--- a/wizards/com/sun/star/wizards/ui/event/RadioDataAware.py
+++ b/wizards/com/sun/star/wizards/ui/event/RadioDataAware.py
@@ -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 time
from .CommonListener import ItemListenerProcAdapter
from .DataAware import DataAware
diff --git a/wizards/com/sun/star/wizards/ui/event/TaskEvent.py b/wizards/com/sun/star/wizards/ui/event/TaskEvent.py
index 291a1896..69eaec8 100644
--- a/wizards/com/sun/star/wizards/ui/event/TaskEvent.py
+++ b/wizards/com/sun/star/wizards/ui/event/TaskEvent.py
@@ -14,9 +14,7 @@
# 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 .
-from com.sun.star.document import EventObject
-#class TaskEvent(EventObject):
class TaskEvent:
TASK_STARTED = 1
diff --git a/wizards/com/sun/star/wizards/ui/event/UnoDataAware.py b/wizards/com/sun/star/wizards/ui/event/UnoDataAware.py
index 1254e98..04ba03a 100644
--- a/wizards/com/sun/star/wizards/ui/event/UnoDataAware.py
+++ b/wizards/com/sun/star/wizards/ui/event/UnoDataAware.py
@@ -17,9 +17,8 @@
#
import uno
from .CommonListener import ItemListenerProcAdapter, TextListenerProcAdapter
-from .DataAware import DataAware, PropertyNames, datetime, Date, Time
-
-from com.sun.star.script import CannotConvertException
+from .DataAware import DataAware, datetime, Date, Time
+from ...common.PropertyNames import PropertyNames
'''
@author rpiterman
commit 0ca978e9dff389b950d0577cd9120e3149c6ed6f
Author: Xisco Fauli <anistenis at gmail.com>
Date: Sun Nov 24 15:25:14 2013 +0100
pyweb: some pyflakes love
Change-Id: I317656ca26eec5946959ac21e7da335196dd8548
diff --git a/wizards/com/sun/star/wizards/web/AbstractErrorHandler.py b/wizards/com/sun/star/wizards/web/AbstractErrorHandler.py
index 5f79384..3f9a102 100644
--- a/wizards/com/sun/star/wizards/web/AbstractErrorHandler.py
+++ b/wizards/com/sun/star/wizards/web/AbstractErrorHandler.py
@@ -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
diff --git a/wizards/com/sun/star/wizards/web/BackgroundsDialog.py b/wizards/com/sun/star/wizards/web/BackgroundsDialog.py
index 67fa943..7828559 100644
--- a/wizards/com/sun/star/wizards/web/BackgroundsDialog.py
+++ b/wizards/com/sun/star/wizards/web/BackgroundsDialog.py
@@ -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
diff --git a/wizards/com/sun/star/wizards/web/ErrorHandler.py b/wizards/com/sun/star/wizards/web/ErrorHandler.py
index 093e498..743ecf5 100644
--- a/wizards/com/sun/star/wizards/web/ErrorHandler.py
+++ b/wizards/com/sun/star/wizards/web/ErrorHandler.py
@@ -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:
diff --git a/wizards/com/sun/star/wizards/web/FTPDialog.py b/wizards/com/sun/star/wizards/web/FTPDialog.py
index c3921eb..17d8690 100644
--- a/wizards/com/sun/star/wizards/web/FTPDialog.py
+++ b/wizards/com/sun/star/wizards/web/FTPDialog.py
@@ -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.
diff --git a/wizards/com/sun/star/wizards/web/LogTaskListener.py b/wizards/com/sun/star/wizards/web/LogTaskListener.py
deleted file mode 100644
index a1fba5f..0000000
--- a/wizards/com/sun/star/wizards/web/LogTaskListener.py
+++ /dev/null
@@ -1,49 +0,0 @@
-#
-# 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;
diff --git a/wizards/com/sun/star/wizards/web/Process.py b/wizards/com/sun/star/wizards/web/Process.py
index e0044d9..b138651 100644
--- a/wizards/com/sun/star/wizards/web/Process.py
+++ b/wizards/com/sun/star/wizards/web/Process.py
@@ -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
diff --git a/wizards/com/sun/star/wizards/web/StatusDialog.py b/wizards/com/sun/star/wizards/web/StatusDialog.py
index 5b353cc..caecdd2 100644
--- a/wizards/com/sun/star/wizards/web/StatusDialog.py
+++ b/wizards/com/sun/star/wizards/web/StatusDialog.py
@@ -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)
diff --git a/wizards/com/sun/star/wizards/web/TOCPreview.py b/wizards/com/sun/star/wizards/web/TOCPreview.py
index ad27afd..9833984 100644
--- a/wizards/com/sun/star/wizards/web/TOCPreview.py
+++ b/wizards/com/sun/star/wizards/web/TOCPreview.py
@@ -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
diff --git a/wizards/com/sun/star/wizards/web/WWD_Events.py b/wizards/com/sun/star/wizards/web/WWD_Events.py
index 50d5bc7..d9ceec7 100644
--- a/wizards/com/sun/star/wizards/web/WWD_Events.py
+++ b/wizards/com/sun/star/wizards/web/WWD_Events.py
@@ -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):
diff --git a/wizards/com/sun/star/wizards/web/WWD_General.py b/wizards/com/sun/star/wizards/web/WWD_General.py
index cecd51e..58c3563 100644
--- a/wizards/com/sun/star/wizards/web/WWD_General.py
+++ b/wizards/com/sun/star/wizards/web/WWD_General.py
@@ -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
diff --git a/wizards/com/sun/star/wizards/web/WWD_Startup.py b/wizards/com/sun/star/wizards/web/WWD_Startup.py
index b2dfecd..63c780d 100644
--- a/wizards/com/sun/star/wizards/web/WWD_Startup.py
+++ b/wizards/com/sun/star/wizards/web/WWD_Startup.py
@@ -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(
diff --git a/wizards/com/sun/star/wizards/web/WebConfigSet.py b/wizards/com/sun/star/wizards/web/WebConfigSet.py
index 92640dd..4e97abc 100644
--- a/wizards/com/sun/star/wizards/web/WebConfigSet.py
+++ b/wizards/com/sun/star/wizards/web/WebConfigSet.py
@@ -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):
diff --git a/wizards/com/sun/star/wizards/web/WebWizardDialog.py b/wizards/com/sun/star/wizards/web/WebWizardDialog.py
index 80b221c..388cf01 100644
--- a/wizards/com/sun/star/wizards/web/WebWizardDialog.py
+++ b/wizards/com/sun/star/wizards/web/WebWizardDialog.py
@@ -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 *
diff --git a/wizards/com/sun/star/wizards/web/data/CGDocument.py b/wizards/com/sun/star/wizards/web/data/CGDocument.py
index c359faf..795fb8f 100644
--- a/wizards/com/sun/star/wizards/web/data/CGDocument.py
+++ b/wizards/com/sun/star/wizards/web/data/CGDocument.py
@@ -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
diff --git a/wizards/com/sun/star/wizards/web/data/CGLayout.py b/wizards/com/sun/star/wizards/web/data/CGLayout.py
index 99396a2..e7bb699 100644
--- a/wizards/com/sun/star/wizards/web/data/CGLayout.py
+++ b/wizards/com/sun/star/wizards/web/data/CGLayout.py
@@ -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]
diff --git a/wizards/com/sun/star/wizards/web/data/CGSession.py b/wizards/com/sun/star/wizards/web/data/CGSession.py
index bc1c984..52d660b 100644
--- a/wizards/com/sun/star/wizards/web/data/CGSession.py
+++ b/wizards/com/sun/star/wizards/web/data/CGSession.py
@@ -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
diff --git a/wizards/com/sun/star/wizards/web/data/CGSettings.py b/wizards/com/sun/star/wizards/web/data/CGSettings.py
index 19e5e0e..308dab7 100644
--- a/wizards/com/sun/star/wizards/web/data/CGSettings.py
+++ b/wizards/com/sun/star/wizards/web/data/CGSettings.py
@@ -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):
diff --git a/wizards/com/sun/star/wizards/web/export/AbstractExporter.py b/wizards/com/sun/star/wizards/web/export/AbstractExporter.py
index 32936f3..575911f 100644
--- a/wizards/com/sun/star/wizards/web/export/AbstractExporter.py
+++ b/wizards/com/sun/star/wizards/web/export/AbstractExporter.py
@@ -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 *
diff --git a/wizards/com/sun/star/wizards/web/export/ConfiguredExporter.py b/wizards/com/sun/star/wizards/web/export/ConfiguredExporter.py
index 9a0f1ed..8e79065 100644
--- a/wizards/com/sun/star/wizards/web/export/ConfiguredExporter.py
+++ b/wizards/com/sun/star/wizards/web/export/ConfiguredExporter.py
@@ -48,4 +48,3 @@ class ConfiguredExporter(FilterExporter):
if (s == "true"):
return True
return None
-
diff --git a/wizards/com/sun/star/wizards/web/export/FilterExporter.py b/wizards/com/sun/star/wizards/web/export/FilterExporter.py
index 6f4f7e7..87ed287 100644
--- a/wizards/com/sun/star/wizards/web/export/FilterExporter.py
+++ b/wizards/com/sun/star/wizards/web/export/FilterExporter.py
@@ -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
commit 59e09804346724063ea39a11b20d65e79ce16c95
Author: Xisco Fauli <anistenis at gmail.com>
Date: Sun Nov 24 14:08:16 2013 +0100
pyletter: Some pyflakes love
Change-Id: I60d921ea27e995ffc4e18995993d961dc91543b3
diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py
index 1ff5f1c..6560e52 100644
--- a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py
+++ b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py
@@ -20,7 +20,6 @@ import os.path
from .LetterWizardDialog import LetterWizardDialog, uno, HelpIds, HID
from .LetterDocument import LetterDocument, BusinessPaperObject
from .CGLetterWizard import CGLetterWizard
-from ..common.NoValidPathException import NoValidPathException
from ..common.FileAccess import FileAccess
from ..common.Configuration import Configuration
from ..common.SystemDialog import SystemDialog
@@ -34,7 +33,6 @@ from ..text.TextFieldHandler import TextFieldHandler
from ..document.OfficeDocument import OfficeDocument
from com.sun.star.awt.VclWindowPeerAttribute import YES_NO, DEF_NO
-from com.sun.star.uno import RuntimeException
from com.sun.star.util import CloseVetoException
from com.sun.star.view.DocumentZoomType import OPTIMAL
from com.sun.star.document.UpdateDocMode import FULL_UPDATE
@@ -169,7 +167,6 @@ class LetterWizardDialogImpl(LetterWizardDialog):
self.switchToStep(self.getCurrentStep(), self.nMaxStep)
endWizard = True
try:
- fileAccess = FileAccess(self.xMSF)
self.sPath = self.myPathSelection.getSelectedPath()
if not self.sPath or not os.path.exists(self.sPath):
self.myPathSelection.triggerPathPicker()
@@ -493,9 +490,7 @@ class LetterWizardDialogImpl(LetterWizardDialog):
self.myLetterDoc.xTextDocument, " ", iFrameWidth, iReceiverHeight,
iFrameX, iFrameY - iReceiverHeight)
self.setPossibleAddressReceiver(False)
- except NoSuchElementException:
- traceback.print_exc()
- except WrappedTargetException:
+ except Exception:
traceback.print_exc()
if self.chkPaperCompanyAddress.State != 0:
More information about the Libreoffice-commits
mailing list