summaryrefslogtreecommitdiff
path: root/unotools
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-05-30 17:06:05 +0200
committerStephan Bergmann <sbergman@redhat.com>2012-06-06 10:01:22 +0200
commit8a95074eaefd01621dc55db8567b19c8e6157f95 (patch)
treee7558360206acbce87718207ee8b7f4aaab69991 /unotools
parent392a483e1040787857fa09fead0547d567c570b5 (diff)
fdo#46808, Adapt UNO services to new style, Part 7, updating ::create
Update code to use factory method TextSearch::create Change-Id: I7a8b607ed397158ca1e2b834ce61b8b196c8019a
Diffstat (limited to 'unotools')
-rw-r--r--unotools/source/i18n/textsearch.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/unotools/source/i18n/textsearch.cxx b/unotools/source/i18n/textsearch.cxx
index 4e94226ed194..cabbba4ca136 100644
--- a/unotools/source/i18n/textsearch.cxx
+++ b/unotools/source/i18n/textsearch.cxx
@@ -28,6 +28,7 @@
#include <i18npool/mslangid.hxx>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/util/TextSearch.hpp>
#include <com/sun/star/util/SearchFlags.hdl>
#include <com/sun/star/i18n/TransliterationModules.hpp>
#include <unotools/charclass.hxx>
@@ -123,10 +124,8 @@ Reference<XTextSearch> TextSearch::getXTextSearch( const SearchOptions& rPara )
try
{
- Reference< XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory();
- rCache.xTextSearch.set( xMSF->createInstance(
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.util.TextSearch" ) ) ), UNO_QUERY_THROW );
+ Reference< XComponentContext > xContext = ::comphelper::getProcessComponentContext();
+ rCache.xTextSearch.set( ::TextSearch::create(xContext) );
rCache.xTextSearch->setOptions( rPara );
rCache.Options = rPara;
}