summaryrefslogtreecommitdiff
path: root/extensions
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-05-27 11:24:12 +0200
committerNoel Grandin <noel@peralex.com>2013-05-28 08:10:22 +0200
commit1d1825db869d3c633ec222fdaa7e4a813ac0627a (patch)
treed1c84dfbe5780bc063d78c335783fa9cffda800e /extensions
parent61fffd72ac9f09b95faf266f29e643c7bff802bd (diff)
fdo#46808, Convert awt::UnoControlDialog to new style
Change-Id: I9a5256c8dbacda60167403b4e26900588943a9b2
Diffstat (limited to 'extensions')
-rw-r--r--extensions/source/update/check/updatehdl.cxx13
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] );