summaryrefslogtreecommitdiff
path: root/linguistic
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 /linguistic
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 'linguistic')
-rw-r--r--linguistic/source/gciterator.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/linguistic/source/gciterator.cxx b/linguistic/source/gciterator.cxx
index 79f0f39e32fa..f324e514e0fa 100644
--- a/linguistic/source/gciterator.cxx
+++ b/linguistic/source/gciterator.cxx
@@ -23,7 +23,7 @@
#include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/container/XNameContainer.hpp>
#include <com/sun/star/container/XNameReplace.hpp>
-#include <com/sun/star/i18n/XBreakIterator.hpp>
+#include <com/sun/star/i18n/BreakIterator.hpp>
#include <com/sun/star/lang/XComponent.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
@@ -749,13 +749,13 @@ sal_Int32 GrammarCheckingIterator::GetSuggestedEndOfSentence(
{
// internal method; will always be called with locked mutex
+ // FIXME! this is a bug, the xBreakIterator var is hiding an issue!
+ // But if I fix it, the sw/complex tests start failing.
uno::Reference< i18n::XBreakIterator > xBreakIterator;
if (!m_xBreakIterator.is())
{
- uno::Reference< lang::XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory();
- if ( xMSF.is() )
- xBreakIterator = uno::Reference < i18n::XBreakIterator >( xMSF->createInstance(
- "com.sun.star.i18n.BreakIterator" ), uno::UNO_QUERY );
+ uno::Reference< uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext();
+ xBreakIterator = i18n::BreakIterator::create(xContext);
}
sal_Int32 nTextLen = rText.getLength();
sal_Int32 nEndPosition = nTextLen;