Bug 96246 - Incorrect annotation for lok_doc_view_open_document()
Summary: Incorrect annotation for lok_doc_view_open_document()
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:
Whiteboard: target:5.2.0 target:5.1.0.1
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-04 14:53 UTC by Bastien Nocera
Modified: 2016-10-25 19:11 UTC (History)
3 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:53:42 UTC
In: https://raw.githubusercontent.com/LibreOffice/core/master/include/LibreOfficeKit/LibreOfficeKitGtk.h

you'll see those annotations for the open_document() method:
/**
 * lok_doc_view_open_document:
 * @pDocView: The #LOKDocView instance
 * @pPath: (transfer full): The path of the document that #LOKDocView widget should try to open
 * @pRenderingArguments: lok::Document::initializeForRendering() arguments.

But passing "null" (in JavaScript") for pRenderingArguments fails, as it expects a valid (non-null) utf-8 string instead.

The pRenderingArguments line should read:
 * @pRenderingArguments: (nullable): lok::Document::initializeForRendering() arguments.
Comment 1 Miklos Vajna 2015-12-05 21:48:27 UTC
Feel free to submit a patch yourself in gerrit if you know what is the fix for the bug, otherwise adding Pranav to CC as he knows the introspection stuff.
Comment 2 Commit Notification 2015-12-06 20:03:19 UTC
Pranav Kant committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=9e9703389e015d0f3520344715df6719559362e4

tdf#96246: Make pRenderingArguments nullable

It will be available in 5.2.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 3 Commit Notification 2015-12-07 12:20:28 UTC
Pranav Kant committed a patch related to this issue.
It has been pushed to "libreoffice-5-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=f37903004d93e7d7b008b2667881159bd8fee1e1&h=libreoffice-5-1

tdf#96246: Make pRenderingArguments nullable

It will be available in 5.1.0.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.