LibreOffice crash
Piet van Oostrum
piet at vanoostrum.org
Sat Mar 28 13:52:36 PDT 2015
Piet van Oostrum wrote:
> I am currently experimenting with programming LibreOffice through Python/UNO.
> One thing I tried is to create a document, not with the
> loadComponentFromURL call from the desktop, but the route via the
> XLoadable interface,
[snip]
> Now when I do this with a Writer document:
>
> textdoc = smgr.createInstanceWithContext("com.sun.star.text.TextDocument", context)
>
> LibreOffice crashes with a segmentation fault.
I just came across this piece of prose:
A few old-style services need special treatment. For example, you
cannot ask the service manager to create an instance of a
com.sun.star.text.TextDocument. You must load it using the method
loadComponentFromUrl() at the desktop's
com.sun.star.frame.XComponentLoader interface.
https://wiki.openoffice.org/wiki/Documentation/DevGuide/ProUNO/Understanding_the_API_Reference
I guess that explains it. Although I think crashing is a bit harsh :)
--
Piet van Oostrum <piet at vanoostrum.org>
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]
More information about the LibreOffice
mailing list