diff options
author | Ariel Constenla-Haile <arielch@apache.org> | 2012-12-24 08:07:25 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-07-11 13:16:58 +0100 |
commit | 805c6101b3427cc98b53f1c48f22f705206c384d (patch) | |
tree | 6319897b3ee481a664bd0ce3e38b55ad333f56e7 /offapi | |
parent | fdo#63211 - embed images in HTML export. (diff) | |
download | core-805c6101b3427cc98b53f1c48f22f705206c384d.tar.gz core-805c6101b3427cc98b53f1c48f22f705206c384d.zip |
Resolves: #i121544# - Clean-up MessageBox API
(cherry picked from commit 27cfcb1e9d103b3e49c1263b1fa59fee8b187b21)
Conflicts:
desktop/test/deployment/active/active_native.cxx
desktop/test/deployment/passive/Dispatch.java
desktop/test/deployment/passive/passive_native.cxx
odk/examples/DevelopersGuide/Charts/SelectionChangeListener.java
odk/examples/DevelopersGuide/GUI/MessageBox.java
odk/examples/cpp/complextoolbarcontrols/MyProtocolHandler.cxx
odk/examples/java/Inspector/Inspector.java
offapi/com/sun/star/awt/MessageBoxButtons.idl
offapi/com/sun/star/awt/MessageBoxResults.idl
offapi/com/sun/star/awt/XMessageBox.idl
offapi/com/sun/star/awt/XMessageBoxFactory.idl
offapi/com/sun/star/awt/makefile.mk
offapi/type_reference/types.rdb
sdext/source/minimizer/unodialog.cxx
toolkit/inc/toolkit/awt/vclxtoolkit.hxx
toolkit/source/awt/vclxtoolkit.cxx
toolkit/source/layout/core/root.cxx
Change-Id: I170b494fb96362bb25ba8d0f2518d4e46934dd67
Related: #i121544# - Clean-up MessageBox API (post fix)
(cherry picked from commit c9f7a06e7798bcd5253844c49d210ea9345bd4b8)
Conflicts:
sw/inc/pch/precompiled_sw.hxx
Change-Id: Ib8b1e7aaac769feff5206fcdd238c487a6130dd1
Related: #i121544# - Fix header guards
Found by: Tsutomu Uchino
(cherry picked from commit 82194a19ff4f29c8451c8e6ab6fe4f1b9d08df27)
Conflicts:
offapi/com/sun/star/awt/MessageBoxType.idl
Change-Id: Ide8ba697fbc80395d2f30a068a0820a6afa3332f
Diffstat (limited to 'offapi')
-rw-r--r-- | offapi/UnoApi_offapi.mk | 3 | ||||
-rw-r--r-- | offapi/com/sun/star/awt/MessageBoxButtons.idl | 6 | ||||
-rw-r--r-- | offapi/com/sun/star/awt/MessageBoxResults.idl | 58 | ||||
-rw-r--r-- | offapi/com/sun/star/awt/MessageBoxType.idl (renamed from offapi/com/sun/star/awt/MessageBoxCommand.idl) | 45 | ||||
-rw-r--r-- | offapi/com/sun/star/awt/XMessageBox.idl | 35 | ||||
-rw-r--r-- | offapi/com/sun/star/awt/XMessageBoxFactory.idl | 53 | ||||
-rw-r--r-- | offapi/type_reference/offapi.rdb | bin | 6833664 -> 6824448 bytes |
7 files changed, 110 insertions, 90 deletions
diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk index c743345de38b..495eea612eec 100644 --- a/offapi/UnoApi_offapi.mk +++ b/offapi/UnoApi_offapi.mk @@ -1745,7 +1745,8 @@ $(eval $(call gb_UnoApi_add_idlfiles,offapi,offapi/com/sun/star/awt,\ MenuItemStyle \ MenuItemType \ MessageBoxButtons \ - MessageBoxCommand \ + MessageBoxResults \ + MessageBoxType \ MouseButton \ MouseEvent \ MouseWheelBehavior \ diff --git a/offapi/com/sun/star/awt/MessageBoxButtons.idl b/offapi/com/sun/star/awt/MessageBoxButtons.idl index 729f603e698c..a893cf7828f6 100644 --- a/offapi/com/sun/star/awt/MessageBoxButtons.idl +++ b/offapi/com/sun/star/awt/MessageBoxButtons.idl @@ -19,9 +19,7 @@ #ifndef __com_sun_star_awt_MessageBoxButtons_idl__ #define __com_sun_star_awt_MessageBoxButtons_idl__ - - module com { module sun { module star { module awt { - +module com { module sun { module star { module awt { /** defines constants for the possible message box button combinations. @@ -29,7 +27,6 @@ */ constants MessageBoxButtons { - /** specifies a message with "OK" button. */ const long BUTTONS_OK = 1; @@ -79,7 +76,6 @@ constants MessageBoxButtons const long DEFAULT_BUTTON_IGNORE = 0x60000; }; - }; }; }; }; #endif diff --git a/offapi/com/sun/star/awt/MessageBoxResults.idl b/offapi/com/sun/star/awt/MessageBoxResults.idl new file mode 100644 index 000000000000..975708601ee4 --- /dev/null +++ b/offapi/com/sun/star/awt/MessageBoxResults.idl @@ -0,0 +1,58 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * 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 . + */ + +#ifndef __com_sun_star_awt_MessageBoxResults_idl__ +#define __com_sun_star_awt_MessageBoxResults_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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/awt/MessageBoxCommand.idl b/offapi/com/sun/star/awt/MessageBoxType.idl index 2483d0048133..abb2913e32bf 100644 --- a/offapi/com/sun/star/awt/MessageBoxCommand.idl +++ b/offapi/com/sun/star/awt/MessageBoxType.idl @@ -1,4 +1,3 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * @@ -16,40 +15,36 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#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 { - - module com { module sun { module star { module awt { - - -/** specifies a message box command. - - @deprecated +/** specifies the type of a <type>XMessageBox</type>. */ -published constants MessageBoxCommand +published enum MessageBoxType { + /** A normal message box. + */ + MESSAGEBOX, - const short CANCEL = 0; - - - const short OK = 1; + /** A message box to inform the user about a certain event + */ + INFOBOX, + /** A message to warn the user about a certain problem. + */ + WARNINGBOX, - const short YES = 2; - - - const short NO = 3; - - - const short RETRY = 4; + /** A message box to provide an error message to the user. + */ + ERRORBOX, + /** A message box to query information from the user. + */ + QUERYBOX }; - }; }; }; }; #endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/awt/XMessageBox.idl b/offapi/com/sun/star/awt/XMessageBox.idl index ec9b4f083786..070b8a853e58 100644 --- a/offapi/com/sun/star/awt/XMessageBox.idl +++ b/offapi/com/sun/star/awt/XMessageBox.idl @@ -21,45 +21,28 @@ #include <com/sun/star/uno/XInterface.idl> - - - module com { module sun { module star { module awt { - +module com { module sun { module star { module awt { /** gives access to a message box. - - @deprecated */ -published interface XMessageBox: com::sun::star::uno::XInterface +published interface XMessageBox { - - /** sets the caption text. - */ - void setCaptionText( [in] string aText ); - - - /** returns the caption text. + /** the caption text. */ - string getCaptionText(); + [attribute] string CaptionText; - - /** sets the message text. - */ - void setMessageText( [in] string aText ); - - - /** returns the message text. + /** the message text. */ - string getMessageText(); - + [attribute] string MessageText; /** shows the message box. + + @return + one of <type>MessageBoxResults</type>. */ short execute(); - }; - }; }; }; }; #endif diff --git a/offapi/com/sun/star/awt/XMessageBoxFactory.idl b/offapi/com/sun/star/awt/XMessageBoxFactory.idl index 1bef4766f8a3..22b0b7bb1522 100644 --- a/offapi/com/sun/star/awt/XMessageBoxFactory.idl +++ b/offapi/com/sun/star/awt/XMessageBoxFactory.idl @@ -23,63 +23,50 @@ #include <com/sun/star/awt/XWindowPeer.idl> #include <com/sun/star/awt/XMessageBox.idl> #include <com/sun/star/awt/MessageBoxButtons.idl> -#include <com/sun/star/awt/Rectangle.idl> - - +#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. + 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. + a valid XWindowPeer reference which is used as a parent. - @param aPosSize - a rectangle which defines the position and size of the message - box in pixel. + <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 - com::sun::star::awt::MessageBoxButtons. An <b>infobox</b> - ignores this parameter and always use button "OK". + specifies which buttons should be available on the message box. + + <p>A combination of com::sun::star::awt::MessageBoxButtons</p> + <p>A com::sun::star::awt::MessageBoxType::INFOBOX + ignores this paramter, instead it uses a + com::sun::star::awt::MessageBoxButtons::BUTTONS_OK.</p> @param aTitle - specifies the title of the message box. + 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". + 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 ); + XMessageBox createMessageBox( [in] com::sun::star::awt::XWindowPeer aParent, + [in] MessageBoxType eType, + [in] long nButtons, + [in] string sTitle, + [in] string sMessage ); }; - }; }; }; }; #endif diff --git a/offapi/type_reference/offapi.rdb b/offapi/type_reference/offapi.rdb Binary files differindex 06daf3b11647..7c06f1a2c131 100644 --- a/offapi/type_reference/offapi.rdb +++ b/offapi/type_reference/offapi.rdb |