Download it now!
Bug 134477 - MsgBox macro function always creates an icon next to the text
Summary: MsgBox macro function always creates an icon next to the text
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
6.1.0.3 release
Hardware: x86-64 (AMD64) All
: medium minor
Assignee: Caolán McNamara
URL:
Whiteboard: target:7.1.0 target:7.0.2 target:6.4.7
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Macro-StarBasic
  Show dependency treegraph
 
Reported: 2020-07-03 12:33 UTC by domenicov
Modified: 2020-09-15 11:11 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Image of msgbox icon bug (44.12 KB, image/png)
2020-07-03 12:35 UTC, domenicov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description domenicov 2020-07-03 12:33:49 UTC
Description:
The function MsgBox in Basic has a bug. If I write a macro with 
MsgBox("Hello world", 0), in the box popup, near to Hello world there is the icon MB_ICONINFORMATION. 


Steps to Reproduce:
1.Create a macro: 
Sub Main 
MsgBox("Hello World", 0)
End Sub 
2.excute it
3.

Actual Results:
In popup box there is a icon (the MB_ICONINFORMATION) near to the text and the ok button

Expected Results:
The popup box with only the text and ok button.


Reproducible: Always


User Profile Reset: No



Additional Info:
Create a box with only the text and the ok button.
Comment 1 domenicov 2020-07-03 12:35:55 UTC
Created attachment 162611 [details]
Image of msgbox icon bug
Comment 2 Mike Kaganski 2020-07-03 13:22:53 UTC
Confirmed with Version: 7.1.0.0.alpha0+ (x64)
Build ID: 1c7d792ae27d2a899244d30a9c3cd3c04b5755ae
CPU threads: 12; OS: Windows 10.0 Build 18363; UI render: default; VCL: win
Locale: ru-RU (ru_RU); UI: en-US
Calc: CL.

This is inconsistent with its description [1], which binds MB_ICONINFORMATION to 64; also it's inconsistent with other implementations, e.g. MS VBA, where both 0 and empty Type argument result in a message box without any icon.

This is a regression: it worked as expected in Version: 6.0.0.1 (x64)
Build ID: d2bec56d7865f05a1003dc88449f2b0fdd85309a
CPU threads: 12; OS: Windows 10.0; UI render: default; 
Locale: en-US (ru_RU); Calc: group

It is already bad in Version: 6.1.5.2 (x64)
Build ID: 90f8dcf33c87b3705e78202e3df5142b201bd805
CPU threads: 12; OS: Windows 10.0; UI render: GL; 
Locale: ru-RU (ru_RU); Calc: group threaded

[1] https://help.libreoffice.org/6.4/en-US/text/sbasic/shared/03010102.html
Comment 3 Buovjaga 2020-07-03 14:35:52 UTC Comment hidden (obsolete)
Comment 4 raal 2020-09-07 15:50:45 UTC
This seems to have begun at the below commit.
Adding Cc: to Caolán McNamara ; Could you possibly take a look at this one?
Thanks

6622156d449827c89565a0c48948f9566cdc543e is the first bad commit
commit 6622156d449827c89565a0c48948f9566cdc543e
Author: Jenkins Build User <tdf@pollux.tdf>
Date:   Mon Feb 26 08:49:08 2018 +0100

    source sha:d75144cf44779a8f6cc9bccf9b0a6328b94a5b90

author	Caolán McNamara <caolanm@redhat.com>	2018-02-21 21:20:15 +0000
committer	Caolán McNamara <caolanm@redhat.com>	2018-02-25 20:03:26 +0100
commit	d75144cf44779a8f6cc9bccf9b0a6328b94a5b90 (patch)
tree	25b9f3c677c50ad715e1a0bc6bef3d5bf79ef957
parent	8d42909cd326cb26d8ba1fb383b5578f820c72ed (diff)
convert remaining InfoBox to weld::MessageDialog
Comment 5 Commit Notification 2020-09-08 13:17:06 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/50761e3c3da45772473f3329d5a7519b34fb1106

tdf#134477 add VclMessageType::Other to indicate image-less generic InfoBox

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 6 Caolán McNamara 2020-09-08 13:18:11 UTC
added a new type for this case, done in master, backport to 7-0 and 6-4 in gerrit
Comment 7 Commit Notification 2020-09-09 09:14:57 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-7-0":

https://git.libreoffice.org/core/commit/70e048190a24e797a9aa3954c3d19060ee4b442e

tdf#134477 add VclMessageType::Other to indicate image-less generic InfoBox

It will be available in 7.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.
Comment 8 Commit Notification 2020-09-09 09:15:11 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-6-4":

https://git.libreoffice.org/core/commit/03843109282186b036c6525fae513233983708fc

tdf#134477 add VclMessageType::Other to indicate image-less generic InfoBox

It will be available in 6.4.7.

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 9 Attila Baraksó (NISZ) 2020-09-15 11:11:47 UTC
Verified in:

Version: 7.1.0.0.alpha0+ (x64)
Build ID: abcc4eb907661e07ad850ccce7eb06f129da4286
CPU threads: 4; OS: Windows 10.0 Build 17134; UI render: Skia/Raster; VCL: win
Locale: hu-HU (hu_HU); UI: hu-HU
Calc: CL

@Caolán: Thanks for fixing this issue!