summaryrefslogtreecommitdiff
path: root/xmlscript/test
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 /xmlscript/test
parent61fffd72ac9f09b95faf266f29e643c7bff802bd (diff)
fdo#46808, Convert awt::UnoControlDialog to new style
Change-Id: I9a5256c8dbacda60167403b4e26900588943a9b2
Diffstat (limited to 'xmlscript/test')
-rw-r--r--xmlscript/test/imexp.cxx24
1 files changed, 10 insertions, 14 deletions
diff --git a/xmlscript/test/imexp.cxx b/xmlscript/test/imexp.cxx
index de88975f1191..37f34125cd4c 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/Toolkit.hpp>
-#include <com/sun/star/io/XActiveDataSource.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/lang/XComponent.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-
+#include <com/sun/star/io/XActiveDataSource.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/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;
@@ -186,11 +183,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)
{