diff options
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/source/update/check/updatehdl.cxx | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/extensions/source/update/check/updatehdl.cxx b/extensions/source/update/check/updatehdl.cxx index 96a74aa9a10d..5abe4c8432f4 100644 --- a/extensions/source/update/check/updatehdl.cxx +++ b/extensions/source/update/check/updatehdl.cxx @@ -33,6 +33,7 @@ #include "com/sun/star/awt/ActionEvent.hpp" #include "com/sun/star/awt/PushButtonType.hpp" +#include "com/sun/star/awt/UnoControlDialog.hpp" #include "com/sun/star/awt/VclWindowPeerAttribute.hpp" #include "com/sun/star/awt/WindowAttribute.hpp" #include "com/sun/star/awt/XButton.hpp" @@ -1322,25 +1323,19 @@ void UpdateHandler::createDialog() aProps); } - uno::Reference< awt::XControl > xControl( - xFactory->createInstanceWithContext( "com.sun.star.awt.UnoControlDialog", mxContext), - uno::UNO_QUERY_THROW ); + uno::Reference< awt::XUnoControlDialog > xControl = awt::UnoControlDialog::create( mxContext ); xControl->setModel( xControlModel ); if ( mbVisible == false ) { - uno::Reference< awt::XWindow > xWindow( xControl, uno::UNO_QUERY ); - - if ( xWindow.is() ) - xWindow->setVisible( false ); + xControl->setVisible( false ); } xControl->createPeer( NULL, NULL ); { - uno::Reference< awt::XControlContainer > xContainer (xControl, uno::UNO_QUERY); for ( int i = 0; i < HELP_BUTTON; i++ ) { - uno::Reference< awt::XButton > xButton ( xContainer->getControl( msButtonIDs[i] ), uno::UNO_QUERY); + uno::Reference< awt::XButton > xButton ( xControl->getControl( msButtonIDs[i] ), uno::UNO_QUERY); if (xButton.is()) { xButton->setActionCommand( msButtonIDs[i] ); |