diff options
Diffstat (limited to 'xmlscript/test/imexp.cxx')
-rw-r--r-- | xmlscript/test/imexp.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/xmlscript/test/imexp.cxx b/xmlscript/test/imexp.cxx index 42cc8851a86c..7d73bd82099c 100644 --- a/xmlscript/test/imexp.cxx +++ b/xmlscript/test/imexp.cxx @@ -44,6 +44,7 @@ #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> @@ -89,7 +90,7 @@ Reference< XComponentContext > createInitialComponentContext( // ----------------------------------------------------------------------- -Reference< container::XNameContainer > importFile( +Reference< awt::XUnoControlDialogModel > importFile( char const * fname, Reference< XComponentContext > const & xContext ) { @@ -105,8 +106,7 @@ Reference< container::XNameContainer > importFile( ::fread( bytes.getArray(), nLength, 1, f ); ::fclose( f ); - Reference< container::XNameContainer > xModel( xContext->getServiceManager()->createInstanceWithContext( - "com.sun.star.awt.UnoControlDialogModel", xContext ), UNO_QUERY ); + Reference< awt::XUnoControlDialogModel > xModel = awt::UnoControlDialogModel::create( xContext ); ::xmlscript::importDialogModel( ::xmlscript::createInputStream( bytes ), xModel, xContext ); return xModel; |