summaryrefslogtreecommitdiff
path: root/vcl/source/gdi/outdev3.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-10-26 14:24:46 +0200
committerStephan Bergmann <sbergman@redhat.com>2012-10-30 11:02:39 +0100
commit43d9f35c2665e55cfb5ee911a554ef71933ad4d1 (patch)
treed3b5d69db549ae13f0bc2a29c6905fe4235f4737 /vcl/source/gdi/outdev3.cxx
parent273ee9838cb87d6cf910a92969592709eba650f9 (diff)
fdo#46808, Adapt linguistic2::LinguServiceManager UNO service to new style
Create a merged XLinguServiceManager2 interface for this service to implement. Which is backwards-compatible, but does not require creating a new service. Change-Id: I297bada1066cd74809108641b56ee4d5898112ec
Diffstat (limited to 'vcl/source/gdi/outdev3.cxx')
-rw-r--r--vcl/source/gdi/outdev3.cxx16
1 files changed, 5 insertions, 11 deletions
diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx
index 4a0451e29a3c..f1994bff9cba 100644
--- a/vcl/source/gdi/outdev3.cxx
+++ b/vcl/source/gdi/outdev3.cxx
@@ -81,7 +81,8 @@
#include "com/sun/star/beans/PropertyValues.hpp"
#include "com/sun/star/i18n/XBreakIterator.hpp"
#include "com/sun/star/i18n/WordType.hpp"
-#include "com/sun/star/linguistic2/XLinguServiceManager.hpp"
+#include "com/sun/star/linguistic2/LinguServiceManager.hpp"
+#include <comphelper/processfactory.hxx>
#if defined UNX
#define GLYPH_FONT_HEIGHT 128
@@ -4928,17 +4929,10 @@ long OutputDevice::ImplGetTextLines( ImplMultiTextLineInfo& rLineInfo,
::rtl::OUString aText( rStr );
uno::Reference < i18n::XBreakIterator > xBI;
// get service provider
- uno::Reference< lang::XMultiServiceFactory > xSMgr( unohelper::GetMultiServiceFactory() );
+ uno::Reference< uno::XComponentContext > xContext( comphelper::getProcessComponentContext() );
- uno::Reference< linguistic2::XHyphenator > xHyph;
- if( xSMgr.is() )
- {
- uno::Reference< linguistic2::XLinguServiceManager> xLinguMgr(xSMgr->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.linguistic2.LinguServiceManager"))),uno::UNO_QUERY);
- if ( xLinguMgr.is() )
- {
- xHyph = xLinguMgr->getHyphenator();
- }
- }
+ uno::Reference< linguistic2::XLinguServiceManager2> xLinguMgr = linguistic2::LinguServiceManager::create(xContext);
+ uno::Reference< linguistic2::XHyphenator > xHyph = xLinguMgr->getHyphenator();
i18n::LineBreakHyphenationOptions aHyphOptions( xHyph, uno::Sequence <beans::PropertyValue>(), 1 );
i18n::LineBreakUserOptions aUserOptions;