From b3c76dee6d44d07eae404b8d7341e6c88e6c4429 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Sat, 26 May 2012 13:53:19 +0200 Subject: fdo#46808, Adapt UNO services to new style, Part 7, updating ::create Update calls to factories to use new ::create methods Change-Id: I01d4417820f52718836c92faf3c2fae0dc96b30d Signed-off-by: Stephan Bergmann , added some tweaks. --- sw/source/ui/fldui/fldmgr.cxx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'sw/source/ui/fldui/fldmgr.cxx') diff --git a/sw/source/ui/fldui/fldmgr.cxx b/sw/source/ui/fldui/fldmgr.cxx index c809eead276d..3d1bae935b81 100644 --- a/sw/source/ui/fldui/fldmgr.cxx +++ b/sw/source/ui/fldui/fldmgr.cxx @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include @@ -1757,11 +1758,8 @@ Reference SwFldMgr::GetNumberingInfo() const { if(!xNumberingInfo.is()) { - Reference< XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory(); - Reference < XInterface > xI = xMSF->createInstance( - ::rtl::OUString( "com.sun.star.text.DefaultNumberingProvider" )); - Reference xDefNum(xI, UNO_QUERY); - OSL_ENSURE(xDefNum.is(), "service missing: \"com.sun.star.text.DefaultNumberingProvider\""); + Reference xContext( ::comphelper::getProcessComponentContext() ); + Reference xDefNum = text::DefaultNumberingProvider::create(xContext); ((SwFldMgr*)this)->xNumberingInfo = Reference(xDefNum, UNO_QUERY); } return xNumberingInfo; -- cgit