summaryrefslogtreecommitdiff
path: root/wizards/com/sun/star/wizards/web
diff options
context:
space:
mode:
Diffstat (limited to 'wizards/com/sun/star/wizards/web')
-rw-r--r--wizards/com/sun/star/wizards/web/CallWizard.py17
-rw-r--r--wizards/com/sun/star/wizards/web/WWD_Events.py12
-rw-r--r--wizards/com/sun/star/wizards/web/WebWizard.py43
-rw-r--r--wizards/com/sun/star/wizards/web/WebWizardDialogResources.py12
4 files changed, 24 insertions, 60 deletions
diff --git a/wizards/com/sun/star/wizards/web/CallWizard.py b/wizards/com/sun/star/wizards/web/CallWizard.py
index 1a98a313d83c..2f199f5516c5 100644
--- a/wizards/com/sun/star/wizards/web/CallWizard.py
+++ b/wizards/com/sun/star/wizards/web/CallWizard.py
@@ -18,7 +18,8 @@
import unohelper
import traceback
-from .WebWizard import WebWizard
+from .WWD_Events import WWD_Events
+from ..common.Desktop import Desktop
from com.sun.star.task import XJobExecutor
@@ -31,7 +32,7 @@ class CallWizard(unohelper.Base, XJobExecutor):
def trigger(self, args):
try:
- ww = WebWizard(self.ctx.ServiceManager)
+ ww = WWD_Events(self.ctx.ServiceManager)
ww.show()
ww.cleanup()
except Exception as e:
@@ -39,6 +40,18 @@ class CallWizard(unohelper.Base, XJobExecutor):
" message " + str(e) + " args " + str(e.args) +
traceback.format_exc())
+ @classmethod
+ def callRemote(self):
+ ConnectStr = \
+ "uno:socket,host=localhost,port=2002;urp;StarOffice.ComponentContext"
+ try:
+ xmsf = Desktop.connect(ConnectStr)
+ ww = WWD_Events(xmsf)
+ ww.show()
+ ww.cleanup()
+ except Exception:
+ traceback.print_exc()
+
# pythonloader looks for a static g_ImplementationHelper variable
g_ImplementationHelper = unohelper.ImplementationHelper()
diff --git a/wizards/com/sun/star/wizards/web/WWD_Events.py b/wizards/com/sun/star/wizards/web/WWD_Events.py
index d9ceec7e944e..72b393ec69f8 100644
--- a/wizards/com/sun/star/wizards/web/WWD_Events.py
+++ b/wizards/com/sun/star/wizards/web/WWD_Events.py
@@ -65,18 +65,6 @@ class WWD_Events(WWD_Startup):
self.iconsDialog = None
self.docPreview = None
- @classmethod
- def main(self, args):
- ConnectStr = \
- "uno:socket,host=localhost,port=2002;urp;StarOffice.ComponentContext"
- try:
- xmsf = Desktop.connect(ConnectStr)
- ww = WWD_Events(xmsf)
- ww.show()
- ww.cleanup()
- except Exception:
- traceback.print_exc()
-
def leaveStep(self, nOldStep, nNewStep):
pass
diff --git a/wizards/com/sun/star/wizards/web/WebWizard.py b/wizards/com/sun/star/wizards/web/WebWizard.py
deleted file mode 100644
index a576ea812319..000000000000
--- a/wizards/com/sun/star/wizards/web/WebWizard.py
+++ /dev/null
@@ -1,43 +0,0 @@
-#
-# This file is part of the LibreOffice project.
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-# This file incorporates work covered by the following license notice:
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed
-# with this work for additional information regarding copyright
-# ownership. The ASF licenses this file to you under the Apache
-# License, Version 2.0 (the "License"); you may not use this file
-# except in compliance with the License. You may obtain a copy of
-# the License at http://www.apache.org/licenses/LICENSE-2.0 .
-#
-import traceback
-
-from ..common.Desktop import Desktop
-from .WWD_Events import WWD_Events
-
-# The last class in the WebWizard Dialog class hirarchy.
-# Has no functionality, is just nice to have it instanciated.
-class WebWizard(WWD_Events):
-
- def __init__(self, xmsf):
- super(WebWizard, self).__init__(xmsf)
-
- @classmethod
- def main(self):
- #Call the wizard remotely(see README)
- try:
- ConnectStr = \
- "uno:socket,host=localhost,port=2002;urp;StarOffice.ComponentContext"
- xLocMSF = Desktop.connect(ConnectStr)
- ww = WebWizard(xLocMSF)
- ww.show()
- ww.cleanup()
- except Exception as e:
- print ("Wizard failure exception " + str(type(e)) +
- " message " + str(e) + " args " + str(e.args) +
- traceback.format_exc())
diff --git a/wizards/com/sun/star/wizards/web/WebWizardDialogResources.py b/wizards/com/sun/star/wizards/web/WebWizardDialogResources.py
index ea456600b35a..4d851b246b0d 100644
--- a/wizards/com/sun/star/wizards/web/WebWizardDialogResources.py
+++ b/wizards/com/sun/star/wizards/web/WebWizardDialogResources.py
@@ -31,9 +31,15 @@ class WebWizardDialogResources(Resource):
def __init__(self, xmsf):
super(WebWizardDialogResources,self).__init__(xmsf,
WebWizardDialogResources.MODULE_NAME)
- self.resbtnDocUp_value = chr(8743)
- self.resbtnDocDown_value = chr(8744)
-
+ try:
+ #python 3
+ self.resbtnDocUp_value = chr(8743)
+ self.resbtnDocDown_value = chr(8744)
+ except ValueError:
+ #python 2
+ self.resbtnDocUp_value = unichr(8743)
+ self.resbtnDocDown_value = unichr(8744)
+
#Delete the String, uncomment the getResText method
self.resWebWizardDialog_title = self.getResText(
WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 1)