]>
Commit | Line | Data |
---|---|---|
7abe3409 AG |
1 | diff -bur sword-1.7.4.orig/include/utf8transliterator.h sword-1.7.4/include/utf8transliterator.h |
2 | --- sword-1.7.4.orig/include/utf8transliterator.h 2013-07-18 00:34:43.000000000 +0200 | |
3 | +++ sword-1.7.4/include/utf8transliterator.h 2019-04-13 23:12:32.614203906 +0200 | |
4 | @@ -50,11 +50,11 @@ | |
5 | class SWModule; | |
6 | ||
7 | struct SWTransData { | |
8 | - UnicodeString resource; | |
9 | + icu::UnicodeString resource; | |
10 | UTransDirection dir; | |
11 | }; | |
12 | -typedef std::map<const UnicodeString, SWTransData> SWTransMap; | |
13 | -typedef std::pair<UnicodeString, SWTransData> SWTransPair; | |
14 | +typedef std::map<const icu::UnicodeString, SWTransData> SWTransMap; | |
15 | +typedef std::pair<icu::UnicodeString, SWTransData> SWTransPair; | |
16 | ||
17 | /** This Filter uses ICU for transliteration | |
18 | */ | |
19 | @@ -77,11 +77,11 @@ | |
20 | UErrorCode utf8status; | |
21 | ||
22 | void Load(UErrorCode &status); | |
23 | - void registerTrans(const UnicodeString& ID, const UnicodeString& resource, UTransDirection dir, UErrorCode &status); | |
24 | - bool checkTrans(const UnicodeString& ID, UErrorCode &status); | |
25 | + void registerTrans(const icu::UnicodeString& ID, const icu::UnicodeString& resource, UTransDirection dir, UErrorCode &status); | |
26 | + bool checkTrans(const icu::UnicodeString& ID, UErrorCode &status); | |
27 | #endif | |
28 | bool addTrans(const char* newTrans, SWBuf* transList); | |
29 | - Transliterator *createTrans(const UnicodeString& ID, UTransDirection dir, UErrorCode &status); | |
30 | + icu::Transliterator *createTrans(const icu::UnicodeString& ID, UTransDirection dir, UErrorCode &status); | |
31 | ||
32 | public: | |
33 | UTF8Transliterator(); | |
34 | diff -bur sword-1.7.4.orig/src/modules/filters/utf8nfc.cpp sword-1.7.4/src/modules/filters/utf8nfc.cpp | |
35 | --- sword-1.7.4.orig/src/modules/filters/utf8nfc.cpp 2014-04-17 05:56:12.000000000 +0200 | |
36 | +++ sword-1.7.4/src/modules/filters/utf8nfc.cpp 2019-04-13 23:20:04.374845084 +0200 | |
37 | @@ -46,11 +46,11 @@ | |
38 | return -1; | |
39 | ||
40 | err = U_ZERO_ERROR; | |
41 | - UnicodeString source(text.getRawData(), text.length(), conv, err); | |
42 | - UnicodeString target; | |
43 | + icu::UnicodeString source(text.getRawData(), text.length(), conv, err); | |
44 | + icu::UnicodeString target; | |
45 | ||
46 | err = U_ZERO_ERROR; | |
47 | - Normalizer::normalize(source, UNORM_NFC, 0, target, err); | |
48 | + icu::Normalizer::normalize(source, UNORM_NFC, 0, target, err); | |
49 | ||
50 | err = U_ZERO_ERROR; | |
51 | text.setSize(text.size()*2); // potentially, it can grow to 2x the original size | |
52 | diff -bur sword-1.7.4.orig/src/modules/filters/utf8transliterator.cpp sword-1.7.4/src/modules/filters/utf8transliterator.cpp | |
53 | --- sword-1.7.4.orig/src/modules/filters/utf8transliterator.cpp 2013-07-18 00:44:29.000000000 +0200 | |
54 | +++ sword-1.7.4/src/modules/filters/utf8transliterator.cpp 2019-04-13 23:18:33.983429613 +0200 | |
55 | @@ -328,9 +328,9 @@ | |
56 | } | |
57 | ||
58 | ||
59 | -Transliterator * UTF8Transliterator::createTrans(const UnicodeString& ID, UTransDirection dir, UErrorCode &status ) | |
60 | +icu::Transliterator * UTF8Transliterator::createTrans(const icu::UnicodeString& ID, UTransDirection dir, UErrorCode &status ) | |
61 | { | |
62 | - Transliterator *trans = Transliterator::createInstance(ID,UTRANS_FORWARD,status); | |
63 | + icu::Transliterator *trans = icu::Transliterator::createInstance(ID,UTRANS_FORWARD,status); | |
64 | if (U_FAILURE(status)) { | |
65 | delete trans; | |
66 | return NULL; | |
67 | @@ -906,9 +906,9 @@ | |
68 | addTrans("NFC", &ID); | |
69 | ||
70 | err = U_ZERO_ERROR; | |
71 | - Transliterator * trans = createTrans(UnicodeString(ID), UTRANS_FORWARD, err); | |
72 | + icu::Transliterator * trans = createTrans(icu::UnicodeString(ID), UTRANS_FORWARD, err); | |
73 | if (trans && !U_FAILURE(err)) { | |
74 | - UnicodeString target = UnicodeString(source); | |
75 | + icu::UnicodeString target = icu::UnicodeString(source); | |
76 | trans->transliterate(target); | |
77 | text.setSize(text.size()*2); | |
78 | len = ucnv_fromUChars(conv, text.getRawData(), text.size(), target.getBuffer(), target.length(), &err); |