From 805c6101b3427cc98b53f1c48f22f705206c384d Mon Sep 17 00:00:00 2001 From: Ariel Constenla-Haile Date: Mon, 24 Dec 2012 08:07:25 +0000 Subject: 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 --- odk/examples/DevelopersGuide/Charts/SelectionChangeListener.java | 4 ++-- odk/examples/DevelopersGuide/GUI/MessageBox.java | 5 ++--- odk/examples/cpp/complextoolbarcontrols/MyProtocolHandler.cxx | 3 +-- odk/examples/java/Inspector/Inspector.java | 3 +-- 4 files changed, 6 insertions(+), 9 deletions(-) (limited to 'odk') diff --git a/odk/examples/DevelopersGuide/Charts/SelectionChangeListener.java b/odk/examples/DevelopersGuide/Charts/SelectionChangeListener.java index 5c10a0f55433..d544d03abdf3 100644 --- a/odk/examples/DevelopersGuide/Charts/SelectionChangeListener.java +++ b/odk/examples/DevelopersGuide/Charts/SelectionChangeListener.java @@ -56,6 +56,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 __________ @@ -204,10 +205,9 @@ public class SelectionChangeListener implements XSelectionChangeListener { XWindow xWin = aDesktop.getCurrentFrame().getContainerWindow(); XWindowPeer aWinPeer = UnoRuntime.queryInterface(XWindowPeer.class, xWin); - Rectangle aRect = new Rectangle(); int button = com.sun.star.awt.MessageBoxButtons.BUTTONS_OK; XMessageBoxFactory aMBF = 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(); } } diff --git a/odk/examples/DevelopersGuide/GUI/MessageBox.java b/odk/examples/DevelopersGuide/GUI/MessageBox.java index 90cf5c862315..bcc04bc88d13 100644 --- a/odk/examples/DevelopersGuide/GUI/MessageBox.java +++ b/odk/examples/DevelopersGuide/GUI/MessageBox.java @@ -33,6 +33,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; @@ -173,9 +174,7 @@ public class MessageBox { try { Object oToolkit = m_xMCF.createInstanceWithContext("com.sun.star.awt.Toolkit", m_xContext); 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 = UnoRuntime.queryInterface(XComponent.class, xMessageBox); if (xMessageBox != null){ short nResult = xMessageBox.execute(); diff --git a/odk/examples/cpp/complextoolbarcontrols/MyProtocolHandler.cxx b/odk/examples/cpp/complextoolbarcontrols/MyProtocolHandler.cxx index 057fe46ef372..d13da536c103 100644 --- a/odk/examples/cpp/complextoolbarcontrols/MyProtocolHandler.cxx +++ b/odk/examples/cpp/complextoolbarcontrols/MyProtocolHandler.cxx @@ -53,8 +53,7 @@ void BaseDispatch::ShowMessageBox( const Reference< XFrame >& rFrame, const ::rt { Reference< XMessageBox > xMsgBox = xMsgBoxFactory->createMessageBox( Reference< XWindowPeer >( rFrame->getContainerWindow(), UNO_QUERY ), - Rectangle(0,0,300,200), - rtl::OUString( "infobox" ), + com::sun::star::awt::MessageBoxType_INFOBOX, MessageBoxButtons::BUTTONS_OK, aTitle, aMsgText ); diff --git a/odk/examples/java/Inspector/Inspector.java b/odk/examples/java/Inspector/Inspector.java index b1b3851191e6..fd9954dc0345 100644 --- a/odk/examples/java/Inspector/Inspector.java +++ b/odk/examples/java/Inspector/Inspector.java @@ -192,8 +192,7 @@ public class Inspector{ try { Object oToolkit = m_xComponentContext.getServiceManager().createInstanceWithContext("com.sun.star.awt.Toolkit", m_xComponentContext); 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, com.sun.star.awt.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(); -- cgit -3+backports'>distro/lhm/libreoffice-7-3+backports LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
path: root/sd/uiconfig/simpress/popupmenu/textbox.xml
AgeCommit message (Expand)Author
2023-10-20tdf#157026 sd notebookbar: add ObjectAlign to MenuTable as popupmenuJustin Luth
2020-09-13Popup menus cleaned up in respect to DistributeSelectionHeiko Tietze
2020-03-04tdf#125757 Impress context menu add animation commandandreas kainz
2019-06-28tdf#125748 Add context menu entry to execute interactionSamuel Mehrbrodt
2019-05-15tdf#125303 bring back Autofit to textbox commandandreas kainz
2019-03-06sync sdraw and simpress ui files with swriter ui filesandreas kainz
2018-10-30context menu: finish draw and calc context menuesandreas kainz
2018-10-22sd: Use the regular textbox popupmenu for outline text objectsMaxim Monastirsky