diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-03-17 12:25:11 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-03-17 12:25:11 +0100 |
commit | 3099c70b11c7e5b80fe4dbe3dc99171fb38c6fc2 (patch) | |
tree | 63699b525800b2c6708e90b817853bb60be5f6d8 /wizards | |
parent | 5229726b4d4e7d76f410d221f8f8cd8abcfd5a19 (diff) |
Fix various XServiceInfo implementations
...to match what is recorded in the .component files
Change-Id: Ie548cd37872d3b8540222201afaac73040e65c8f
Diffstat (limited to 'wizards')
-rw-r--r-- | wizards/com/sun/star/wizards/agenda/CallWizard.py | 19 | ||||
-rw-r--r-- | wizards/com/sun/star/wizards/fax/CallWizard.py | 21 | ||||
-rw-r--r-- | wizards/com/sun/star/wizards/letter/CallWizard.py | 21 | ||||
-rw-r--r-- | wizards/com/sun/star/wizards/web/CallWizard.py | 19 |
4 files changed, 62 insertions, 18 deletions
diff --git a/wizards/com/sun/star/wizards/agenda/CallWizard.py b/wizards/com/sun/star/wizards/agenda/CallWizard.py index 79811cf5300c..2b784e2fe200 100644 --- a/wizards/com/sun/star/wizards/agenda/CallWizard.py +++ b/wizards/com/sun/star/wizards/agenda/CallWizard.py @@ -20,11 +20,16 @@ import traceback from .AgendaWizardDialogImpl import AgendaWizardDialogImpl, Desktop +from com.sun.star.lang import XServiceInfo from com.sun.star.task import XJobExecutor +# pythonloader looks for a static g_ImplementationHelper variable +g_ImplementationHelper = unohelper.ImplementationHelper() +g_implName = "com.sun.star.wizards.agenda.CallWizard" + # implement a UNO component by deriving from the standard unohelper.Base class # and from the interface(s) you want to implement. -class CallWizard(unohelper.Base, XJobExecutor): +class CallWizard(unohelper.Base, XJobExecutor, XServiceInfo): def __init__(self, ctx): # store the component context for later use self.ctx = ctx @@ -52,12 +57,18 @@ class CallWizard(unohelper.Base, XJobExecutor): " message " + str(e) + " args " + str(e.args) + traceback.format_exc()) -# pythonloader looks for a static g_ImplementationHelper variable -g_ImplementationHelper = unohelper.ImplementationHelper() + def getImplementationName(self): + return g_implName + + def supportsService(self, ServiceName): + return g_ImplementationHelper.supportsService(g_implName, ServiceName) + + def getSupportedServiceNames(self): + return g_ImplementationHelper.getSupportedServiceNames(g_implName) g_ImplementationHelper.addImplementation( \ CallWizard, # UNO object class - "com.sun.star.wizards.agenda.CallWizard", # implementation name + g_implName, # implementation name ("com.sun.star.task.Job",),) # list of implemented services # (the only service) diff --git a/wizards/com/sun/star/wizards/fax/CallWizard.py b/wizards/com/sun/star/wizards/fax/CallWizard.py index e40138fc5678..405c2c3c62cf 100644 --- a/wizards/com/sun/star/wizards/fax/CallWizard.py +++ b/wizards/com/sun/star/wizards/fax/CallWizard.py @@ -20,11 +20,16 @@ import traceback from .FaxWizardDialogImpl import FaxWizardDialogImpl, Desktop +from com.sun.star.lang import XServiceInfo from com.sun.star.task import XJobExecutor +# pythonloader looks for a static g_ImplementationHelper variable +g_ImplementationHelper = unohelper.ImplementationHelper() +g_implName = "com.sun.star.wizards.fax.CallWizard" + # implement a UNO component by deriving from the standard unohelper.Base class # and from the interface(s) you want to implement. -class CallWizard(unohelper.Base, XJobExecutor): +class CallWizard(unohelper.Base, XJobExecutor, XServiceInfo): def __init__(self, ctx): # store the component context for later use self.ctx = ctx @@ -51,13 +56,19 @@ class CallWizard(unohelper.Base, XJobExecutor): print ("Wizard failure exception " + str(type(e)) + " message " + str(e) + " args " + str(e.args) + traceback.format_exc()) - -# pythonloader looks for a static g_ImplementationHelper variable -g_ImplementationHelper = unohelper.ImplementationHelper() + + def getImplementationName(self): + return g_implName + + def supportsService(self, ServiceName): + return g_ImplementationHelper.supportsService(g_implName, ServiceName) + + def getSupportedServiceNames(self): + return g_ImplementationHelper.getSupportedServiceNames(g_implName) g_ImplementationHelper.addImplementation( \ CallWizard, # UNO object class - "com.sun.star.wizards.fax.CallWizard", # implemtenation name + g_implName, # implemtenation name ("com.sun.star.task.Job",),) # list of implemented services # (the only service) diff --git a/wizards/com/sun/star/wizards/letter/CallWizard.py b/wizards/com/sun/star/wizards/letter/CallWizard.py index c09b8bb71925..fc12e1b5e5cf 100644 --- a/wizards/com/sun/star/wizards/letter/CallWizard.py +++ b/wizards/com/sun/star/wizards/letter/CallWizard.py @@ -20,11 +20,16 @@ import traceback from .LetterWizardDialogImpl import LetterWizardDialogImpl, Desktop +from com.sun.star.lang import XServiceInfo from com.sun.star.task import XJobExecutor +# pythonloader looks for a static g_ImplementationHelper variable +g_ImplementationHelper = unohelper.ImplementationHelper() +g_implName = "com.sun.star.wizards.letter.CallWizard" + # implement a UNO component by deriving from the standard unohelper.Base class # and from the interface(s) you want to implement. -class CallWizard(unohelper.Base, XJobExecutor): +class CallWizard(unohelper.Base, XJobExecutor, XServiceInfo): def __init__(self, ctx): # store the component context for later use self.ctx = ctx @@ -51,13 +56,19 @@ class CallWizard(unohelper.Base, XJobExecutor): print ("Wizard failure exception " + str(type(e)) + " message " + str(e) + " args " + str(e.args) + traceback.format_exc()) - -# pythonloader looks for a static g_ImplementationHelper variable -g_ImplementationHelper = unohelper.ImplementationHelper() + + def getImplementationName(self): + return g_implName + + def supportsService(self, ServiceName): + return g_ImplementationHelper.supportsService(g_implName, ServiceName) + + def getSupportedServiceNames(self): + return g_ImplementationHelper.getSupportedServiceNames(g_implName) g_ImplementationHelper.addImplementation( \ CallWizard, # UNO object class - "com.sun.star.wizards.letter.CallWizard", # implementation name + g_implName, # implementation name ("com.sun.star.task.Job",),) # list of implemented services # (the only service) diff --git a/wizards/com/sun/star/wizards/web/CallWizard.py b/wizards/com/sun/star/wizards/web/CallWizard.py index cdaf00c9f2c2..6f5bd2360951 100644 --- a/wizards/com/sun/star/wizards/web/CallWizard.py +++ b/wizards/com/sun/star/wizards/web/CallWizard.py @@ -21,11 +21,16 @@ import traceback from .WWD_Events import WWD_Events from ..common.Desktop import Desktop +from com.sun.star.lang import XServiceInfo from com.sun.star.task import XJobExecutor +# pythonloader looks for a static g_ImplementationHelper variable +g_ImplementationHelper = unohelper.ImplementationHelper() +g_implName = "com.sun.star.wizards.web.CallWizard" + # implement a UNO component by deriving from the standard unohelper.Base class # and from the interface(s) you want to implement. -class CallWizard(unohelper.Base, XJobExecutor): +class CallWizard(unohelper.Base, XJobExecutor, XServiceInfo): def __init__(self, ctx): # store the component context for later use self.ctx = ctx @@ -52,12 +57,18 @@ class CallWizard(unohelper.Base, XJobExecutor): except Exception: traceback.print_exc() -# pythonloader looks for a static g_ImplementationHelper variable -g_ImplementationHelper = unohelper.ImplementationHelper() + def getImplementationName(self): + return g_implName + + def supportsService(self, ServiceName): + return g_ImplementationHelper.supportsService(g_implName, ServiceName) + + def getSupportedServiceNames(self): + return g_ImplementationHelper.getSupportedServiceNames(g_implName) g_ImplementationHelper.addImplementation( \ CallWizard, # UNO object class - "com.sun.star.wizards.web.CallWizard", # implementation name + g_implName, # implementation name ("com.sun.star.task.Job",),) # list of implemented services # (the only service) |