diff options
Diffstat (limited to 'xmloff/source/draw')
-rw-r--r-- | xmloff/source/draw/animationimport.cxx | 11 | ||||
-rw-r--r-- | xmloff/source/draw/shapeexport.cxx | 7 |
2 files changed, 10 insertions, 8 deletions
diff --git a/xmloff/source/draw/animationimport.cxx b/xmloff/source/draw/animationimport.cxx index 035fe7eb6366..12f587e3feae 100644 --- a/xmloff/source/draw/animationimport.cxx +++ b/xmloff/source/draw/animationimport.cxx @@ -644,8 +644,6 @@ AnimationNodeContext::AnimationNodeContext( } else { - Reference< XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory() ); - sal_Int16 nPresetClass = EffectPresetClass::CUSTOM; const sal_Char* pServiceName = 0; @@ -698,10 +696,13 @@ AnimationNodeContext::AnimationNodeContext( pServiceName = 0; } - if( pServiceName && xFactory.is() ) + if( pServiceName ) { - mxNode = Reference< XAnimationNode >( xFactory->createInstance( - OUString::createFromAscii(pServiceName) ), UNO_QUERY_THROW ); + Reference< XComponentContext > xContext( ::comphelper::getProcessComponentContext() ); + + mxNode = Reference< XAnimationNode >( + xContext->getServiceManager()->createInstanceWithContext(OUString::createFromAscii(pServiceName), xContext), + UNO_QUERY_THROW ); if( nPresetClass != EffectPresetClass::CUSTOM ) { diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx index 33d60de33011..14ec5c8c205a 100644 --- a/xmloff/source/draw/shapeexport.cxx +++ b/xmloff/source/draw/shapeexport.cxx @@ -149,9 +149,9 @@ uno::Reference< drawing::XShape > XMLShapeExport::checkForCustomShapeReplacement { aEngine = "com.sun.star.drawing.EnhancedCustomShapeEngine"; } - uno::Reference< lang::XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory() ); + uno::Reference< uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() ); - if ( !aEngine.isEmpty() && xFactory.is() ) + if ( !aEngine.isEmpty() ) { uno::Sequence< uno::Any > aArgument( 1 ); uno::Sequence< beans::PropertyValue > aPropValues( 2 ); @@ -161,7 +161,8 @@ uno::Reference< drawing::XShape > XMLShapeExport::checkForCustomShapeReplacement aPropValues[ 1 ].Name = OUString( "ForceGroupWithText" ); aPropValues[ 1 ].Value <<= bForceGroupWithText; aArgument[ 0 ] <<= aPropValues; - uno::Reference< uno::XInterface > xInterface( xFactory->createInstanceWithArguments( aEngine, aArgument ) ); + uno::Reference< uno::XInterface > xInterface( + xContext->getServiceManager()->createInstanceWithArgumentsAndContext(aEngine, aArgument, xContext) ); if ( xInterface.is() ) { uno::Reference< drawing::XCustomShapeEngine > xCustomShapeEngine( |