openoffice-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arie...@apache.org
Subject svn commit: r1425608 - in /openoffice/trunk/main: desktop/test/deployment/active/ desktop/test/deployment/passive/ odk/examples/DevelopersGuide/Charts/ odk/examples/DevelopersGuide/GUI/ odk/examples/cpp/complextoolbarcontrols/ odk/examples/java/Inspect...
Date Mon, 24 Dec 2012 09:07:26 GMT
Author: arielch
Date: Mon Dec 24 09:07:25 2012
New Revision: 1425608

URL: http://svn.apache.org/viewvc?rev=1425608&view=rev
Log:
i121544 - Clean-up MessageBox API

Added:
    openoffice/trunk/main/offapi/com/sun/star/awt/MessageBoxResults.idl
    openoffice/trunk/main/offapi/com/sun/star/awt/MessageBoxType.idl
Removed:
    openoffice/trunk/main/offapi/com/sun/star/awt/MessageBoxCommand.idl
Modified:
    openoffice/trunk/main/desktop/test/deployment/active/Dispatch.java
    openoffice/trunk/main/desktop/test/deployment/active/active_native.cxx
    openoffice/trunk/main/desktop/test/deployment/active/active_python.py
    openoffice/trunk/main/desktop/test/deployment/passive/Dispatch.java
    openoffice/trunk/main/desktop/test/deployment/passive/passive_native.cxx
    openoffice/trunk/main/desktop/test/deployment/passive/passive_python.py
    openoffice/trunk/main/odk/examples/DevelopersGuide/Charts/SelectionChangeListener.java
    openoffice/trunk/main/odk/examples/DevelopersGuide/GUI/MessageBox.java
    openoffice/trunk/main/odk/examples/cpp/complextoolbarcontrols/MyProtocolHandler.cxx
    openoffice/trunk/main/odk/examples/java/Inspector/Inspector.java
    openoffice/trunk/main/offapi/com/sun/star/awt/MessageBoxButtons.idl
    openoffice/trunk/main/offapi/com/sun/star/awt/XMessageBox.idl
    openoffice/trunk/main/offapi/com/sun/star/awt/XMessageBoxFactory.idl
    openoffice/trunk/main/offapi/com/sun/star/awt/makefile.mk
    openoffice/trunk/main/offapi/type_reference/types.rdb
    openoffice/trunk/main/qadevOOo/tests/java/ifc/awt/_XMessageBoxFactory.java
    openoffice/trunk/main/sdext/source/minimizer/unodialog.cxx
    openoffice/trunk/main/swext/mediawiki/src/com/sun/star/wiki/Helper.java
    openoffice/trunk/main/toolkit/inc/toolkit/awt/vclxtoolkit.hxx
    openoffice/trunk/main/toolkit/source/awt/vclxtoolkit.cxx
    openoffice/trunk/main/toolkit/source/layout/core/root.cxx

Modified: openoffice/trunk/main/desktop/test/deployment/active/Dispatch.java
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/desktop/test/deployment/active/Dispatch.java?rev=1425608&r1=1425607&r2=1425608&view=diff
==============================================================================
--- openoffice/trunk/main/desktop/test/deployment/active/Dispatch.java (original)
+++ openoffice/trunk/main/desktop/test/deployment/active/Dispatch.java Mon Dec 24 09:07:25
2012
@@ -24,6 +24,7 @@
 package com.sun.star.comp.test.deployment.active_java;
 
 import com.sun.star.awt.MessageBoxButtons;
+import com.sun.star.awt.MessageBoxType;
 import com.sun.star.awt.Rectangle;
 import com.sun.star.awt.XMessageBox;
 import com.sun.star.awt.XMessageBoxFactory;
@@ -74,7 +75,7 @@ public final class Dispatch extends Weak
                             smgr.createInstanceWithContext(
                                 "com.sun.star.frame.Desktop", context)).
                          getCurrentFrame().getComponentWindow())),
-                    new Rectangle(), "infobox", MessageBoxButtons.BUTTONS_OK,
+                    MessageBoxType.INFOBOX, MessageBoxButtons.BUTTONS_OK,
                     "active", "java");
             box.execute();
             UnoRuntime.queryInterface(XComponent.class, box).dispose();

Modified: openoffice/trunk/main/desktop/test/deployment/active/active_native.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/desktop/test/deployment/active/active_native.cxx?rev=1425608&r1=1425607&r2=1425608&view=diff
==============================================================================
--- openoffice/trunk/main/desktop/test/deployment/active/active_native.cxx (original)
+++ openoffice/trunk/main/desktop/test/deployment/active/active_native.cxx Mon Dec 24 09:07:25
2012
@@ -250,8 +250,7 @@ void Dispatch::dispatch(
                             css::uno::UNO_QUERY_THROW)->getCurrentFrame(),
                         css::uno::UNO_SET_THROW)->getComponentWindow(),
                     css::uno::UNO_QUERY_THROW),
-                css::awt::Rectangle(),
-                rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("infobox")),
+                css::awt::MessageBoxType_INFOBOX,
                 css::awt::MessageBoxButtons::BUTTONS_OK,
                 rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("active")),
                 rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("native"))),

Modified: openoffice/trunk/main/desktop/test/deployment/active/active_python.py
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/desktop/test/deployment/active/active_python.py?rev=1425608&r1=1425607&r2=1425608&view=diff
==============================================================================
--- openoffice/trunk/main/desktop/test/deployment/active/active_python.py (original)
+++ openoffice/trunk/main/desktop/test/deployment/active/active_python.py Mon Dec 24 09:07:25
2012
@@ -24,6 +24,7 @@ import unohelper
 
 from com.sun.star.awt import Rectangle
 from com.sun.star.awt.MessageBoxButtons import BUTTONS_OK
