diff options
author | Noel Grandin <noel@peralex.com> | 2012-05-26 13:53:19 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-06-04 16:57:55 +0200 |
commit | b3c76dee6d44d07eae404b8d7341e6c88e6c4429 (patch) | |
tree | c747dd5bddf94c3b4312c7b1861a5087e76e71d6 /editeng/source/items | |
parent | eb68bf18f2d859486c4a737abb2536a6afe45411 (diff) |
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 <sbergman@redhat.com>, added some tweaks.
Diffstat (limited to 'editeng/source/items')
-rw-r--r-- | editeng/source/items/numitem.cxx | 9 |
1 files changed, 4 insertions, 5 deletions
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 <vcl/svapp.hxx> #include <editeng/unolingu.hxx> #include <com/sun/star/text/XNumberingFormatter.hpp> +#include <com/sun/star/text/DefaultNumberingProvider.hpp> #include <com/sun/star/text/XDefaultNumberingProvider.hpp> #include <com/sun/star/style/NumberingType.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp> @@ -75,15 +76,13 @@ void lcl_getFormatter(com::sun::star::uno::Reference<com::sun::star::text::XNumb { try { - Reference< XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory(); - Reference < XInterface > xI = xMSF->createInstance( - ::rtl::OUString( "com.sun.star.text.DefaultNumberingProvider" ) ); - Reference<XDefaultNumberingProvider> xRet(xI, UNO_QUERY); - DBG_ASSERT(xRet.is(), "service missing: \"com.sun.star.text.DefaultNumberingProvider\""); + Reference<XComponentContext> xContext( ::comphelper::getProcessComponentContext() ); + Reference<XDefaultNumberingProvider> xRet = text::DefaultNumberingProvider::create(xContext); _xFormatter = Reference<XNumberingFormatter> (xRet, UNO_QUERY); } catch(const Exception&) { + SAL_WARN("editeng", "service missing: \"com.sun.star.text.DefaultNumberingProvider\""); } } } |