summaryrefslogtreecommitdiff
path: root/external
diff options
context:
space:
mode:
authorLászló Németh <nemeth@numbertext.org>2017-11-09 15:49:46 +0100
committerLászló Németh <nemeth@numbertext.org>2017-11-17 17:31:59 +0100
commita7ec994689f8ea5985f6c8f94f17a4417978ff41 (patch)
treef73012c8b47fc2101422b10a604dd9a4dd125cba /external
parent9aa68d323cac29ac37e9d6fee4795ba2e361e5a8 (diff)
apply patch for run-time Hunspell dictionary extension
to use in new "Affixation/Compounding By" feature of language-specific LibreOffice user dictionaries. Change-Id: Icb4181717f0ff1145ac5acc130266b165132cfe9 Reviewed-on: https://gerrit.libreoffice.org/44561 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'external')
-rw-r--r--external/hunspell/0001-add-SPELLML-support-for-run-time-dictionary-extensio.patch40
-rw-r--r--external/hunspell/UnpackedTarball_hunspell.mk1
2 files changed, 41 insertions, 0 deletions
diff --git a/external/hunspell/0001-add-SPELLML-support-for-run-time-dictionary-extensio.patch b/external/hunspell/0001-add-SPELLML-support-for-run-time-dictionary-extensio.patch
new file mode 100644
index 000000000000..c17d168b2478
--- /dev/null
+++ b/external/hunspell/0001-add-SPELLML-support-for-run-time-dictionary-extensio.patch
@@ -0,0 +1,40 @@
+From 643bd113f5dbfa6e8ffa61aae6ab7ccc4f63bccc Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?L=C3=A1szl=C3=B3=20N=C3=A9meth?= <nemeth@numbertext.org>
+Date: Thu, 9 Nov 2017 13:22:55 +0100
+Subject: [PATCH] add SPELLML support for run-time dictionary extension
+
+to use in new "Affixation/Compounding By" feature
+of language-specific LibreOffice user dictionaries.
+---
+ src/hunspell/hunspell.cxx | 15 +++++++++++++++
+ 1 file changed, 15 insertions(+)
+
+diff --git a/src/hunspell/hunspell.cxx b/src/hunspell/hunspell.cxx
+index b271750..09fd6ee 100644
+--- a/src/hunspell/hunspell.cxx
++++ b/src/hunspell/hunspell.cxx
+@@ -1733,6 +1733,21 @@ std::vector<std::string> HunspellImpl::spellml(const std::string& in_word) {
+ }
+ }
+ }
++ } else if (check_xml_par(q, "type=", "add")) {
++ std::string cw = get_xml_par(strchr(q2, '>'));
++ if (cw.empty())
++ return slst;
++ const char* q3 = strstr(q2 + 1, "<word");
++ if (q3) {
++ std::string cw2 = get_xml_par(strchr(q3, '>'));
++ if (!cw2.empty()) {
++ add_with_affix(cw, cw2);
++ } else {
++ add(cw);
++ }
++ } else {
++ add(cw);
++ }
+ }
+ return slst;
+ }
+--
+2.7.4
+
diff --git a/external/hunspell/UnpackedTarball_hunspell.mk b/external/hunspell/UnpackedTarball_hunspell.mk
index 23d3aca47131..87f12446427c 100644
--- a/external/hunspell/UnpackedTarball_hunspell.mk
+++ b/external/hunspell/UnpackedTarball_hunspell.mk
@@ -27,6 +27,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,hunspell, \
external/hunspell/0001-Remove-forbidden-words-from-dash-suggestion-list.patch \
external/hunspell/0001-fix-compound-handling-for-new-Hungarian-orthography.patch \
external/hunspell/0001-fix-compound-word-part-pa.patch \
+ external/hunspell/0001-add-SPELLML-support-for-run-time-dictionary-extensio.patch \
))
# vim: set noet sw=4 ts=4: