pywizards: Some more pyflakes love

Change-Id: I3da78c004068cd7306ef79f5d019ab5bf07cac0b
This commit is contained in:
Xisco Fauli
2013-11-24 18:16:22 +01:00
parent 0ca978e9df
commit 76ee4517c1
21 changed files with 9 additions and 47 deletions

View File

@@ -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.

View File

@@ -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):
@@ -259,9 +259,6 @@ class AgendaWizardDialogImpl(AgendaWizardDialog):
self.myAgendaDoc.redrawTitle("cbLocation")
#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)
@@ -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()

View File

@@ -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

View File

@@ -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.

View File

@@ -16,7 +16,6 @@
# the License at http://www.apache.org/licenses/LICENSE-2.0 .
#
import inspect
from .Configuration import Configuration
class ConfigGroup(object):

View File

@@ -17,7 +17,6 @@
#
import traceback
from .ConfigGroup import ConfigGroup
from .Configuration import Configuration
class ConfigSet(ConfigGroup):
'''

View File

@@ -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

View File

@@ -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):

View File

@@ -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

View File

@@ -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

View File

@@ -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()

View File

@@ -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

View File

@@ -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):

View File

@@ -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):

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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():

View File

@@ -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

View File

@@ -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

View File

@@ -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