Bug 134320 - XInfobarProvider appendInfoBar ignores showCloseButton parameter
Summary: XInfobarProvider appendInfoBar ignores showCloseButton parameter
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: sdk (show other bugs)
Version:
(earliest affected)
7.0.0.0.alpha1+
Hardware: All All
: medium normal
Assignee: Julien Nabet
URL:
Whiteboard: target:7.1.0 target:7.0.0.2
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-26 14:48 UTC by Jack
Modified: 2020-07-03 18:10 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 Jack 2020-06-26 14:48:31 UTC
When the parameter showCloseButton is set to false when calling appendInfoBar, the close button is still visible.
Comment 1 Julien Nabet 2020-06-28 18:54:23 UTC
On pc Debian x86-64 with master sources updated today, I could reproduce this.

Just put this in a macro:
   Sub AddInfobar
    	dim buttons(1) as new com.sun.star.beans.StringPair
    	buttons(0).first = "Close doc"
    	buttons(0).second = ".uno:CloseDoc"
    	buttons(1).first = "Paste into doc"
    	buttons(1).second = ".uno:Paste"
    	ThisComponent.getCurrentController().appendInfobar("my", "Hello world", "Things happened. What now?", com.sun.star.frame.InfobarType.INFO, buttons, false)
    End Sub

See 9e3ba7c3036c4d21e01d6f75ed29a1e8c4208141
author	Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>	2019-11-18 09:08:03 +0100
committer	Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>	2019-11-19 08:51:43 +0100
commit 9e3ba7c3036c4d21e01d6f75ed29a1e8c4208141 (patch)
tree c648a26f2445955be14aa6e96815c14ec193dddc
parent b234743dd26e0be4be272d2d2c82f90c67e192b7 (diff)
tdf#97926 Add UNO API for Infobar
This allows creating, updating and removing infobars from macros/extensions.

It also extends the infobar with a primary and a secondary text, so there can
be a bold summary at the beginning at the infobar with a longer text following
in normal letters.
Comment 2 Julien Nabet 2020-06-28 18:57:36 UTC
Samuel: as you may have seen, I put you as reviewer for https://gerrit.libreoffice.org/c/core/+/97349
Comment 3 Commit Notification 2020-06-29 06:52:31 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/a8ee7bc96fb90e21ecab46bf1269b9eac6bf8261

tdf#134320: fix XInfobarProvider appendInfoBar for showCloseButton

It will be available in 7.1.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 4 Julien Nabet 2020-06-29 07:08:58 UTC
Fixed on master, patch waiting for review for 7.0 here:
https://gerrit.libreoffice.org/c/core/+/97370
Comment 5 Commit Notification 2020-07-03 18:10:06 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "libreoffice-7-0":

https://git.libreoffice.org/core/commit/d7b6bf4221c11e3c643c6058c5e697a11e4b98af

tdf#134320: fix XInfobarProvider appendInfoBar for showCloseButton

It will be available in 7.0.0.2.

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

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