summaryrefslogtreecommitdiff
path: root/i18npool
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-10-15 15:20:48 +0200
committerStephan Bergmann <sbergman@redhat.com>2012-10-23 15:27:49 +0200
commitc0f865c9b5a34b272c9e0b22d18969554265914a (patch)
treeee4bc2c0579245e92f51c82d91136e32cce7c9ca /i18npool
parente41f21b4165e40e1564cc75928b4b085ce7072e1 (diff)
fdo#46808, use service constructor for i18n::BreakIterator
Note that I found a pre-existing bug in linguistic/source/gciterator.cxx but I was not able to fix it, because doing so appears to expose bugs elsewhere! Change-Id: I17fb9108d98a98d0ae13fe5a8e043d2db5b27a6a
Diffstat (limited to 'i18npool')
-rw-r--r--i18npool/Library_i18nsearch.mk1
-rw-r--r--i18npool/source/search/textsearch.cxx8
2 files changed, 3 insertions, 6 deletions
diff --git a/i18npool/Library_i18nsearch.mk b/i18npool/Library_i18nsearch.mk
index d4499c8cade1..b587e13f52c2 100644
--- a/i18npool/Library_i18nsearch.mk
+++ b/i18npool/Library_i18nsearch.mk
@@ -39,6 +39,7 @@ $(eval $(call gb_Library_set_include,i18nsearch,\
$(eval $(call gb_Library_use_sdk_api,i18nsearch))
$(eval $(call gb_Library_use_libraries,i18nsearch,\
+ comphelper \
cppu \
cppuhelper \
i18nregexp \
diff --git a/i18npool/source/search/textsearch.cxx b/i18npool/source/search/textsearch.cxx
index 8c2d554884ec..115e481959e6 100644
--- a/i18npool/source/search/textsearch.cxx
+++ b/i18npool/source/search/textsearch.cxx
@@ -33,6 +33,7 @@
#include <com/sun/star/lang/Locale.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <comphelper/processfactory.hxx>
+#include <com/sun/star/i18n/BreakIterator.hpp>
#include <com/sun/star/i18n/UnicodeType.hpp>
#include <com/sun/star/util/SearchFlags.hpp>
#include <com/sun/star/i18n/WordType.hpp>
@@ -150,12 +151,7 @@ void TextSearch::setOptions( const SearchOptions& rOptions ) throw( RuntimeExcep
if ( !xBreak.is() )
{
- Reference < XInterface > xI = xMSF->createInstance(
- OUString("com.sun.star.i18n.BreakIterator"));
- if( xI.is() )
- xI->queryInterface( ::getCppuType(
- (const Reference< XBreakIterator >*)0))
- >>= xBreak;
+ xBreak = BreakIterator::create(comphelper::getComponentContext(xMSF));
}
sSrchStr = aSrchPara.searchString;