[Libreoffice-commits] core.git: comphelper/source desktop/source include/comphelper

Jan Holesovsky kendy at collabora.com
Tue Oct 3 08:04:13 UTC 2017


 comphelper/source/misc/lok.cxx |   15 ---------------
 desktop/source/lib/init.cxx    |    6 +++++-
 include/comphelper/lok.hxx     |    5 -----
 3 files changed, 5 insertions(+), 21 deletions(-)

New commits:
commit 055766f79ef74e1774d0f434ac13c6276d849902
Author: Jan Holesovsky <kendy at collabora.com>
Date:   Tue Oct 3 10:01:40 2017 +0200

    LOK: getSpellLanguages() is not necessary in comphelper in the end.
    
    Change-Id: If81cd3d4508ba3f44304a9ec9b643bf771e8930c

diff --git a/comphelper/source/misc/lok.cxx b/comphelper/source/misc/lok.cxx
index 4e24ab9d391b..a4f60ac6c565 100644
--- a/comphelper/source/misc/lok.cxx
+++ b/comphelper/source/misc/lok.cxx
@@ -8,11 +8,6 @@
  */
 
 #include <comphelper/lok.hxx>
-#include <comphelper/processfactory.hxx>
-
-#include <com/sun/star/linguistic2/LinguServiceManager.hpp>
-#include <com/sun/star/linguistic2/XSpellChecker.hpp>
-
 
 namespace comphelper
 {
@@ -119,16 +114,6 @@ void statusIndicatorFinish()
         pStatusIndicatorCallback(pStatusIndicatorCallbackData, statusIndicatorCallbackType::Finish, 0);
 }
 
-css::uno::Sequence< css::lang::Locale > getSpellLanguages()
-{
-    css::uno::Reference< css::uno::XComponentContext> xContext = ::comphelper::getProcessComponentContext();
-    css::uno::Reference< css::linguistic2::XLinguServiceManager2 > xLangSrv = css::linguistic2::LinguServiceManager::create(xContext);
-    css::uno::Reference< css::linguistic2::XSpellChecker > xSpell(xLangSrv.is() ? xLangSrv->getSpellChecker() : nullptr, css::uno::UNO_QUERY);
-    css::uno::Reference< css::linguistic2::XSupportedLocales > xLocales(xSpell, css::uno::UNO_QUERY);
-    css::uno::Sequence< css::lang::Locale > aLocales(xLocales.is() ? xLocales->getLocales() : css::uno::Sequence< css::lang::Locale >());
-    return aLocales;
-}
-
 } // namespace LibreOfficeKit
 
 } // namespace comphelper
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index ff186f69eacd..9a0bd8737925 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -2420,7 +2420,11 @@ static void doc_resetSelection(LibreOfficeKitDocument* pThis)
 
 static char* getLanguages(const char* pCommand)
 {
-    uno::Sequence< css::lang::Locale > aLocales(comphelper::LibreOfficeKit::getSpellLanguages());
+    css::uno::Reference< css::uno::XComponentContext> xContext = ::comphelper::getProcessComponentContext();
+    css::uno::Reference< css::linguistic2::XLinguServiceManager2 > xLangSrv = css::linguistic2::LinguServiceManager::create(xContext);
+    css::uno::Reference< css::linguistic2::XSpellChecker > xSpell(xLangSrv.is() ? xLangSrv->getSpellChecker() : nullptr, css::uno::UNO_QUERY);
+    css::uno::Reference< css::linguistic2::XSupportedLocales > xLocales(xSpell, css::uno::UNO_QUERY);
+    css::uno::Sequence< css::lang::Locale > aLocales(xLocales.is() ? xLocales->getLocales() : css::uno::Sequence< css::lang::Locale >());
 
     boost::property_tree::ptree aTree;
     aTree.put("commandName", pCommand);
diff --git a/include/comphelper/lok.hxx b/include/comphelper/lok.hxx
index 22f0c70556c7..7a293ca70352 100644
--- a/include/comphelper/lok.hxx
+++ b/include/comphelper/lok.hxx
@@ -10,10 +10,7 @@
 #ifndef INCLUDED_COMPHELPER_LOK_HXX
 #define INCLUDED_COMPHELPER_LOK_HXX
 
-#include <com/sun/star/lang/Locale.hpp>
-
 #include <comphelper/comphelperdllapi.h>
-#include <comphelper/sequence.hxx>
 
 // Interface between the LibreOfficeKit implementation called by LibreOfficeKit clients and other
 // LibreOffice code.
@@ -71,8 +68,6 @@ COMPHELPER_DLLPUBLIC void statusIndicatorStart();
 COMPHELPER_DLLPUBLIC void statusIndicatorSetValue(int percent);
 COMPHELPER_DLLPUBLIC void statusIndicatorFinish();
 
-COMPHELPER_DLLPUBLIC css::uno::Sequence< css::lang::Locale > getSpellLanguages();
-
 }
 }
 


More information about the Libreoffice-commits mailing list