+from com.sun.star.awt.MessageBoxType import INFOBOX
 from com.sun.star.frame import XDispatch, XDispatchProvider
 from com.sun.star.lang import XServiceInfo
 from com.sun.star.registry import InvalidRegistryException
@@ -79,7 +80,7 @@ class Dispatch(unohelper.Base, XServiceI
                 smgr.createInstanceWithContext( \
                     "com.sun.star.frame.Desktop", self.context). \
                     getCurrentFrame().getComponentWindow(), \
-                Rectangle(), "infobox", BUTTONS_OK, "active", "python")
+                INFOBOX, BUTTONS_OK, "active", "python")
         box.execute();
         box.dispose();
 

Modified: openoffice/trunk/main/desktop/test/deployment/passive/Dispatch.java
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/desktop/test/deployment/passive/Dispatch.java?rev=1425608&r1=1425607&r2=1425608&view=diff
==============================================================================
--- openoffice/trunk/main/desktop/test/deployment/passive/Dispatch.java (original)
+++ openoffice/trunk/main/desktop/test/deployment/passive/Dispatch.java Mon Dec 24 09:07:25
2012
@@ -24,6 +24,7 @@
 package com.sun.star.comp.test.deployment.passive_java;
 
 import com.sun.star.awt.MessageBoxButtons;
+import com.sun.star.awt.MessageBoxType;
 import com.sun.star.awt.Rectangle;
 import com.sun.star.awt.XMessageBox;
 import com.sun.star.awt.XMessageBoxFactory;
@@ -74,7 +75,7 @@ public final class Dispatch extends Weak
                             smgr.createInstanceWithContext(
                                 "com.sun.star.frame.Desktop", context)).
                          getCurrentFrame().getComponentWindow())),
-                    new Rectangle(), "infobox", MessageBoxButtons.BUTTONS_OK,
+                    MessageBoxType.INFOBOX, MessageBoxButtons.BUTTONS_OK,
                     "passive", "java");
             box.execute();
             UnoRuntime.queryInterface(XComponent.class, box).dispose();

Modified: openoffice/trunk/main/desktop/test/deployment/passive/passive_native.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/desktop/test/deployment/passive/passive_native.cxx?rev=1425608&r1=1425607&r2=1425608&view=diff
==============================================================================
--- openoffice/trunk/main/desktop/test/deployment/passive/passive_native.cxx (original)
+++ openoffice/trunk/main/desktop/test/deployment/passive/passive_native.cxx Mon Dec 24 09:07:25
2012
@@ -248,8 +248,7 @@ void Dispatch::dispatch(
                             css::uno::UNO_QUERY_THROW)->getCurrentFrame(),
                         css::uno::UNO_SET_THROW)->getComponentWindow(),
                     css::uno::UNO_QUERY_THROW),
-                css::awt::Rectangle(),
-                rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("infobox")),
+                css::awt::MessageBoxType_INFOBOX,
                 css::awt::MessageBoxButtons::BUTTONS_OK,
                 rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("passive")),
                 rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("native"))),

Modified: openoffice/trunk/main/desktop/test/deployment/passive/passive_python.py
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/desktop/test/deployment/passive/passive_python.py?rev=1425608&r1=1425607&r2=1425608&view=diff
==============================================================================
--- openoffice/trunk/main/desktop/test/deployment/passive/passive_python.py (original)
+++ openoffice/trunk/main/desktop/test/deployment/passive/passive_python.py Mon Dec 24 09:07:25
2012
@@ -24,6 +24,7 @@ import unohelper
 
 from com.sun.star.awt import Rectangle
 from com.sun.star.awt.MessageBoxButtons import BUTTONS_OK
+from com.sun.star.awt.MessageBoxType import INFOBOX
 from com.sun.star.frame import XDispatch, XDispatchProvider
 from com.sun.star.lang import XServiceInfo
 
@@ -78,7 +79,7 @@ class Dispatch(unohelper.Base, XServiceI
                 smgr.createInstanceWithContext( \
                     "com.sun.star.frame.Desktop", self.context). \
                     getCurrentFrame().getComponentWindow(), \
-                Rectangle(), "infobox", BUTTONS_OK, "passive", "python")
+                INFOBOX, BUTTONS_OK, "passive", "python")
         box.execute();
         box.dispose();
 

Modified: openoffice/trunk/main/odk/examples/DevelopersGuide/Charts/SelectionChangeListener.java
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/odk/examples/DevelopersGuide/Charts/SelectionChangeListener.java?rev=1425608&r1=1425607&r2=1425608&view=diff
==============================================================================
--- openoffice/trunk/main/odk/examples/DevelopersGuide/Charts/SelectionChangeListener.java
(original)
+++ openoffice/trunk/main/odk/examples/DevelopersGuide/Charts/SelectionChangeListener.java
Mon Dec 24 09:07:25 2012
@@ -45,6 +45,7 @@ import com.sun.star.awt.Point;
 import com.sun.star.awt.Rectangle;
 import com.sun.star.awt.Size;
 import com.sun.star.awt.XMessageBoxFactory;
+import com.sun.star.awt.MessageBoxType;
 import com.sun.star.awt.XWindow;
 
 // __________ Implementation __________
