pywizards: remove unused methods
Change-Id: I1803b7b4bbfed1e3509a8561ba82fae9ccf4412e Reviewed-on: https://gerrit.libreoffice.org/687 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
This commit is contained in:
committed by
Michael Stahl
parent
90c128e090
commit
46325e3a2e
@@ -49,16 +49,6 @@ class Desktop(object):
|
||||
xFrame = self.getActiveFrame(_xMSF)
|
||||
return xFrame.getController().getModel()
|
||||
|
||||
@classmethod
|
||||
def getActiveTextDocument(self, _xMSF):
|
||||
xComponent = getActiveComponent(_xMSF)
|
||||
return xComponent #Text
|
||||
|
||||
@classmethod
|
||||
def getActiveSpreadsheetDocument(self, _xMSF):
|
||||
xComponent = getActiveComponent(_xMSF)
|
||||
return xComponent
|
||||
|
||||
@classmethod
|
||||
def getDispatcher(self, xMSF, xFrame, _stargetframe, oURL):
|
||||
try:
|
||||
@@ -166,16 +156,6 @@ class OfficePathRetriever:
|
||||
pass
|
||||
return sTemplatePath
|
||||
|
||||
@classmethod
|
||||
def getUserTemplatePath(self, _xMSF):
|
||||
sUserTemplatePath = ""
|
||||
try:
|
||||
sUserTemplatePath = FileAccess.getOfficePath(_xMSF,
|
||||
"Template", "user", "")
|
||||
except NoValidPathException, nopathexception:
|
||||
pass
|
||||
return sUserTemplatePath
|
||||
|
||||
@classmethod
|
||||
def getBitmapPath(self, _xMSF):
|
||||
sBitmapPath = ""
|
||||
@@ -186,62 +166,3 @@ class OfficePathRetriever:
|
||||
pass
|
||||
|
||||
return sBitmapPath
|
||||
|
||||
@classmethod
|
||||
def getWorkPath(self, _xMSF):
|
||||
sWorkPath = ""
|
||||
try:
|
||||
sWorkPath = FileAccess.getOfficePath(_xMSF, "Work", "", "")
|
||||
|
||||
except NoValidPathException, nopathexception:
|
||||
pass
|
||||
|
||||
return sWorkPath
|
||||
|
||||
@classmethod
|
||||
def createStringSubstitution(self, xMSF):
|
||||
xPathSubst = None
|
||||
try:
|
||||
xPathSubst = xMSF.createInstance(
|
||||
"com.sun.star.util.PathSubstitution")
|
||||
except Exception, e:
|
||||
traceback.print_exc()
|
||||
|
||||
if xPathSubst != None:
|
||||
return xPathSubst
|
||||
else:
|
||||
return None
|
||||
|
||||
'''This method searches (and hopefully finds...) a frame
|
||||
with a componentWindow.
|
||||
It does it in three phases:
|
||||
1. Check if the given desktop argument has a componentWindow.
|
||||
If it is null, the myFrame argument is taken.
|
||||
2. Go up the tree of frames and search a frame with a component window.
|
||||
3. Get from the desktop all the components, and give the first one
|
||||
which has a frame.
|
||||
@param xMSF
|
||||
@param myFrame
|
||||
@param desktop
|
||||
@return
|
||||
@throws NoSuchElementException
|
||||
@throws WrappedTargetException
|
||||
'''
|
||||
|
||||
@classmethod
|
||||
def findAFrame(self, xMSF, myFrame, desktop):
|
||||
if desktop == None:
|
||||
desktop = myFrame
|
||||
#we go up in the tree...
|
||||
|
||||
while desktop != None and desktop.getComponentWindow() == None:
|
||||
desktop = desktop.findFrame("_parent", FrameSearchFlag.PARENT)
|
||||
if desktop == None:
|
||||
e = Desktop.getDesktop(xMSF).getComponents().createEnumeration()
|
||||
while e.hasMoreElements():
|
||||
xModel = (e.nextElement()).getObject()
|
||||
xFrame = xModel.getCurrentController().getFrame()
|
||||
if xFrame != None and xFrame.getComponentWindow() != None:
|
||||
return xFrame
|
||||
|
||||
return desktop
|
||||
|
Reference in New Issue
Block a user