Bugzilla – Attachment 160087 Details for
Bug 129689
Crash in: libmergedlo.so launch libreoffice from a script FILEOPEN
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Script used
lo.py (text/x-python), 2.05 KB, created by
Joona Tolonen
on 2020-04-29 18:37:06 UTC
(
hide
)
Description:
Script used
Filename:
MIME Type:
Creator:
Joona Tolonen
Created:
2020-04-29 18:37:06 UTC
Size:
2.05 KB
patch
obsolete
>#!/bin/env python3 >import os, uno, time >#from PySide2.QtCore import Signal, Slot >from PySide2.QtCore import Signal, Slot >from subprocess import Popen >from pythonscript import ScriptContext >from pprint import pprint > >def dump(obj): > for attr in dir(obj): > print("obj.%s = %r" % (attr, getattr(obj, attr))) > >os.system('/usr/bin/loimpress --accept="socket,host=localhost,port=8100;urp" --norestore --view test.odp &>/dev/null &') > >#Popen(['/usr/bin/loimpress', '--accept="socket,host=localhost,port=8100;urp"', '--norestore', '--view', 'test.odp']) > ># for (roughly) the same namespace as from "inside" soffice >#XSCRIPTCONTEXT = ScriptContext(client, None, None) > >print("uno.getComponentContext") >local_context = uno.getComponentContext() >print("DONE. Next: createInstancewithcontext") >resolver = local_context.ServiceManager.createInstanceWithContext("com.sun.star.bridge.UnoUrlResolver", local_context) >print("DONE. Next: resolver.resolve") >time.sleep(5) >ctx = resolver.resolve("uno:socket,host=localhost,port=8100;urp;StarOffice.ComponentContext") >print("DONE. Next: ctx.servicemanager") > >XSCRIPTCONTEXT = ScriptContext(ctx, None, None) > >document = XSCRIPTCONTEXT.getDocument() > >presentation = document.getPresentation() > >print(type(presentation)) > >#smgr = ctx.ServiceManager >#desktop = smgr.createInstanceWithContext("com.sun.star.frame.Desktop", ctx) ># >#print("Done! Getting handle of the current document") >#doc = desktop.getCurrentComponent() >#presentation = doc.getPresentation() ># >##QObject: Cannot create children for a parent that is a different thread >presentation.start() ># >while not presentation.isRunning(): > pass ># >presentation_controller = presentation.getController() ># >for i in range(5): > presentation_controller.gotoNextSlide() > time.sleep(1) > >presentation.end() ># >#componentsEnumerator = desktop.getComponents().createEnumeration() ># >#closeDenied = False ># >#while componentsEnumerator.hasMoreElements(): ># document = componentsEnumerator.nextElement() ># if not hasattr(document, "close"): ># continue >#document.close(True)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 129689
: 160087