summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/cmake/Copy3rdPartyLibs.cmake3
-rw-r--r--indra/cmake/Hunspell.cmake13
-rw-r--r--indra/llui/llspellcheck.cpp26
-rw-r--r--indra/newview/CMakeLists.txt1
-rwxr-xr-xindra/newview/viewer_manifest.py5
5 files changed, 17 insertions, 31 deletions
diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake
index c2ba9231cc..2dc9d6080a 100644
--- a/indra/cmake/Copy3rdPartyLibs.cmake
+++ b/indra/cmake/Copy3rdPartyLibs.cmake
@@ -57,7 +57,6 @@ if(WINDOWS)
libapr-1.dll
libaprutil-1.dll
nghttp2.dll
- libhunspell.dll
)
# OpenSSL
@@ -185,7 +184,6 @@ elseif(DARWIN)
libaprutil-1.0.dylib
libaprutil-1.dylib
${EXPAT_COPY}
- libhunspell-1.3.0.dylib
libndofdev.dylib
libnghttp2.dylib
libnghttp2.14.dylib
@@ -231,7 +229,6 @@ elseif(LINUX)
libatk-1.0.so
libfreetype.so.6.6.2
libfreetype.so.6
- libhunspell-1.3.so.0.0.0
libopenjp2.so
libuuid.so.16
libuuid.so.16.0.22
diff --git a/indra/cmake/Hunspell.cmake b/indra/cmake/Hunspell.cmake
index bb037c0237..129679febd 100644
--- a/indra/cmake/Hunspell.cmake
+++ b/indra/cmake/Hunspell.cmake
@@ -1,4 +1,5 @@
# -*- cmake -*-
+include(Linking)
include(Prebuilt)
include_guard()
@@ -8,10 +9,16 @@ add_library( ll::hunspell INTERFACE IMPORTED )
use_system_binary(hunspell)
use_prebuilt_binary(libhunspell)
if (WINDOWS)
- target_link_libraries( ll::hunspell INTERFACE libhunspell)
+ target_compile_definitions( ll::hunspell INTERFACE HUNSPELL_STATIC=1)
+ target_link_libraries( ll::hunspell INTERFACE
+ debug ${ARCH_PREBUILT_DIRS_DEBUG}/libhunspell.lib
+ optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libhunspell.lib
+ )
elseif(DARWIN)
- target_link_libraries( ll::hunspell INTERFACE hunspell-1.3)
+ target_link_libraries( ll::hunspell INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/libhunspell-1.7.a
+ )
elseif(LINUX)
- target_link_libraries( ll::hunspell INTERFACE hunspell-1.3)
+ target_link_libraries( ll::hunspell INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/libhunspell-1.7.a
+ )
endif()
target_include_directories( ll::hunspell SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/hunspell)
diff --git a/indra/llui/llspellcheck.cpp b/indra/llui/llspellcheck.cpp
index 9d8eadfd3f..16ffd352cf 100644
--- a/indra/llui/llspellcheck.cpp
+++ b/indra/llui/llspellcheck.cpp
@@ -30,12 +30,7 @@
#include "llsdserialize.h"
#include "llspellcheck.h"
-#if LL_WINDOWS
- #include <hunspell/hunspelldll.h>
- #pragma comment(lib, "libhunspell.lib")
-#else
- #include <hunspell/hunspell.hxx>
-#endif
+#include <hunspell/hunspell.hxx>
static const std::string DICT_DIR = "dictionaries";
static const std::string DICT_FILE_CUSTOM = "user_custom.dic";
@@ -64,11 +59,11 @@ void LLSpellChecker::initSingleton()
bool LLSpellChecker::checkSpelling(const std::string& word) const
{
- if ( (!mHunspell) || (word.length() < 3) || (0 != mHunspell->spell(word.c_str())) )
+ if ( (!mHunspell) || (word.length() < 3) || (0 != mHunspell->spell(word)) )
{
return true;
}
- if (mIgnoreList.size() > 0)
+ if (!mIgnoreList.empty())
{
std::string word_lower(word);
LLStringUtil::toLower(word_lower);
@@ -85,15 +80,8 @@ S32 LLSpellChecker::getSuggestions(const std::string& word, std::vector<std::str
return 0;
}
- char** suggestion_list; int suggestion_cnt = 0;
- if ( (suggestion_cnt = mHunspell->suggest(&suggestion_list, word.c_str())) != 0 )
- {
- for (int suggestion_index = 0; suggestion_index < suggestion_cnt; suggestion_index++)
- {
- suggestions.push_back(suggestion_list[suggestion_index]);
- }
- mHunspell->free_list(&suggestion_list, suggestion_cnt);
- }
+ suggestions = mHunspell->suggest(word);
+
return static_cast<S32>(suggestions.size());
}
@@ -194,7 +182,7 @@ void LLSpellChecker::addToCustomDictionary(const std::string& word)
{
if (mHunspell)
{
- mHunspell->add(word.c_str());
+ mHunspell->add(word);
}
addToDictFile(getDictionaryUserPath() + DICT_FILE_CUSTOM, word);
sSettingsChangeSignal();
@@ -422,7 +410,7 @@ bool LLSpellChecker::canRemoveDictionary(const std::string& dict_language)
const LLSD dict_info = getDictionaryData(dict_language);
return
(dict_info["user_installed"].asBoolean()) &&
- ( (!getUseSpellCheck()) || (!LLSpellChecker::instance().isActiveDictionary(dict_language)) );
+ ( (!getUseSpellCheck()) || (!isActiveDictionary(dict_language)) );
}
void LLSpellChecker::removeDictionary(const std::string& dict_language)
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index a34354d287..4c5deb4974 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -1729,7 +1729,6 @@ if (WINDOWS)
${CMAKE_SOURCE_DIR}/../etc/message.xml
${CMAKE_SOURCE_DIR}/../scripts/messages/message_template.msg
${SHARED_LIB_STAGING_DIR}/openjp2.dll
- ${SHARED_LIB_STAGING_DIR}/libhunspell.dll
${SHARED_LIB_STAGING_DIR}/llwebrtc.dll
#${SHARED_LIB_STAGING_DIR}/${LL_INTDIR}/SLVoice.exe
#${SHARED_LIB_STAGING_DIR}/${LL_INTDIR}/libsndfile-1.dll
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index a25efc5de4..09397a0989 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -587,9 +587,6 @@ class Windows_x86_64_Manifest(ViewerManifest):
# HTTP/2
self.path("nghttp2.dll")
- # Hunspell
- self.path("libhunspell.dll")
-
# BugSplat
if self.args.get('bugsplat'):
self.path("BsSndRpt64.exe")
@@ -930,7 +927,6 @@ class Darwin_x86_64_Manifest(ViewerManifest):
with self.prefix(src=relpkgdir, dst=""):
self.path("libndofdev.dylib")
- self.path("libhunspell-*.dylib")
with self.prefix(src_dst="cursors_mac"):
self.path("*.tif")
@@ -1336,7 +1332,6 @@ class Linux_i686_Manifest(LinuxManifest):
self.path("libdirectfb-1.4.so.5")
self.path("libfusion-1.4.so.5")
self.path("libdirect-1.4.so.5*")
- self.path("libhunspell-1.3.so*")
self.path("libalut.so*")
self.path("libopenal.so*")
self.path("libopenal.so", "libvivoxoal.so.1") # vivox's sdk expects this soname