Issue 25150 - function MSGBOX
Summary: function MSGBOX
Status: CLOSED DUPLICATE of issue 74854
Alias: None
Product: App Dev
Classification: Unclassified
Component: api (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: PC Windows XP
: P3 Trivial
Target Milestone: ---
Assignee: hdu@apache.org
QA Contact: issues@api
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-06 10:21 UTC by cedgia
Modified: 2013-02-24 21:08 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description cedgia 2004-02-06 10:21:09 UTC
when I use the next function in a calc macro (openoffice script)

yesno=msgbox("Are you sure?",4 + 256 + 64,"ALERT")

the msgbox contain only the OK button (0) instead of yes/no button (4).

This function work correctly when i change "64" in 16, 32, 48.

I think that's a bug (in Excel work correctly)...

Bye

Sergio
Comment 1 ooo 2004-02-09 16:15:18 UTC
looks like Basic RunTime, not API
Comment 2 ab 2004-02-13 12:12:12 UTC
OOo 2.0
Comment 3 b.osi.ooo 2004-05-18 15:02:11 UTC
According to the roadmap of  OpenOffice.org 2.0
(http://tools.openoffice.org/releases/q-concept.html) this
issue has been scheduled for 3.0. 
Comment 4 ab 2005-07-26 15:09:45 UTC
ab->ssa:
yesno=msgbox("Are you sure?",4 + 256 + 64,"ALERT")

The 64 means "Add the Information icon to the dialog",  whereas
16/32/48 stand for other icons. In Basic this is realised like this:

nType &= (16+32+64);
switch( nType )
{
	case 16:
		pBox = new ErrorBox( pParent, nWinBits, aMsg );
		break;
	case 32:
		pBox = new QueryBox( pParent, nWinBits, aMsg );
		break;
	case 48:
		pBox = new WarningBox( pParent, nWinBits, aMsg );
		break;
	case 64:
		pBox = new InfoBox( pParent, aMsg );
		break;
	default:
		pBox = new MessBox( pParent, nWinBits, aTitle, aMsg );
}

Problem: All Ctors but the InfoBox Ctor allow to pass the nWinBits 
parameter that define the buttons. So for InfoBox the button sceme
by the 4 = "Display Yes and No buttons" is lost.

Is there a way to get the Info icon without using InfoBox or do we
need another InfoBox Ctor supporting WinBits?
Comment 5 christianjunker 2005-08-07 20:24:39 UTC
can verify, adding myself to cc.
Comment 6 stephan_schaefer 2005-12-02 15:58:38 UTC
ssa: reassign to hdu
Comment 7 aladdin2k7 2007-12-17 14:23:07 UTC
same as #74854 [1]

[1] http://fr.openoffice.org/issues/show_bug.cgi?id=74854
Comment 8 hdu@apache.org 2010-08-16 12:55:40 UTC
.

*** This issue has been marked as a duplicate of 74854 ***
Comment 9 Mechtilde 2010-10-17 07:56:34 UTC
duplicate -> closed