From 46325e3a2ea376ea2d8b641051a5cbde20596aeb Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Sun, 23 Sep 2012 17:39:48 +0200 Subject: pywizards: remove unused methods Change-Id: I1803b7b4bbfed1e3509a8561ba82fae9ccf4412e Reviewed-on: https://gerrit.libreoffice.org/687 Reviewed-by: Michael Stahl Tested-by: Michael Stahl --- wizards/com/sun/star/wizards/common/Desktop.py | 79 -------------------------- 1 file changed, 79 deletions(-) (limited to 'wizards') diff --git a/wizards/com/sun/star/wizards/common/Desktop.py b/wizards/com/sun/star/wizards/common/Desktop.py index 8f38f992b9d8..914be171e04b 100644 --- a/wizards/com/sun/star/wizards/common/Desktop.py +++ b/wizards/com/sun/star/wizards/common/Desktop.py @@ -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 -- cgit