1 From 643bd113f5dbfa6e8ffa61aae6ab7ccc4f63bccc Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20N=C3=A9meth?= <nemeth@numbertext.org>
3 Date: Thu, 9 Nov 2017 13:22:55 +0100
4 Subject: [PATCH] add SPELLML support for run-time dictionary extension
6 to use in new "Affixation/Compounding By" feature
7 of language-specific LibreOffice user dictionaries.
9 src/hunspell/hunspell.cxx | 15 +++++++++++++++
10 1 file changed, 15 insertions(+)
12 diff --git a/src/hunspell/hunspell.cxx b/src/hunspell/hunspell.cxx
13 index b271750..09fd6ee 100644
14 --- a/src/hunspell/hunspell.cxx
15 +++ b/src/hunspell/hunspell.cxx
16 @@ -1733,6 +1733,21 @@ std::vector<std::string> HunspellImpl::spellml(const std::string& in_word) {
20 + } else if (check_xml_par(q, "type=", "add")) {
21 + std::string cw = get_xml_par(strchr(q2, '>'));
24 + const char* q3 = strstr(q2 + 1, "<word");
26 + std::string cw2 = get_xml_par(strchr(q3, '>'));
28 + add_with_affix(cw, cw2);