Bug 91806 - Create a Sidebar UNO API
Summary: Create a Sidebar UNO API
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: sdk (show other bugs)
Version:
(earliest affected)
5.0.0.0.alpha0+ Master
Hardware: Other All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard: target:5.1.0
Keywords: patch
Depends on:
Blocks: Sidebar
  Show dependency treegraph
 
Reported: 2015-06-02 08:13 UTC by Laurent Godard
Modified: 2018-12-06 03:04 UTC (History)
8 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 Laurent Godard 2015-06-02 08:13:37 UTC
Give a uno api that allow

- show/hide the sidebar
- get Decks collection
- get a Deck, show/hide/enable, move it in the sidebar, change its title ...
- get Panels collection for a Deck
- get a Panel, move it inside the deck, expand/collapse, change title, get XWindow

... this api may be enhanced if necessary

change the sidebar paradigm from global to per document
Comment 1 Laurent Godard 2015-06-02 08:17:44 UTC
a first proposal is on gerrit
https://gerrit.libreoffice.org/#/c/15856

(see commit comment for first example)

heavy review needed focusing on
- correctness of c++ use
- validity of the api approach
Comment 2 sophie 2015-06-02 08:27:15 UTC
Set it on New - Thanks a lot for your work Laurent :) Sophie
Comment 3 sophie 2015-06-02 08:35:30 UTC
added patch in keywords
Comment 4 Laurent Godard 2015-06-12 08:01:06 UTC
add unit test patch
https://gerrit.libreoffice.org/#/c/16180/
Comment 5 Commit Notification 2015-06-22 04:59:55 UTC
Laurent Godard committed a patch related to this issue.
It has been pushed to "master":

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

new uno sidebar api tdf#91806

It will be available in 5.1.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 6 Commit Notification 2015-06-23 06:39:42 UTC
Laurent Godard committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=187445b2d2885ced92be37ffb11cd2a9bb11f8d6

Uno api sidebar unit test tdf#91806

It will be available in 5.1.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 7 Yousuf Philips (jay) (retired) 2015-08-04 19:11:34 UTC
Hi Laurent,

From your description, it seems the API will allow a developer to manipulate various parts of the sidebar, but will it allow a developer to rearrange controls (buttons, textboxes, etc) within a panel?

(In reply to Laurent Godard from comment #0)
> change the sidebar paradigm from global to per document

Can you clarify what this means.
Comment 8 Laurent Godard 2015-08-06 15:58:41 UTC
Hi

for some example of the API, maybe have a look at (pyuno) unit test
http://opengrok.libreoffice.org/xref/core/sfx2/qa/python/check_sidebar.py

XPanel:getDialog() should give you access to the XWindow dialog that contains UI elements
maybe have a look at 
http://opengrok.libreoffice.org/xref/core/offapi/com/sun/star/ui/XPanel.idl#81

regarding global versus per document changes

initially, the sidebar redraw itself at each deck changes (load, draw panels and forget their expand/collapse state)

one other problem is that having 2 documents, with a sidebar, opened on the same deck, changing something in panel states in one document occurs also in the other.
moreover, with "shared decks" this also comes accross context (eg. property panel for writer and calc)

the main problem remains that destroying panels at each deck changes looses users configuration

so, now, for each document (controller), the sidebar -> deck collection --> panel collection is defined. deck changes only hides the panels and do not destroy all previous state. It allows then to go back and forth among all decks and have the correct panels states (expand collapse and order)

/me hopes it is clearer

i'm totally opened to improvement suggestion
Comment 9 Yousuf Philips (jay) (retired) 2015-08-06 17:09:16 UTC
Hi Laurent,

Thanks for the explanation about the sidebar per document, as that is very useful for users who use the sidebar and work with multiple documents.

About the XWindow and XPanel part, unfortunately i dont have the necessary developer skills to know what is capable there.
Comment 10 Samuel Mehrbrodt (allotropia) 2015-11-20 14:28:20 UTC
I guess we can close this bug as we now have a Sidebar API.
If there are further enhancement suggestions to the API, please file new bugs for that.
Comment 11 OfficeUser 2017-10-17 14:46:33 UTC
Seems to be the cause for regressions:

Bug 113173
Bug 99537