summaryrefslogtreecommitdiff
path: root/extensions/source/update
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-05-16 16:17:14 +0200
committerNoel Grandin <noel@peralex.com>2013-05-21 08:23:59 +0200
commitbe50ad28f5bbdaeff527f646481ce263843c2401 (patch)
tree65ecdaa5762dda2d9a42cff394a536bf568ed4f6 /extensions/source/update
parent6c61b20a8d4a6dcac28801cde82a211fb7e30654 (diff)
fdo#46808, Convert awt::XUnoControlDialog to new style
Change-Id: I40d2e2ddd92186a2ba22ebfbdda8367391e8d355
Diffstat (limited to 'extensions/source/update')
-rw-r--r--extensions/source/update/check/updatehdl.cxx16
1 files changed, 5 insertions, 11 deletions
diff --git a/extensions/source/update/check/updatehdl.cxx b/extensions/source/update/check/updatehdl.cxx
index 22ddd5d02c2d..1852581b9751 100644
--- a/extensions/source/update/check/updatehdl.cxx
+++ b/extensions/source/update/check/updatehdl.cxx
@@ -31,9 +31,10 @@
#include <com/sun/star/style/VerticalAlignment.hpp>
-#include "com/sun/star/awt/UnoControlDialogModel.hpp"
#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/UnoControlDialogModel.hpp"
#include "com/sun/star/awt/VclWindowPeerAttribute.hpp"
#include "com/sun/star/awt/WindowAttribute.hpp"
#include "com/sun/star/awt/XButton.hpp"
@@ -1320,26 +1321,19 @@ void UpdateHandler::createDialog()
aProps);
}
- uno::Reference< lang::XMultiComponentFactory > xFactory( mxContext->getServiceManager(), uno::UNO_QUERY_THROW );
- 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] );