diff options
author | Noel Grandin <noel@peralex.com> | 2013-05-16 16:17:14 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-05-21 08:23:59 +0200 |
commit | be50ad28f5bbdaeff527f646481ce263843c2401 (patch) | |
tree | 65ecdaa5762dda2d9a42cff394a536bf568ed4f6 /xmlscript/test/imexp.cxx | |
parent | 6c61b20a8d4a6dcac28801cde82a211fb7e30654 (diff) |
fdo#46808, Convert awt::XUnoControlDialog to new style
Change-Id: I40d2e2ddd92186a2ba22ebfbdda8367391e8d355
Diffstat (limited to 'xmlscript/test/imexp.cxx')
-rw-r--r-- | xmlscript/test/imexp.cxx | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/xmlscript/test/imexp.cxx b/xmlscript/test/imexp.cxx index 7d73bd82099c..9466af05b822 100644 --- a/xmlscript/test/imexp.cxx +++ b/xmlscript/test/imexp.cxx @@ -34,24 +34,21 @@ #include <vcl/svapp.hxx> +#include <com/sun/star/awt/UnoControlDialog.hpp> +#include <com/sun/star/awt/UnoControlDialogModel.hpp> +#include <com/sun/star/awt/XToolkit.hpp> +#include <com/sun/star/awt/XControlModel.hpp> +#include <com/sun/star/awt/XControl.hpp> +#include <com/sun/star/awt/XDialog.hpp> +#include <com/sun/star/container/XNameContainer.hpp> #include <com/sun/star/io/XActiveDataSource.hpp> - #include <com/sun/star/lang/XComponent.hpp> #include <com/sun/star/lang/XInitialization.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp> - #include <com/sun/star/registry/XSimpleRegistry.hpp> #include <com/sun/star/registry/XImplementationRegistration.hpp> #include <com/sun/star/uno/XComponentContext.hpp> -#include <com/sun/star/awt/UnoControlDialogModel.hpp> -#include <com/sun/star/awt/XToolkit.hpp> -#include <com/sun/star/awt/XControlModel.hpp> -#include <com/sun/star/awt/XControl.hpp> -#include <com/sun/star/awt/XDialog.hpp> - -#include <com/sun/star/container/XNameContainer.hpp> - using namespace ::rtl; using namespace ::cppu; @@ -185,11 +182,10 @@ void MyApp::Main() importFile( aParam1.getStr(), xContext ) ); OSL_ASSERT( xModel.is() ); - Reference< awt::XControl > xDlg( xMSF->createInstance( "com.sun.star.awt.UnoControlDialog" ), UNO_QUERY ); - xDlg->setModel( Reference< awt::XControlModel >::query( xModel ) ); + Reference< awt::XUnoControlDialog > xDlg = UnoControlDialog::create( xContext );; + xDlg->setModel( xModel ); xDlg->createPeer( xToolkit, 0 ); - Reference< awt::XDialog > xD( xDlg, UNO_QUERY ); - xD->execute(); + xDlg->execute(); if (GetCommandLineParamCount() == 3) { |