@@ -194,11 +195,10 @@ public class SelectionChangeListener imp
             
             XWindow xWin = aDesktop.getCurrentFrame().getContainerWindow();
             XWindowPeer aWinPeer = (XWindowPeer) UnoRuntime.queryInterface(XWindowPeer.class,
xWin);
-            
-            Rectangle aRect = new Rectangle();
+
             int button = com.sun.star.awt.MessageBoxButtons.BUTTONS_OK;
             XMessageBoxFactory aMBF = (XMessageBoxFactory) UnoRuntime.queryInterface(XMessageBoxFactory.class,
aToolKit);
-            XMessageBox xMB = aMBF.createMessageBox(aWinPeer, aRect, "infobox" , button,
"Event-Notify", "Listener was called, selcetion has changed");
+            XMessageBox xMB = aMBF.createMessageBox(aWinPeer, MessageBoxType.INFOBOX, button,
"Event-Notify", "Listener was called, selcetion has changed");
             xMB.execute();
         }
     }

Modified: openoffice/trunk/main/odk/examples/DevelopersGuide/GUI/MessageBox.java
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/odk/examples/DevelopersGuide/GUI/MessageBox.java?rev=1425608&r1=1425607&r2=1425608&view=diff
==============================================================================
--- openoffice/trunk/main/odk/examples/DevelopersGuide/GUI/MessageBox.java (original)
+++ openoffice/trunk/main/odk/examples/DevelopersGuide/GUI/MessageBox.java Mon Dec 24 09:07:25
2012
@@ -22,6 +22,7 @@
 
 
 import com.sun.star.awt.Rectangle;
+import com.sun.star.awt.MessageBoxType;
 import com.sun.star.awt.XMessageBox;
 import com.sun.star.awt.XMessageBoxFactory;
 import com.sun.star.awt.XVclWindowPeer;
