summaryrefslogtreecommitdiff
path: root/sw/source/ui/fldui/fldmgr.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-05-26 13:53:19 +0200
committerStephan Bergmann <sbergman@redhat.com>2012-06-04 16:57:55 +0200
commitb3c76dee6d44d07eae404b8d7341e6c88e6c4429 (patch)
treec747dd5bddf94c3b4312c7b1861a5087e76e71d6 /sw/source/ui/fldui/fldmgr.cxx
parenteb68bf18f2d859486c4a737abb2536a6afe45411 (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 'sw/source/ui/fldui/fldmgr.cxx')
-rw-r--r--sw/source/ui/fldui/fldmgr.cxx8
1 files changed, 3 insertions, 5 deletions
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 <svl/stritem.hxx>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
+#include <com/sun/star/text/DefaultNumberingProvider.hpp>
#include <com/sun/star/text/XDefaultNumberingProvider.hpp>
#include <com/sun/star/text/XNumberingTypeInfo.hpp>
#include <com/sun/star/style/NumberingType.hpp>
@@ -1757,11 +1758,8 @@ Reference<XNumberingTypeInfo> SwFldMgr::GetNumberingInfo() const
{
if(!xNumberingInfo.is())
{
- Reference< XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory();
- Reference < XInterface > xI = xMSF->createInstance(
- ::rtl::OUString( "com.sun.star.text.DefaultNumberingProvider" ));
- Reference<XDefaultNumberingProvider> xDefNum(xI, UNO_QUERY);
- OSL_ENSURE(xDefNum.is(), "service missing: \"com.sun.star.text.DefaultNumberingProvider\"");
+ Reference<XComponentContext> xContext( ::comphelper::getProcessComponentContext() );
+ Reference<XDefaultNumberingProvider> xDefNum = text::DefaultNumberingProvider::create(xContext);
((SwFldMgr*)this)->xNumberingInfo = Reference<XNumberingTypeInfo>(xDefNum, UNO_QUERY);
}
return xNumberingInfo;