summaryrefslogtreecommitdiff
path: root/svx
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 /svx
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 'svx')
-rw-r--r--svx/source/dialog/langbox.cxx1
-rw-r--r--svx/source/unodraw/unoshtxt.cxx18
2 files changed, 7 insertions, 12 deletions
diff --git a/svx/source/dialog/langbox.cxx b/svx/source/dialog/langbox.cxx
index c1dea3af8781..46258ada77da 100644
--- a/svx/source/dialog/langbox.cxx
+++ b/svx/source/dialog/langbox.cxx
@@ -26,7 +26,6 @@
*
************************************************************************/
-#include <com/sun/star/linguistic2/XLinguServiceManager.hpp>
#include <com/sun/star/linguistic2/XAvailableLocales.hpp>
#include <com/sun/star/i18n/ScriptType.hpp>
#include <linguistic/misc.hxx>
diff --git a/svx/source/unodraw/unoshtxt.cxx b/svx/source/unodraw/unoshtxt.cxx
index c1e3110bbfad..ea7a5f92faaf 100644
--- a/svx/source/unodraw/unoshtxt.cxx
+++ b/svx/source/unodraw/unoshtxt.cxx
@@ -51,7 +51,7 @@
#include <editeng/editobj.hxx>
#include <editeng/unotext.hxx>
-#include <com/sun/star/linguistic2/XLinguServiceManager.hpp>
+#include <com/sun/star/linguistic2/LinguServiceManager.hpp>
#include <comphelper/processfactory.hxx>
#include <svx/sdrpaintwindow.hxx>
@@ -100,7 +100,7 @@ private:
SdrOutliner* mpOutliner;
SvxOutlinerForwarder* mpTextForwarder;
SvxDrawOutlinerViewForwarder* mpViewForwarder; // if non-NULL, use GetViewModeTextForwarder text forwarder
- css::uno::Reference< css::linguistic2::XLinguServiceManager > m_xLinguServiceManager;
+ css::uno::Reference< css::linguistic2::XLinguServiceManager2 > m_xLinguServiceManager;
Point maTextOffset;
sal_Bool mbDataValid;
sal_Bool mbDestroyed;
@@ -585,17 +585,13 @@ SvxTextForwarder* SvxTextEditSourceImpl::GetBackgroundTextForwarder()
if ( !m_xLinguServiceManager.is() )
{
- css::uno::Reference< css::lang::XMultiServiceFactory > xMgr( ::comphelper::getProcessServiceFactory() );
- m_xLinguServiceManager = css::uno::Reference< css::linguistic2::XLinguServiceManager >(
- xMgr->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.linguistic2.LinguServiceManager" ))), css::uno::UNO_QUERY );
+ css::uno::Reference< css::uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
+ m_xLinguServiceManager.set(css::linguistic2::LinguServiceManager::create(xContext));
}
- if ( m_xLinguServiceManager.is() )
- {
- css::uno::Reference< css::linguistic2::XHyphenator > xHyphenator( m_xLinguServiceManager->getHyphenator(), css::uno::UNO_QUERY );
- if( xHyphenator.is() )
- mpOutliner->SetHyphenator( xHyphenator );
- }
+ css::uno::Reference< css::linguistic2::XHyphenator > xHyphenator( m_xLinguServiceManager->getHyphenator(), css::uno::UNO_QUERY );
+ if( xHyphenator.is() )
+ mpOutliner->SetHyphenator( xHyphenator );
}