@@ -164,9 +165,7 @@ public class MessageBox  {
         try {
             Object oToolkit = m_xMCF.createInstanceWithContext("com.sun.star.awt.Toolkit",
m_xContext);
             XMessageBoxFactory xMessageBoxFactory = (XMessageBoxFactory) UnoRuntime.queryInterface(XMessageBoxFactory.class,
oToolkit);
-            // rectangle may be empty if position is in the center of the parent peer
-            Rectangle aRectangle = new Rectangle();
-            XMessageBox xMessageBox = xMessageBoxFactory.createMessageBox(_xParentWindowPeer,
aRectangle, "errorbox", com.sun.star.awt.MessageBoxButtons.BUTTONS_OK, _sTitle, _sMessage);
+            XMessageBox xMessageBox = xMessageBoxFactory.createMessageBox(_xParentWindowPeer,
MessageBoxType.ERRORBOX, com.sun.star.awt.MessageBoxButtons.BUTTONS_OK, _sTitle, _sMessage);
             xComponent = (XComponent) UnoRuntime.queryInterface(XComponent.class, xMessageBox);
             if (xMessageBox != null){
                 short nResult = xMessageBox.execute();

Modified: openoffice/trunk/main/odk/examples/cpp/complextoolbarcontrols/MyProtocolHandler.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/odk/examples/cpp/complextoolbarcontrols/MyProtocolHandler.cxx?rev=1425608&r1=1425607&r2=1425608&view=diff
==============================================================================
--- openoffice/trunk/main/odk/examples/cpp/complextoolbarcontrols/MyProtocolHandler.cxx (original)
+++ openoffice/trunk/main/odk/examples/cpp/complextoolbarcontrols/MyProtocolHandler.cxx Mon
Dec 24 09:07:25 2012
@@ -58,8 +58,7 @@ void BaseDispatch::ShowMessageBox( const
     {
         Reference< XMessageBox > xMsgBox = xMsgBoxFactory->createMessageBox(
             Reference< XWindowPeer >( rFrame->getContainerWindow(), UNO_QUERY ),
-            Rectangle(0,0,300,200),
-            rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "infobox" ) ),
+            com::sun::star::awt::MessageBoxType_INFOBOX,
             MessageBoxButtons::BUTTONS_OK,
             aTitle,
             aMsgText );

Modified: openoffice/trunk/main/odk/examples/java/Inspector/Inspector.java
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/odk/examples/java/Inspector/Inspector.java?rev=1425608&r1=1425607&r2=1425608&view=diff
==============================================================================
--- openoffice/trunk/main/odk/examples/java/Inspector/Inspector.java (original)
+++ openoffice/trunk/main/odk/examples/java/Inspector/Inspector.java Mon Dec 24 09:07:25 2012
@@ -178,8 +178,7 @@ public class Inspector{
         try {
             Object oToolkit = m_xComponentContext.getServiceManager().createInstanceWithContext("com.sun.star.awt.Toolkit",
m_xComponentContext);
             XMessageBoxFactory xMessageBoxFactory = (XMessageBoxFactory) UnoRuntime.queryInterface(XMessageBoxFactory.class,
oToolkit);
-            Rectangle aRectangle = new Rectangle();
-            XMessageBox xMessageBox = xMessageBoxFactory.createMessageBox(_xWindowPeer, aRectangle,
"errorbox", com.sun.star.awt.MessageBoxButtons.BUTTONS_OK, _sTitle, _sMessage);
+            XMessageBox xMessageBox = xMessageBoxFactory.createMessageBox(_xWindowPeer, aRectangle,
com.sun.star.awt.MessageBoxType.ERRORBOX, com.sun.star.awt.MessageBoxButtons.BUTTONS_OK, _sTitle,
_sMessage);
             XComponent xComponent = (XComponent) UnoRuntime.queryInterface(XComponent.class,
xMessageBox);
             if (xMessageBox != null){
                 short nResult = xMessageBox.execute();

Modified: openoffice/trunk/main/offapi/com/sun/star/awt/MessageBoxButtons.idl
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/offapi/com/sun/star/awt/MessageBoxButtons.idl?rev=1425608&r1=1425607&r2=1425608&view=diff
==============================================================================
--- openoffice/trunk/main/offapi/com/sun/star/awt/MessageBoxButtons.idl (original)
+++ openoffice/trunk/main/offapi/com/sun/star/awt/MessageBoxButtons.idl Mon Dec 24 09:07:25
2012
@@ -1,5 +1,5 @@
 /**************************************************************
- * 
+ *
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -7,87 +7,78 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * 
+ *
  *   http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- * 
+ *
  *************************************************************/
 
+#ifndef __com_sun_star_awt_MessageBoxButtons_idl__
+#define __com_sun_star_awt_MessageBoxButtons_idl__
 
-#ifndef __com_sun_star_awt_MessageBoxButtons_idl__ 
-#define __com_sun_star_awt_MessageBoxButtons_idl__ 
- 
-//============================================================================= 
- 
- module com {  module sun {  module star {  module awt {  
- 
-//============================================================================= 
- 
-/** defines constants for the possible message box button 
+module com {  module sun {  module star {  module awt {
+
+/** defines constants for the possible message box button
     combinations.
 
  */
 constants MessageBoxButtons
-{ 
-	//------------------------------------------------------------------------- 
-
-	/** specifies a message with "OK" button.
+{
+    /** specifies a message with "OK" button.
      */
     const long BUTTONS_OK                   = 1;
 
-	/** specifies a message box with "OK" and "CANCEL" button.
+    /** specifies a message box with "OK" and "CANCEL" button.
      */
     const long BUTTONS_OK_CANCEL            = 2;
 
-	/** specifies a message box with "YES" and "NO" button.
+    /** specifies a message box with "YES" and "NO" button.
      */
     const long BUTTONS_YES_NO               = 3;
 
-	/** specifies a message box with "YES", "NO" and "CANCEL" button.
+    /** specifies a message box with "YES", "NO" and "CANCEL" button.
      */
     const long BUTTONS_YES_NO_CANCEL        = 4;
 
-	/** specifies a message box with "RETRY" and "CANCEL" button.
+    /** specifies a message box with "RETRY" and "CANCEL" button.
      */
     const long BUTTONS_RETRY_CANCEL         = 5;
 
-	/** specifies a message box with "ABORT", "IGNORE" and "RETRY" button.
+    /** specifies a message box with "ABORT", "IGNORE" and "RETRY" button.
      */
     const long BUTTONS_ABORT_IGNORE_RETRY   = 6;
 
     /** specifies that OK is the default button.
      */
     const long DEFAULT_BUTTON_OK            = 0x10000;
-    
-	/** specifies that CANCEL is the default button.
+
+    /** specifies that CANCEL is the default button.
      */
     const long DEFAULT_BUTTON_CANCEL        = 0x20000;
 
-	/** specifies that RETRY is the default button.
+    /** specifies that RETRY is the default button.
      */
     const long DEFAULT_BUTTON_RETRY         = 0x30000;
-    
-	/** specifies that YES is the default button.
+
+    /** specifies that YES is the default button.
      */
     const long DEFAULT_BUTTON_YES           = 0x40000;
 
-	/** specifies that NO is the default button.
+    /** specifies that NO is the default button.
      */
     const long DEFAULT_BUTTON_NO            = 0x50000;
 
-	/** specifies that IGNORE is the default button.
+    /** specifies that IGNORE is the default button.
      */
     const long DEFAULT_BUTTON_IGNORE        = 0x60000;
-}; 
+};
+
+}; }; }; };
 
-//============================================================================= 
- 
-}; }; }; };  
- 
-#endif 
+#endif

Added: openoffice/trunk/main/offapi/com/sun/star/awt/MessageBoxResults.idl
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/offapi/com/sun/star/awt/MessageBoxResults.idl?rev=1425608&view=auto
==============================================================================
--- openoffice/trunk/main/offapi/com/sun/star/awt/MessageBoxResults.idl (added)
+++ openoffice/trunk/main/offapi/com/sun/star/awt/MessageBoxResults.idl Mon Dec 24 09:07:25
2012
@@ -0,0 +1,58 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#ifndef __com_sun_star_awt_MessageBoxCommand_idl__
+#define __com_sun_star_awt_MessageBoxCommand_idl__
+
+module com {  module sun {  module star {  module awt {
+
+/** These constants are used to specify a result of executing a <type>XMessageBox</type>.
+ */
+constants MessageBoxResults
+{
+    /** The user canceled the <type>XMessageBox</type>, by pressing "Cancel"
or "Abort" button.
+     */
+    const short CANCEL  = 0;
+
+    /** The user pressed the "Ok" button.
+     */
+    const short OK      = 1;
+
+    /** The user pressed the "Yes" button.
+     */
+    const short YES     = 2;
+
+    /** The user pressed the "No" button.
+     */
+    const short NO      = 3;
+
+    /** The user pressed the "Retry" button.
+     */
+    const short RETRY   = 4;
+
+    /** The user pressed the "Ignore" button.
+     */
+    const short IGNORE  = 5;
+};
+
+}; }; }; };
+
+#endif

Added: openoffice/trunk/main/offapi/com/sun/star/awt/MessageBoxType.idl
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/offapi/com/sun/star/awt/MessageBoxType.idl?rev=1425608&view=auto
==============================================================================
--- openoffice/trunk/main/offapi/com/sun/star/awt/MessageBoxType.idl (added)
+++ openoffice/trunk/main/offapi/com/sun/star/awt/MessageBoxType.idl Mon Dec 24 09:07:25 2012
@@ -0,0 +1,54 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#ifndef __com_sun_star_awt_MessageBoxCommand_idl__
+#define __com_sun_star_awt_MessageBoxCommand_idl__
+
+module com {  module sun {  module star {  module awt {
+
+/** specifies the type of a <type>XMessageBox</type>.
+ */
+published enum MessageBoxType
+{
+    /** A normal message box.
+     */
+    MESSAGEBOX,
+
+    /** A message box to inform the user about a certain event
+     */
+    INFOBOX,
+
+    /** A message to warn the user about a certain problem.
+     */
+    WARNINGBOX,
+
+    /** A message box to provide an error message to the user.
+     */
+    ERRORBOX,
+
+    /** A message box to query information from the user.
+     */
+    QUERYBOX
+};
+
+}; }; }; };
+
+#endif

Modified: openoffice/trunk/main/offapi/com/sun/star/awt/XMessageBox.idl
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/offapi/com/sun/star/awt/XMessageBox.idl?rev=1425608&r1=1425607&r2=1425608&view=diff
==============================================================================
--- openoffice/trunk/main/offapi/com/sun/star/awt/XMessageBox.idl (original)
+++ openoffice/trunk/main/offapi/com/sun/star/awt/XMessageBox.idl Mon Dec 24 09:07:25 2012
@@ -1,5 +1,5 @@
 /**************************************************************
- * 
+ *
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -7,73 +7,45 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * 
+ *
  *   http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- * 
+ *
  *************************************************************/
 
+#ifndef __com_sun_star_awt_XMessageBox_idl__
+#define __com_sun_star_awt_XMessageBox_idl__
 
-#ifndef __com_sun_star_awt_XMessageBox_idl__ 
-#define __com_sun_star_awt_XMessageBox_idl__ 
- 
-#ifndef __com_sun_star_uno_XInterface_idl__ 
-#include <com/sun/star/uno/XInterface.idl> 
-#endif 
- 
- 
-//============================================================================= 
- 
- module com {  module sun {  module star {  module awt {  
- 
-//============================================================================= 
- 
-/** gives access to a message box.
+#include <com/sun/star/uno/XInterface.idl>
 
-    @deprecated
- */
-published interface XMessageBox: com::sun::star::uno::XInterface
-{ 
-	//------------------------------------------------------------------------- 
+module com {  module sun {  module star {  module awt {
 
-	/** sets the caption text.
+/** gives access to a message box.
+ */
+published interface XMessageBox
+{
+    /** the caption text.
      */
-	[oneway] void setCaptionText( [in] string aText ); 
- 
-	//------------------------------------------------------------------------- 
+    [attribute] string CaptionText;
 
-	/** returns the caption text.
+    /** the message text.
      */
-	string getCaptionText(); 
- 
-	//------------------------------------------------------------------------- 
+    [attribute] string MessageText;
 
-	/** sets the message text.
-     */
-	[oneway] void setMessageText( [in] string aText ); 
- 
-	//------------------------------------------------------------------------- 
+    /** shows the message box.
 
-	/** returns the message text.
+        @return
+            one of <type>MessageBoxResults</type>.
      */
-	string getMessageText(); 
- 
-	//------------------------------------------------------------------------- 
+    short execute();
+};
 
-	/** shows the message box.
-     */
-	short execute(); 
- 
-}; 
- 
-//============================================================================= 
- 
-}; }; }; };  
- 
-#endif 
+}; }; }; };
+
+#endif

Modified: openoffice/trunk/main/offapi/com/sun/star/awt/XMessageBoxFactory.idl
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/offapi/com/sun/star/awt/XMessageBoxFactory.idl?rev=1425608&r1=1425607&r2=1425608&view=diff
==============================================================================
--- openoffice/trunk/main/offapi/com/sun/star/awt/XMessageBoxFactory.idl (original)
+++ openoffice/trunk/main/offapi/com/sun/star/awt/XMessageBoxFactory.idl Mon Dec 24 09:07:25
2012
@@ -1,5 +1,5 @@
 /**************************************************************
- * 
+ *
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -7,98 +7,68 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * 
+ *
  *   http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- * 
+ *
  *************************************************************/
 
-
-
 #ifndef __com_sun_star_awt_XMessageBoxFactory_idl__
 #define __com_sun_star_awt_XMessageBoxFactory_idl__
 
-#ifndef __com_sun_star_awt_XWindowPeer_idl__ 
-#include <com/sun/star/awt/XWindowPeer.idl> 
-#endif
-
-#ifndef __com_sun_star_awt_XMessageBox_idl__
+#include <com/sun/star/awt/XWindowPeer.idl>
 #include <com/sun/star/awt/XMessageBox.idl>
-#endif
-
-#ifndef __com_sun_star_awt_MessageBoxButtons_idl__
 #include <com/sun/star/awt/MessageBoxButtons.idl>
-#endif
-
-#ifndef __com_sun_star_awt_Rectangle_idl__
-#include <com/sun/star/awt/Rectangle.idl>
-#endif
-
-
-//=============================================================================
+#include <com/sun/star/awt/MessageBoxType.idl>
 
 module com { module sun { module star { module awt {
-    
-//============================================================================= 
 
 /** specifies a factory interface for creating message boxes.
  */
 published interface XMessageBoxFactory : com::sun::star::uno::XInterface
 {
-	//-------------------------------------------------------------------------
-    
-	/** creates a message box.
-
-        @returns 
-		the created message box or a null reference if it cannot be
-        created.
-
-		@param aParent
-		a valid XWindowPeer reference which is used as a parent. This parameter 
-        must not be null.
-		
-		@param aPosSize
-        a rectangle which defines the position and size of the message
-        box in pixel.
-        
+    /** creates a message box.
+
+        @returns
+            the created message box or a null reference if it cannot be
+            created.
+
+        @param aParent
+            a valid XWindowPeer reference which is used as a parent.
+
+            <p>This parameter must not be null.</p>
+
         @param aType
-        a string which determines the message box type.
-        The following strings are defined.
-        <ul>
-            <li><b>infobox</b>A message box to inform the user about a
certain event.
-                <b>Attention:</b><br/>This type of message box ignores
the argument
-                aButton because a info box always shows a OK button.
-            </li>
-            <li><b>warningbox</b>A message to warn the user about a certain
problem.</li>
-            <li><b>errorbox</b>A message box to provide an error message
to the user.</li>
-            <li><b>querybox</b>A message box to query information from
the user.</li>
-            <li><b>messbox</b>A normal message box.</li>
-        </ul>         
+            the message box type.
 
         @param aButtons
-		specifies which buttons should be available on the
-        message box. A combination of
-        <type scope="com::sun::star::awt">MessageBoxButtons</type>. An <b>infobox</b>
-        ignores this paramter and always use button "OK".
-		
-		@param aTitle
-		specifies the title of the message box.
+            specifies which buttons should be available on the message box.
+
+            <p>A combination of <type>MessageBoxButtons</type>.</p>
+            <p>A <member scope="com::sun::star::awt">MessageBoxType::INFOBOX</member>
+            ignores this paramter, instead it uses a
+            <member scope="com::sun::star::awt">MessageBoxButtons::BUTTONS_OK</member>.</p>
+
+        @param aTitle
+                specifies the title of the message box.
 
         @param aMessage
-        specifies text which will be shown by the message box. 
-        Line-breaks must be added using 'CR' or 'CR+LF'.
-	*/
-    XMessageBox createMessageBox( [in] com::sun::star::awt::XWindowPeer aParent, [in] com::sun::star::awt::Rectangle
aPosSize, [in] string aType, [in] long aButtons, [in] string aTitle, [in] string aMessage
);
+            specifies text which will be shown by the message box.
+            Line-breaks must be added using 'CR' or 'CR+LF'.
+    */
+    XMessageBox createMessageBox( [in] com::sun::star::awt::XWindowPeer aParent,
+                                  [in] MessageBoxType eType,
+                                  [in] long nButtons,
+                                  [in] string sTitle,
+                                  [in] string sMessage );
 };
 
-//=============================================================================
-
 }; }; }; };
 
 #endif

Modified: openoffice/trunk/main/offapi/com/sun/star/awt/makefile.mk
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/offapi/com/sun/star/awt/makefile.mk?rev=1425608&r1=1425607&r2=1425608&view=diff
==============================================================================
--- openoffice/trunk/main/offapi/com/sun/star/awt/makefile.mk (original)
+++ openoffice/trunk/main/offapi/com/sun/star/awt/makefile.mk Mon Dec 24 09:07:25 2012
@@ -117,7 +117,8 @@ IDLFILES=\
 	MenuEvent.idl\
 	MenuItemStyle.idl\
 	MessageBoxButtons.idl\
-	MessageBoxCommand.idl\
+	MessageBoxResults.idl\
+	MessageBoxType.idl\
 	MouseButton.idl\
 	MouseEvent.idl\
 	MouseWheelBehavior.idl\

Modified: openoffice/trunk/main/offapi/type_reference/types.rdb
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/offapi/type_reference/types.rdb?rev=1425608&r1=1425607&r2=1425608&view=diff
==============================================================================
Binary files - no diff available.

Modified: openoffice/trunk/main/qadevOOo/tests/java/ifc/awt/_XMessageBoxFactory.java
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/qadevOOo/tests/java/ifc/awt/_XMessageBoxFactory.java?rev=1425608&r1=1425607&r2=1425608&view=diff
==============================================================================
--- openoffice/trunk/main/qadevOOo/tests/java/ifc/awt/_XMessageBoxFactory.java (original)
+++ openoffice/trunk/main/qadevOOo/tests/java/ifc/awt/_XMessageBoxFactory.java Mon Dec 24
09:07:25 2012
@@ -52,7 +52,7 @@ public class _XMessageBoxFactory extends
     public void _createMessageBox() {
         final XMessageBox mb = oObj.createMessageBox(
             (XWindowPeer) tEnv.getObjRelation("WINPEER"),
-            new Rectangle(0, 0, 100, 100), "errorbox", 1, "The Title",
+            com.sun.star.awt.MessageBoxType.ERRORBOX, 1, "The Title",
             "The Message");
         final UITools tools = new UITools(
             (XMultiServiceFactory) tParam.getMSF(),

Modified: openoffice/trunk/main/sdext/source/minimizer/unodialog.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sdext/source/minimizer/unodialog.cxx?rev=1425608&r1=1425607&r2=1425608&view=diff
==============================================================================
--- openoffice/trunk/main/sdext/source/minimizer/unodialog.cxx (original)
+++ openoffice/trunk/main/sdext/source/minimizer/unodialog.cxx Mon Dec 24 09:07:25 2012
@@ -339,55 +339,6 @@ void UnoDialog::setControlProperty( cons
 }
 
 // -----------------------------------------------------------------------------
-#if 0
-void UnoDialog::showMessageBox( const OUString& rTitle, const OUString& rMessage,
sal_Bool bErrorBox ) const
-{
-	try
-	{
-		Reference< XMessageBoxFactory > xMessageBoxFactory( mxMSF->getServiceManager()->createInstanceWithContext(
OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.Toolkit" ) ), mxMSF ), UNO_QUERY_THROW
 );
-		if ( xMessageBoxFactory.is() )
-		{
-			Rectangle aRectangle( 0, 0, 0, 0 );
-			Reference< XMessageBox > xMessageBox( xMessageBoxFactory->createMessageBox( mxWindowPeer,
aRectangle,
-				bErrorBox ? OUString( RTL_CONSTASCII_USTRINGPARAM( "errorbox" ) ) : OUString( RTL_CONSTASCII_USTRINGPARAM(
"querybox" ) ), MessageBoxButtons::BUTTONS_OK, rTitle, rMessage ) );
-			Reference< XComponent > xComponent( xMessageBox, UNO_QUERY_THROW );
-			/* sal_Int16 nResult = */ xMessageBox->execute();
-			xComponent->dispose();
-		}
-	}
-	catch ( Exception& )
-	{
-	}
-
-/*
-public void showErrorMessageBox(XWindowPeer _xParentWindowPeer, String _sTitle, String _sMessage){
-XComponent xComponent = null;    
-try {
-    Object oToolkit = m_xMCF.createInstanceWithContext("com.sun.star.awt.Toolkit", m_xContext);
-    XMessageBoxFactory xMessageBoxFactory = (XMessageBoxFactory) UnoRuntime.queryInterface(XMessageBoxFactory.class,
oToolkit);
-    // rectangle may be empty if position is in the center of the parent peer
-
-	Rectangle aRectangle = new Rectangle();
-    XMessageBox xMessageBox = xMessageBoxFactory.createMessageBox(_xParentWindowPeer, aRectangle,
"errorbox", com.sun.star.awt.MessageBoxButtons.BUTTONS_OK, _sTitle, _sMessage);
-    xComponent = (XComponent) UnoRuntime.queryInterface(XComponent.class, xMessageBox);
-    if (xMessageBox != null){
-        short nResult = xMessageBox.execute();
-    }
-} catch (com.sun.star.uno.Exception ex) {
-    ex.printStackTrace(System.out);
-}
-finally{
-    //make sure always to dispose the component and free the memory!
-    if (xComponent != null){
-        xComponent.dispose();
-    }
-}}
-*/
-}
-
-#endif
-
-// -----------------------------------------------------------------------------
 
 sal_Int32 UnoDialog::getMapsFromPixels( sal_Int32 nPixels ) const
 {

Modified: openoffice/trunk/main/swext/mediawiki/src/com/sun/star/wiki/Helper.java
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/swext/mediawiki/src/com/sun/star/wiki/Helper.java?rev=1425608&r1=1425607&r2=1425608&view=diff
==============================================================================
--- openoffice/trunk/main/swext/mediawiki/src/com/sun/star/wiki/Helper.java (original)
+++ openoffice/trunk/main/swext/mediawiki/src/com/sun/star/wiki/Helper.java Mon Dec 24 09:07:25
2012
@@ -24,6 +24,7 @@
 package com.sun.star.wiki;
 
 import com.sun.star.awt.MessageBoxButtons;
+import com.sun.star.awt.MessageBoxType;
 import com.sun.star.awt.XControl;
 import com.sun.star.awt.XControlContainer;
 import com.sun.star.awt.XDialog;
@@ -1008,8 +1009,7 @@ public class Helper 
                         {
                             xMB = xMBFactory.createMessageBox(
                                                      xParentPeer,
-                                                     new com.sun.star.awt.Rectangle(),
-                                                     "querybox",
+                                                     MessageBoxType.QUERYBOX,
                                                      MessageBoxButtons.BUTTONS_YES_NO | MessageBoxButtons.DEFAULT_BUTTON_NO,
                                                      sTitle,
                                                      sError );
@@ -1018,8 +1018,7 @@ public class Helper 
                         {
                             xMB = xMBFactory.createMessageBox(
                                                      xParentPeer,
-                                                     new com.sun.star.awt.Rectangle(),
-                                                     "errorbox",
+                                                     MessageBoxType.ERRORBOX,
                                                      MessageBoxButtons.BUTTONS_OK,
                                                      sTitle,
                                                      sError );

Modified: openoffice/trunk/main/toolkit/inc/toolkit/awt/vclxtoolkit.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/toolkit/inc/toolkit/awt/vclxtoolkit.hxx?rev=1425608&r1=1425607&r2=1425608&view=diff
==============================================================================
--- openoffice/trunk/main/toolkit/inc/toolkit/awt/vclxtoolkit.hxx (original)
+++ openoffice/trunk/main/toolkit/inc/toolkit/awt/vclxtoolkit.hxx Mon Dec 24 09:07:25 2012
@@ -135,7 +135,7 @@ public:	
 	::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > SAL_CALL createSystemChild(
const ::com::sun::star::uno::Any& Parent, const ::com::sun::star::uno::Sequence< sal_Int8
>& ProcessId, sal_Int16 SystemType ) throw(::com::sun::star::uno::RuntimeException);
 
     // ::com::sun::star::awt::XMessageBoxFactory
-    virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMessageBox >
SAL_CALL createMessageBox( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer
>& aParent, const ::com::sun::star::awt::Rectangle& aPosSize, const ::rtl::OUString&
aType, ::sal_Int32 aButtons, const ::rtl::OUString& aTitle, const ::rtl::OUString&
aMessage ) throw (::com::sun::star::uno::RuntimeException);
+    virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMessageBox >
SAL_CALL createMessageBox( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer
>& aParent, ::com::sun::star::awt::MessageBoxType eType, ::sal_Int32 nButtons, const
::rtl::OUString& sTitle, const ::rtl::OUString& sMessage ) throw (::com::sun::star::uno::RuntimeException);
 
     // ::com::sun::star::awt::XDataTransfer
 	::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDragGestureRecognizer
> SAL_CALL getDragGestureRecognizer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow
>& window ) throw(::com::sun::star::uno::RuntimeException);

Modified: openoffice/trunk/main/toolkit/source/awt/vclxtoolkit.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/toolkit/source/awt/vclxtoolkit.cxx?rev=1425608&r1=1425607&r2=1425608&view=diff
==============================================================================
--- openoffice/trunk/main/toolkit/source/awt/vclxtoolkit.cxx (original)
+++ openoffice/trunk/main/toolkit/source/awt/vclxtoolkit.cxx Mon Dec 24 09:07:25 2012
@@ -381,6 +381,47 @@ sal_uInt16 ImplGetComponentType( const S
 }
 
 
+namespace
+{
+    struct MessageBoxTypeInfo
+    {
+        css::awt::MessageBoxType eType;
+        const sal_Char          *pName;
+        sal_Int32                nLen;
+    };
+
+    static MessageBoxTypeInfo aMessageBoxTypeInfo[] =
+    {
+        { css::awt::MessageBoxType_MESSAGEBOX,      RTL_CONSTASCII_STRINGPARAM("messbox")
},
+        { css::awt::MessageBoxType_INFOBOX,         RTL_CONSTASCII_STRINGPARAM("infobox")
},
+        { css::awt::MessageBoxType_WARNINGBOX,      RTL_CONSTASCII_STRINGPARAM("warningbox")
},
+        { css::awt::MessageBoxType_ERRORBOX,        RTL_CONSTASCII_STRINGPARAM("errorbox")
},
+        { css::awt::MessageBoxType_QUERYBOX,        RTL_CONSTASCII_STRINGPARAM("querybox")
},
+        { css::awt::MessageBoxType_MAKE_FIXED_SIZE, 0, 0 }
+    };
+
+    static bool lcl_convertMessageBoxType(
+        rtl::OUString &sType,
+        css::awt::MessageBoxType eType )
+    {
+        const MessageBoxTypeInfo *pMap = aMessageBoxTypeInfo;
+        css::awt::MessageBoxType eVal = css::awt::MessageBoxType_MAKE_FIXED_SIZE;
+
+        while ( pMap->pName )
+        {
+            if ( pMap->eType == eType )
+            {
+                eVal = eType;
+                sType = rtl::OUString( pMap->pName, pMap->nLen, RTL_TEXTENCODING_ASCII_US
);
+                break;
+            }
+            pMap++;
+        }
+
+        return ( eVal != css::awt::MessageBoxType_MAKE_FIXED_SIZE );
+    }
+}
+
 //	----------------------------------------------------
 //	class VCLXToolkit
 //	----------------------------------------------------
@@ -1224,9 +1265,8 @@ css::uno::Reference< css::awt::XWindowPe
 
 // ::com::sun::star::awt::XMessageBoxFactory
 ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMessageBox > SAL_CALL VCLXToolkit::createMessageBox(

-    const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >&
aParent, 
-    const ::com::sun::star::awt::Rectangle& aPosSize, 
-    const ::rtl::OUString& aType, 
+    const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >&
aParent,
+    ::com::sun::star::awt::MessageBoxType eType,
     ::sal_Int32 aButtons, 
     const ::rtl::OUString& aTitle, 
     const ::rtl::OUString& aMessage ) throw (::com::sun::star::uno::RuntimeException)
@@ -1266,12 +1306,14 @@ css::uno::Reference< css::awt::XWindowPe
         nAddWinBits |= WB_ABORT_RETRY_IGNORE;
     if ( sal_Int32( aButtons & 0xffff0000L ) == css::awt::MessageBoxButtons::DEFAULT_BUTTON_IGNORE
)
         nAddWinBits |= WB_DEF_IGNORE;
-    
+
+    rtl::OUString aType;
+    lcl_convertMessageBoxType( aType, eType );
+
     aDescriptor.Type              = css::awt::WindowClass_MODALTOP;
     aDescriptor.WindowServiceName = aType;
     aDescriptor.ParentIndex       = -1;
     aDescriptor.Parent            = aParent;
-    aDescriptor.Bounds            = aPosSize;
     aDescriptor.WindowAttributes  = nWindowAttributes;
     ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMessageBox > xMsgBox(
         ImplCreateWindow( aDescriptor, nAddWinBits ), css::uno::UNO_QUERY );

Modified: openoffice/trunk/main/toolkit/source/layout/core/root.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/toolkit/source/layout/core/root.cxx?rev=1425608&r1=1425607&r2=1425608&view=diff
==============================================================================
--- openoffice/trunk/main/toolkit/source/layout/core/root.cxx (original)
+++ openoffice/trunk/main/toolkit/source/layout/core/root.cxx Mon Dec 24 09:07:25 2012
@@ -82,10 +82,9 @@ void ShowMessageBox( uno::Reference< lan
     uno::Reference< awt::XWindowPeer > xWindowPeer( xContainerWindow, uno::UNO_QUERY_THROW
);
     uno::Reference< awt::XMessageBoxFactory > xMessageBoxFactory( xToolkit, uno::UNO_QUERY
);
 
-    awt::Rectangle aRectangle;
     uno::Reference< awt::XMessageBox > xMessageBox
         = xMessageBoxFactory->createMessageBox
-        ( xWindowPeer, aRectangle, OUString::createFromAscii( "errorbox" ),
+        ( xWindowPeer, awt::MessageBoxType_ERRORBOX,
           awt::MessageBoxButtons::BUTTONS_OK, aTitle, aMessage );
 
     if ( xMessageBox.is() )



Mime
View raw message