diff options
author | Noel Grandin <noel@peralex.com> | 2013-01-10 09:49:22 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-01-28 08:23:11 +0200 |
commit | 4ce614f50b572f5e80c1d26e7ffe72c1bb07a0d9 (patch) | |
tree | 8e28ccfc92da51c6ca42a6bf332da397bdfcd18e /vbahelper | |
parent | 614e31aa24b51a6e4f5c4f26d51b3d880db643b1 (diff) |
fdo#46808, convert some code to use getProcessComponentContext
these VBA services should be left alone, according to Noel Power.
Change-Id: Iee394f73fa99c18d6b70892bff9b0e2122f67d69
Diffstat (limited to 'vbahelper')
-rw-r--r-- | vbahelper/source/vbahelper/vbashape.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/vbahelper/source/vbahelper/vbashape.cxx b/vbahelper/source/vbahelper/vbashape.cxx index bd7458e21309..98a697d2e0b0 100644 --- a/vbahelper/source/vbahelper/vbashape.cxx +++ b/vbahelper/source/vbahelper/vbashape.cxx @@ -329,11 +329,11 @@ ScVbaShape::TextFrame() throw (uno::RuntimeException) uno::Reference< lang::XServiceInfo > xServiceInfo( m_xModel, uno::UNO_QUERY_THROW ); if( xServiceInfo->supportsService( "com.sun.star.sheet.SpreadsheetDocument" ) ) { - uno::Reference< lang::XMultiServiceFactory > xSF( comphelper::getProcessServiceFactory(), uno::UNO_QUERY_THROW ); + uno::Reference< uno::XComponentContext > xContext = comphelper::getProcessComponentContext(); uno::Sequence< uno::Any > aArgs(2); aArgs[0] = uno::makeAny( getParent() ); aArgs[1] <<= m_xShape; - uno::Reference< uno::XInterface > xTextFrame( xSF->createInstanceWithArguments( "ooo.vba.excel.TextFrame" , aArgs ) , uno::UNO_QUERY_THROW ); + uno::Reference< uno::XInterface > xTextFrame = xContext->getServiceManager()->createInstanceWithArgumentsAndContext( "ooo.vba.excel.TextFrame" , aArgs, xContext ); return uno::makeAny( xTextFrame ); } @@ -666,11 +666,11 @@ ScVbaShape::WrapFormat() throw (uno::RuntimeException) uno::Reference< lang::XServiceInfo > xServiceInfo( m_xModel, uno::UNO_QUERY_THROW ); if( xServiceInfo->supportsService( "com.sun.star.text.TextDocument" )) { - uno::Reference< lang::XMultiServiceFactory > xSF( comphelper::getProcessServiceFactory(), uno::UNO_QUERY_THROW ); + uno::Reference< uno::XComponentContext > xContext = comphelper::getProcessComponentContext(); uno::Sequence< uno::Any > aArgs(2); aArgs[0] = uno::makeAny( getParent() ); aArgs[1] <<= m_xShape; - uno::Reference< uno::XInterface > xWrapFormat( xSF->createInstanceWithArguments( "ooo.vba.word.WrapFormat" , aArgs ) , uno::UNO_QUERY_THROW ); + uno::Reference< uno::XInterface > xWrapFormat = xContext->getServiceManager()->createInstanceWithArgumentsAndContext( "ooo.vba.word.WrapFormat" , aArgs, xContext ); return uno::makeAny( xWrapFormat ); } throw uno::RuntimeException( "Not implemented" , uno::Reference< uno::XInterface >() ); |