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. --- editeng/source/items/numitem.cxx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'editeng/source/items') diff --git a/editeng/source/items/numitem.cxx b/editeng/source/items/numitem.cxx index ff1472a19310..039d3e483557 100644 --- a/editeng/source/items/numitem.cxx +++ b/editeng/source/items/numitem.cxx @@ -42,6 +42,7 @@ #include #include #include +#include #include #include #include @@ -75,15 +76,13 @@ void lcl_getFormatter(com::sun::star::uno::Reference xMSF = ::comphelper::getProcessServiceFactory(); - Reference < XInterface > xI = xMSF->createInstance( - ::rtl::OUString( "com.sun.star.text.DefaultNumberingProvider" ) ); - Reference xRet(xI, UNO_QUERY); - DBG_ASSERT(xRet.is(), "service missing: \"com.sun.star.text.DefaultNumberingProvider\""); + Reference xContext( ::comphelper::getProcessComponentContext() ); + Reference xRet = text::DefaultNumberingProvider::create(xContext); _xFormatter = Reference (xRet, UNO_QUERY); } catch(const Exception&) { + SAL_WARN("editeng", "service missing: \"com.sun.star.text.DefaultNumberingProvider\""); } } } -- cgit