openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #03526
[Merge] lp:~crichter/openlp/bugfixing into lp:openlp
rimach has proposed merging lp:~crichter/openlp/bugfixing into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
change using of pipe instead of socket for soffice communication via uno.
--
https://code.launchpad.net/~crichter/openlp/bugfixing/+merge/35588
Your team OpenLP Core is requested to review the proposed merge of lp:~crichter/openlp/bugfixing into lp:openlp.
=== modified file 'openlp/plugins/presentations/lib/impresscontroller.py'
--- openlp/plugins/presentations/lib/impresscontroller.py 2010-07-31 00:05:27 +0000
+++ openlp/plugins/presentations/lib/impresscontroller.py 2010-09-15 20:54:48 +0000
@@ -98,7 +98,12 @@
self.manager._FlagAsMethod(u'Bridge_GetValueObject')
else:
# -headless
- cmd = u'openoffice.org -nologo -norestore -minimized -invisible -nofirststartwizard -accept="socket,host=localhost,port=2002;urp;"'
+ #connection_type = u'socket'
+ connection_type = u'pipe,name=openlp_pipe:'
+ cmd = u'openoffice.org -nologo -norestore -minimized ' \
+ + u'-invisible -nofirststartwizard ' \
+ + '-accept="' + connection_type \
+ + u'socket,host=localhost,port=2002;urp;"'
self.process = QtCore.QProcess()
self.process.startDetached(cmd)
self.process.waitForStarted()
@@ -117,11 +122,14 @@
u'UnoUrlResolver')
resolver = context.ServiceManager.createInstanceWithContext(
u'com.sun.star.bridge.UnoUrlResolver', context)
+ #connection_type = u'socket'
+ connection_type = u'pipe,name=openlp_pipe:'
while ctx is None and loop < 3:
try:
log.debug(u'get UNO Desktop Openoffice - resolve')
- ctx = resolver.resolve(u'uno:socket,host=localhost,port=2002;'
- u'urp;StarOffice.ComponentContext')
+ ctx = resolver.resolve(u'uno:' + connection_type \
+ + u',host=localhost,' \
+ + u'port=2002;urp;StarOffice.ComponentContext')
except:
log.exception(u'Unable to find running instance ')
self.start_process()
=== modified file 'openlp/plugins/songs/lib/oooimport.py'
--- openlp/plugins/songs/lib/oooimport.py 2010-09-05 15:16:48 +0000
+++ openlp/plugins/songs/lib/oooimport.py 2010-09-15 20:54:48 +0000
@@ -94,6 +94,8 @@
Start OpenOffice.org process
TODO: The presentation/Impress plugin may already have it running
"""
+ #connection_type = u'socket'
+ connection_type = u'pipe,name=openlp_pipe:'
if os.name == u'nt':
self.start_ooo_process()
self.desktop = self.manager.createInstance(
@@ -106,8 +108,9 @@
loop = 0
while ctx is None and loop < 5:
try:
- ctx = resolver.resolve(u'uno:socket,host=localhost,' \
- + 'port=2002;urp;StarOffice.ComponentContext')
+ ctx = resolver.resolve(u'uno:' + connection_type \
+ + u',host=localhost,' \
+ + u'port=2002;urp;StarOffice.ComponentContext')
except:
pass
self.start_ooo_process()
@@ -117,6 +120,8 @@
"com.sun.star.frame.Desktop", ctx)
def start_ooo_process(self):
+ #connection_type = u'socket'
+ connection_type = u'pipe,name=openlp_pipe:'
try:
if os.name == u'nt':
self.manager = Dispatch(u'com.sun.star.ServiceManager')
@@ -125,7 +130,8 @@
else:
cmd = u'openoffice.org -nologo -norestore -minimized ' \
+ u'-invisible -nofirststartwizard ' \
- + '-accept="socket,host=localhost,port=2002;urp;"'
+ + '-accept="' + connection_type \
+ + u'socket,host=localhost,port=2002;urp;"'
process = QtCore.QProcess()
process.startDetached(cmd)
process.waitForStarted()
Follow ups