summaryrefslogtreecommitdiff
path: root/drawinglayer/source/primitive2d
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 /drawinglayer/source/primitive2d
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 'drawinglayer/source/primitive2d')
-rw-r--r--drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx b/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx
index 1c6fca4b8200..68ebc91d9add 100644
--- a/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx
@@ -36,7 +36,7 @@
#include <com/sun/star/i18n/WordType.hpp>
#include <drawinglayer/primitive2d/texteffectprimitive2d.hxx>
#include <drawinglayer/primitive2d/shadowprimitive2d.hxx>
-#include <com/sun/star/i18n/XBreakIterator.hpp>
+#include <com/sun/star/i18n/BreakIterator.hpp>
#include <drawinglayer/primitive2d/transformprimitive2d.hxx>
#include <drawinglayer/primitive2d/textlineprimitive2d.hxx>
#include <drawinglayer/primitive2d/textstrikeoutprimitive2d.hxx>
@@ -206,11 +206,11 @@ namespace drawinglayer
if(!xLocalBreakIterator.is())
{
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xMSF(::comphelper::getProcessServiceFactory());
- xLocalBreakIterator.set(xMSF->createInstance("com.sun.star.i18n.BreakIterator"), ::com::sun::star::uno::UNO_QUERY);
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > xContext(::comphelper::getProcessComponentContext());
+ xLocalBreakIterator = com::sun::star::i18n::BreakIterator::create(xContext);
}
- if(xLocalBreakIterator.is() && getTextLength())
+ if( getTextLength() )
{
// init word iterator, get first word and truncate to possibilities
::com::sun::star::i18n::Boundary aNextWordBoundary(xLocalBreakIterator->getWordBoundary(