diff options
author | Ariel Constenla-Haile <arielch@apache.org> | 2012-12-24 08:07:25 +0000 |
---|---|---|
committer | Ariel Constenla-Haile <arielch@apache.org> | 2012-12-24 08:07:25 +0000 |
commit | 27cfcb1e9d103b3e49c1263b1fa59fee8b187b21 (patch) | |
tree | 3541a76c1ccb0049f3ae51fbd3620a76dcf0fc50 /sdext | |
parent | 734b532fb77d2d5be7eb7becb6720dbd7b3d8978 (diff) |
i121544 - Clean-up MessageBox API
Notes
Notes:
merged as: 805c6101b3427cc98b53f1c48f22f705206c384d
Diffstat (limited to 'sdext')
-rw-r--r-- | sdext/source/minimizer/unodialog.cxx | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/sdext/source/minimizer/unodialog.cxx b/sdext/source/minimizer/unodialog.cxx index 38a3db7d85c0..3bd352271d6a 100644 --- a/sdext/source/minimizer/unodialog.cxx +++ b/sdext/source/minimizer/unodialog.cxx @@ -339,55 +339,6 @@ void UnoDialog::setControlProperty( const OUString& rControlName, const OUString } // ----------------------------------------------------------------------------- -#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 { |