wizards/com/sun/star/wizards/common/Desktop.py | 79 ------------------------- 1 file changed, 79 deletions(-)
New commits: commit 46325e3a2ea376ea2d8b641051a5cbde20596aeb Author: Xisco Fauli <aniste...@gmail.com> Date: Sun Sep 23 17:39:48 2012 +0200 pywizards: remove unused methods Change-Id: I1803b7b4bbfed1e3509a8561ba82fae9ccf4412e Reviewed-on: https://gerrit.libreoffice.org/687 Reviewed-by: Michael Stahl <mst...@redhat.com> Tested-by: Michael Stahl <mst...@redhat.com> diff --git a/wizards/com/sun/star/wizards/common/Desktop.py b/wizards/com/sun/star/wizards/common/Desktop.py index 8f38f99..914be17 100644 --- a/wizards/com/sun/star/wizards/common/Desktop.py +++ b/wizards/com/sun/star/wizards/common/Desktop.py @@ -50,16 +50,6 @@ class Desktop(object): 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: oURLArray = range(1) @@ -167,16 +157,6 @@ class OfficePathRetriever: 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 = "" try: @@ -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 _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits