summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2017-10-03 10:01:40 +0200
committerJan Holesovsky <kendy@collabora.com>2017-10-03 10:03:45 +0200
commit055766f79ef74e1774d0f434ac13c6276d849902 (patch)
treee73e0f39b8434f28a36eee55f15739956a559aa5
parent9127d1a89cbfba89eb9df6755ea7b9e161cfc67a (diff)
LOK: getSpellLanguages() is not necessary in comphelper in the end.
Change-Id: If81cd3d4508ba3f44304a9ec9b643bf771e8930c
-rw-r--r--comphelper/source/misc/lok.cxx15
-rw-r--r--desktop/source/lib/init.cxx6
-rw-r--r--include/comphelper/lok.hxx5
3 files changed, 5 insertions, 21 deletions
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();
-
}
}