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 /sw | |
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 'sw')
-rw-r--r-- | sw/CppunitTest_sw_filters_test.mk | 1 | ||||
-rw-r--r-- | sw/CppunitTest_sw_subsequent_rtfexport.mk | 1 | ||||
-rw-r--r-- | sw/CppunitTest_sw_subsequent_ww8tok.mk | 1 | ||||
-rw-r--r-- | sw/source/ui/fldui/fldmgr.cxx | 8 | ||||
-rw-r--r-- | sw/source/ui/misc/numberingtypelistbox.cxx | 8 |
5 files changed, 9 insertions, 10 deletions
diff --git a/sw/CppunitTest_sw_filters_test.mk b/sw/CppunitTest_sw_filters_test.mk index 6a91e04c44c2..3b6bcecd926a 100644 --- a/sw/CppunitTest_sw_filters_test.mk +++ b/sw/CppunitTest_sw_filters_test.mk @@ -83,6 +83,7 @@ $(eval $(call gb_CppunitTest_use_components,sw_filters_test,\ i18npool/util/i18npool \ package/util/package2 \ sfx2/util/sfx \ + svtools/util/svt \ sw/util/msword \ sw/util/sw \ toolkit/util/tk \ diff --git a/sw/CppunitTest_sw_subsequent_rtfexport.mk b/sw/CppunitTest_sw_subsequent_rtfexport.mk index f763e5d6bd31..3943f7ebf6c6 100644 --- a/sw/CppunitTest_sw_subsequent_rtfexport.mk +++ b/sw/CppunitTest_sw_subsequent_rtfexport.mk @@ -61,6 +61,7 @@ $(eval $(call gb_CppunitTest_use_components,sw_subsequent_rtfexport,\ package/util/package2 \ sfx2/util/sfx \ svl/source/fsstor/fsstorage \ + svtools/util/svt \ sw/util/msword \ sw/util/sw \ sw/util/swd \ diff --git a/sw/CppunitTest_sw_subsequent_ww8tok.mk b/sw/CppunitTest_sw_subsequent_ww8tok.mk index 069c9179419d..80e00891f266 100644 --- a/sw/CppunitTest_sw_subsequent_ww8tok.mk +++ b/sw/CppunitTest_sw_subsequent_ww8tok.mk @@ -64,6 +64,7 @@ $(eval $(call gb_CppunitTest_use_components,sw_subsequent_ww8tok,\ sw/util/swd \ sfx2/util/sfx \ svl/source/fsstor/fsstorage \ + svtools/util/svt \ toolkit/util/tk \ ucb/source/core/ucb1 \ ucb/source/ucp/file/ucpfile1 \ 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; diff --git a/sw/source/ui/misc/numberingtypelistbox.cxx b/sw/source/ui/misc/numberingtypelistbox.cxx index 8a091f112fcf..4f25c4bb2642 100644 --- a/sw/source/ui/misc/numberingtypelistbox.cxx +++ b/sw/source/ui/misc/numberingtypelistbox.cxx @@ -30,6 +30,7 @@ #include <misc.hrc> #include <cnttab.hxx> #include <com/sun/star/style/NumberingType.hpp> +#include <com/sun/star/text/DefaultNumberingProvider.hpp> #include <com/sun/star/text/XDefaultNumberingProvider.hpp> #include <comphelper/processfactory.hxx> #include <com/sun/star/text/XNumberingTypeInfo.hpp> @@ -50,11 +51,8 @@ SwNumberingTypeListBox::SwNumberingTypeListBox( Window* pWin, const ResId& rResI ListBox(pWin, rResId), pImpl(new SwNumberingTypeListBox_Impl) { - uno::Reference< lang::XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory(); - uno::Reference < uno::XInterface > xI = xMSF->createInstance( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.DefaultNumberingProvider")) ); - uno::Reference<text::XDefaultNumberingProvider> xDefNum(xI, uno::UNO_QUERY); - OSL_ENSURE(xDefNum.is(), "service missing: \"com.sun.star.text.DefaultNumberingProvider\""); + uno::Reference<uno::XComponentContext> xContext( ::comphelper::getProcessComponentContext() ); + uno::Reference<text::XDefaultNumberingProvider> xDefNum = text::DefaultNumberingProvider::create(xContext); pImpl->xInfo = uno::Reference<text::XNumberingTypeInfo>(xDefNum, uno::UNO_QUERY); Reload(nTypeFlags); |