diff options
author | Noel Grandin <noel@peralex.com> | 2012-10-15 15:20:48 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-10-23 15:27:49 +0200 |
commit | c0f865c9b5a34b272c9e0b22d18969554265914a (patch) | |
tree | ee4bc2c0579245e92f51c82d91136e32cce7c9ca /svx/source/customshapes | |
parent | e41f21b4165e40e1564cc75928b4b085ce7072e1 (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 'svx/source/customshapes')
-rw-r--r-- | svx/source/customshapes/EnhancedCustomShapeFontWork.cxx | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx index da4394481002..f46c72e9e67c 100644 --- a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx +++ b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx @@ -56,6 +56,7 @@ #include <numeric> #include <algorithm> #include <comphelper/processfactory.hxx> +#include <com/sun/star/i18n/BreakIterator.hpp> #include <com/sun/star/i18n/ScriptType.hpp> #include <basegfx/polygon/b2dpolypolygontools.hxx> #include <com/sun/star/lang/XMultiServiceFactory.hpp> @@ -833,19 +834,14 @@ SdrObject* CreateSdrObjectFromParagraphOutlines( const FWData& rFWData, const Sd return pRet; } -::com::sun::star::uno::Reference < ::com::sun::star::i18n::XBreakIterator > EnhancedCustomShapeFontWork::mxBreakIterator = 0; +Reference < i18n::XBreakIterator > EnhancedCustomShapeFontWork::mxBreakIterator = 0; Reference < i18n::XBreakIterator > EnhancedCustomShapeFontWork::GetBreakIterator() { if ( !mxBreakIterator.is() ) { - Reference< lang::XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory(); - Reference < XInterface > xI = xMSF->createInstance( rtl::OUString("com.sun.star.i18n.BreakIterator") ); - if ( xI.is() ) - { - Any x = xI->queryInterface( ::getCppuType((const Reference< i18n::XBreakIterator >*)0) ); - x >>= mxBreakIterator; - } + Reference< uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext(); + mxBreakIterator = i18n::BreakIterator::create(xContext); } return mxBreakIterator; } |