bump product version to 6.1.0.2
[LibreOffice.git] / external / hunspell / 0001-add-SPELLML-support-for-run-time-dictionary-extensio.patch
blobc17d168b2478877d2b3d0504bbb18ba3e3aae751
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.
8 ---
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, '>'));
22 + if (cw.empty())
23 + return slst;
24 + const char* q3 = strstr(q2 + 1, "<word");
25 + if (q3) {
26 + std::string cw2 = get_xml_par(strchr(q3, '>'));
27 + if (!cw2.empty()) {
28 + add_with_affix(cw, cw2);
29 + } else {
30 + add(cw);
31 + }
32 + } else {
33 + add(cw);
34 + }
36 return slst;
38 --
39 2.7.4