1 From 1587ea4ab5e8d94c9c0d552f7ab61c217ebdcbeb 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: Fri, 30 Dec 2022 12:20:02 +0100
4 Subject: [PATCH] fix LibreOffice build problem with basic_string::append()
7 src/hunspell/affentry.cxx | 6 +++---
8 src/hunspell/affixmgr.cxx | 8 ++++----
9 2 files changed, 7 insertions(+), 7 deletions(-)
11 diff --git a/src/hunspell/affentry.cxx b/src/hunspell/affentry.cxx
12 index 46e8b58..6ee23be 100644
13 --- a/src/hunspell/affentry.cxx
14 +++ b/src/hunspell/affentry.cxx
15 @@ -290,7 +290,7 @@ struct hentry* PfxEntry::check_twosfx(const std::string& word,
16 // back any characters that would have been stripped
18 std::string tmpword(strip);
19 - tmpword.append(word, start + appnd.size());
20 + tmpword.append(word, start + appnd.size(), tmpl);
22 // now make sure all of the conditions on characters
23 // are met. Please see the appendix at the end of
24 @@ -338,7 +338,7 @@ std::string PfxEntry::check_twosfx_morph(const std::string& word,
25 // back any characters that would have been stripped
27 std::string tmpword(strip);
28 - tmpword.append(word, start + appnd.size());
29 + tmpword.append(word, start + appnd.size(), tmpl);
31 // now make sure all of the conditions on characters
32 // are met. Please see the appendix at the end of
33 @@ -386,7 +386,7 @@ std::string PfxEntry::check_morph(const std::string& word,
34 // back any characters that would have been stripped
36 std::string tmpword(strip);
37 - tmpword.append(word, start + appnd.size());
38 + tmpword.append(word, start + appnd.size(), tmpl);
40 // now make sure all of the conditions on characters
41 // are met. Please see the appendix at the end of
42 diff --git a/src/hunspell/affixmgr.cxx b/src/hunspell/affixmgr.cxx
43 index 4d1ad2f..a8931c1 100644
44 --- a/src/hunspell/affixmgr.cxx
45 +++ b/src/hunspell/affixmgr.cxx
46 @@ -2465,7 +2465,7 @@ int AffixMgr::compound_check_morph(const std::string& word,
47 result.append(presult);
48 result.push_back(MSEP_FLD);
49 result.append(MORPH_PART);
50 - result.append(word, i);
51 + result.append(word, i, word.size());
52 if (complexprefixes && HENTRY_DATA(rv))
53 result.append(HENTRY_DATA2(rv));
54 if (!HENTRY_FIND(rv, MORPH_STEM)) {
55 @@ -2522,7 +2522,7 @@ int AffixMgr::compound_check_morph(const std::string& word,
56 result.append(presult);
57 result.push_back(MSEP_FLD);
58 result.append(MORPH_PART);
59 - result.append(word, i);
60 + result.append(word, i, word.size());
62 if (HENTRY_DATA(rv)) {
64 @@ -2573,7 +2573,7 @@ int AffixMgr::compound_check_morph(const std::string& word,
66 result.push_back(MSEP_FLD);
67 result.append(MORPH_PART);
68 - result.append(word, i);
69 + result.append(word, i, word.size());
70 line_uniq_app(m, MSEP_REC);
73 @@ -2665,7 +2665,7 @@ int AffixMgr::compound_check_morph(const std::string& word,
75 result.push_back(MSEP_FLD);
76 result.append(MORPH_PART);
77 - result.append(word, i);
78 + result.append(word, i, word.size());
79 line_uniq_app(m, MSEP_REC);
80 result.push_back(MSEP_FLD);