From c2ca6fabd1afc3fc07001721c2069d3c8db7000a Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Sat, 29 Sep 2012 17:20:22 +0200 Subject: Use comphelper::getComponentContext ...and some further clean up. Change-Id: Id294c0f38fe0041646fc86cacbd2e19734c746a9 --- basctl/source/basicide/moduldlg.cxx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'basctl/source/basicide/moduldlg.cxx') diff --git a/basctl/source/basicide/moduldlg.cxx b/basctl/source/basicide/moduldlg.cxx index 0d0d867c4e4a..4a8cdb5e6261 100644 --- a/basctl/source/basicide/moduldlg.cxx +++ b/basctl/source/basicide/moduldlg.cxx @@ -28,7 +28,6 @@ #include "iderdll.hxx" #include -#include #include #include #include @@ -288,10 +287,8 @@ void Shell::CopyDialogResources( Reference< container::XNameContainer > xDialogModel = Reference< container::XNameContainer >( xMSF->createInstance ( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlDialogModel" ) ) ), UNO_QUERY ); Reference< io::XInputStream > xInput( io_xISP->createInputStream() ); - Reference< XComponentContext > xContext; - Reference< beans::XPropertySet > xProps( xMSF, UNO_QUERY ); - OSL_ASSERT( xProps.is() ); - OSL_VERIFY( xProps->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultContext")) ) >>= xContext ); + Reference< XComponentContext > xContext( + comphelper::getComponentContext( xMSF ) ); ::xmlscript::importDialogModel( xInput, xDialogModel, xContext, rSourceDoc.isDocument() ? rSourceDoc.getDocument() : Reference< frame::XModel >() ); if( xDialogModel.is() ) -- cgit