Bug 96247 - Make lok_doc_view_new() easier to use
Summary: Make lok_doc_view_new() easier to use
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
5.1.0.0.beta1
Hardware: All All
: medium normal
Assignee: Pranav Kant
URL: https://gerrit.libreoffice.org/#/c/20...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-04 14:57 UTC by Bastien Nocera
Modified: 2015-12-09 10:22 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bastien Nocera 2015-12-04 14:57:32 UTC
lok_doc_view_new() right now requires the full path to the libreoffice "program/" subfolder. Instead, because the library is installed with LibreOffice itself anyway, the path shouldn't be needed.

An alternate loading function could be useful for debugging (mainly for LO hackers), allowing to pass a path to use a specific LO set of libraries with the same LOKView version.
Comment 1 Bastien Nocera 2015-12-07 17:36:48 UTC
The way we discussed fixing this was to:
- install the liblibreofficekitgtk.so in the "normal" libdir
- correctly version the library's soname

The library should know how to get to the "default" (whatever was the target installation) LO path, and can probably use other means, such as an envvar to override the default value.

This would make it easier to switch the backend for debugging, but would make the bindings work out of the box.
Comment 2 David Tardon 2015-12-07 18:40:52 UTC
That makes sense. I've been thinking along the same lines.
Comment 3 Bastien Nocera 2015-12-09 09:27:02 UTC
This got closed without any references to the fix.
Comment 4 Pranav Kant 2015-12-09 09:47:31 UTC
Sorry about that.

Just for log, here is the gerrit URL of this change

https://gerrit.libreoffice.org/#/c/20476/
Comment 5 Bastien Nocera 2015-12-09 10:01:01 UTC
(In reply to Pranav Kant from comment #4)
> Sorry about that.
> 
> Just for log, here is the gerrit URL of this change
> 
> https://gerrit.libreoffice.org/#/c/20476/

Right. But this isn't enough for applications to be able to find the LOK library.

By the time you can call the _new() function, you will already have found the location of the program/ directory...
Comment 6 Pranav Kant 2015-12-09 10:22:34 UTC
(In reply to Bastien Nocera from comment #5)
> (In reply to Pranav Kant from comment #4)
> > Sorry about that.
> > 
> > Just for log, here is the gerrit URL of this change
> > 
> > https://gerrit.libreoffice.org/#/c/20476/
> 
> Right. But this isn't enough for applications to be able to find the LOK
> library.
> 
> By the time you can call the _new() function, you will already have found
> the location of the program/ directory...

You will still find distributions installing liblibreofficekitgtk.so in normal libdir so that you find no difficulty in finding and initializing the widget; calling _new() function.

However, this path would not work for the widget because widget needs libmergedlo and friends which resides in the program/ directory.