diff options
author | Xisco Fauli <anistenis@gmail.com> | 2012-09-23 17:39:48 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2012-09-24 13:52:15 +0000 |
commit | 46325e3a2ea376ea2d8b641051a5cbde20596aeb (patch) | |
tree | 3d0766c86774305b6795e90c051e7ec41f5b3333 /wizards | |
parent | 90c128e090da5ed0047a3d43bafc33f32d8b27b7 (diff) |
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>
Diffstat (limited to 'wizards')
-rw-r--r-- | wizards/com/sun/star/wizards/common/Desktop.py | 79 |
1 files changed, 0 insertions, 79 deletions
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 @@ -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 |