Issue 121544 - [AWT] Clean-up MessageBox API
[AWT] Clean-up MessageBox API
Status: RESOLVED FIXED
Product: General
Classification: Code
Component: code
3.4.1
All All
: P3 normal (vote)
: 4.0.0
Assigned To: Ariel Constenla-Haile
:
Depends on:
Blocks: 74095 122988
  Show dependency treegraph
 
Reported: 2012-12-24 07:24 UTC by Ariel Constenla-Haile
Modified: 2013-08-09 11:57 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Ariel Constenla-Haile 2012-12-24 07:24:56 UTC
Besides the IDL errors described in bug 74095 the MessageBox API has some other shortcomings:

a) css.awt.XMessageBox is deprecated, though it is returned by css.awt.XMessageBoxFactory.createMessageBox

b) css.awt.MessageBoxCommand is deprecated, it can be removed

c) the return type of css.awt.XMessageBox.execute() should be document with its own constants group

d) css.awt.XMessageBoxFactory.createMessageBox() takes a css.awt.Rectangle defining the position and size of the message box, this is completely useless as it is ignored. The message box is always positioned in the center of its parent window, and the size is determined by the internal implementation

e) the type of the message box in css.awt.XMessageBoxFactory.createMessageBox() is defined by strings, what makes it rather error prone. This should be replaced by an enumeration
Comment 1 SVN Robot 2012-12-24 09:07:27 UTC
"arielch" committed SVN revision 1425608 into trunk:
i121544 - Clean-up MessageBox API
Comment 2 Ariel Constenla-Haile 2012-12-24 09:23:09 UTC
a) css.awt.MessageBoxCommand has been removed

b) css.awt.MessageBoxResults has been introduced to specify a result of executing a css.awt.XMessageBox

c) css.awt.MessageBoxType has been introduced to specify the type of a css.awt.XMessageBox on css.awt.XMessageBoxFactory.createMessageBox()

d) in css.awt.XMessageBox the getters and setters have been replaced by interface attributes: CaptionText and MessageText

e) css.awt.XMessageBoxFactory.createMessageBox() no longer takes a css.awt.Rectangle defining the position and size of the message box

f) the type of the message box in css.awt.XMessageBoxFactory.createMessageBox() is no longer defined by strings, use css.awt.MessageBoxType instead
Comment 3 SVN Robot 2012-12-25 04:17:31 UTC
"arielch" committed SVN revision 1425715 into trunk:
i121544 - Clean-up MessageBox API (post fix)
Comment 4 brinzing 2012-12-25 09:36:41 UTC
.
Comment 5 hanya 2013-01-09 08:57:24 UTC
following files contains illegal value for preprocessor instructions: 

Index: offapi/com/sun/star/awt/MessageBoxType.idl
===================================================================
--- offapi/com/sun/star/awt/MessageBoxType.idl	(revision 1430225)
+++ offapi/com/sun/star/awt/MessageBoxType.idl	(working copy)
@@ -19,8 +19,8 @@
  *
  *************************************************************/
 
-#ifndef __com_sun_star_awt_MessageBoxCommand_idl__
-#define __com_sun_star_awt_MessageBoxCommand_idl__
+#ifndef __com_sun_star_awt_MessageBoxType_idl__
+#define __com_sun_star_awt_MessageBoxType_idl__
 
 module com {  module sun {  module star {  module awt {
 
Index: offapi/com/sun/star/awt/MessageBoxResults.idl
===================================================================
--- offapi/com/sun/star/awt/MessageBoxResults.idl	(revision 1430225)
+++ offapi/com/sun/star/awt/MessageBoxResults.idl	(working copy)
@@ -19,8 +19,8 @@
  *
  *************************************************************/
 
-#ifndef __com_sun_star_awt_MessageBoxCommand_idl__
-#define __com_sun_star_awt_MessageBoxCommand_idl__
+#ifndef __com_sun_star_awt_MessageBoxResults_idl__
+#define __com_sun_star_awt_MessageBoxResults_idl__
 
 module com {  module sun {  module star {  module awt {
Comment 6 SVN Robot 2013-05-28 22:09:38 UTC
"arielch" committed SVN revision 1487143 into trunk:
i121544 - Fix header guards
Comment 7 Ariel Constenla-Haile 2013-05-28 22:12:29 UTC
(In reply to hanya from comment #5)
> following files contains illegal value for preprocessor instructions: 

IIRC you opened a new bug for this one, but I cannot find it right now. Please resolve it as fixed or make it depend on this one.
Comment 8 hanya 2013-05-29 04:58:59 UTC
(In reply to Ariel Constenla-Haile from comment #7)
> (In reply to hanya from comment #5)
> > following files contains illegal value for preprocessor instructions: 
> 
> IIRC you opened a new bug for this one, but I cannot find it right now.
> Please resolve it as fixed or make it depend on this one.
Done in issue 121951. Thanks.