summaryrefslogtreecommitdiff
path: root/i18npool
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2016-11-02 13:07:48 +0100
committerEike Rathke <erack@redhat.com>2016-11-02 18:42:47 +0000
commit3e42714c76b1347babfdea0564009d8d82a83af4 (patch)
treefc41d8b3e42253c7bb34533a59d9bfc7908b6292 /i18npool
parentb68ed302830fd1c44212eeb6c23d5a08b7dc97ec (diff)
upgrade to ICU 58
Change-Id: I4a992447df65b337721a2a2627d974172a14cba5 Reviewed-on: https://gerrit.libreoffice.org/30487 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'i18npool')
-rw-r--r--i18npool/source/breakiterator/breakiterator_unicode.cxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/i18npool/source/breakiterator/breakiterator_unicode.cxx b/i18npool/source/breakiterator/breakiterator_unicode.cxx
index 3b0b227148fa..76ae20958f09 100644
--- a/i18npool/source/breakiterator/breakiterator_unicode.cxx
+++ b/i18npool/source/breakiterator/breakiterator_unicode.cxx
@@ -63,10 +63,13 @@ BreakIterator_Unicode::~BreakIterator_Unicode()
class OOoRuleBasedBreakIterator : public RuleBasedBreakIterator
{
public:
+#if (U_ICU_VERSION_MAJOR_NUM < 58)
+ // RuleBasedBreakIterator::setBreakType() is private as of ICU 58.
inline void publicSetBreakType(int32_t type)
{
setBreakType(type);
};
+#endif
OOoRuleBasedBreakIterator(UDataMemory* image,
UErrorCode &status)
: RuleBasedBreakIterator(image, status)
@@ -142,12 +145,21 @@ void SAL_CALL BreakIterator_Unicode::loadICUBreakIterator(const css::lang::Local
}
}
if (rbi) {
+#if (U_ICU_VERSION_MAJOR_NUM < 58)
+ // ICU 58 made RuleBasedBreakIterator::setBreakType() private
+ // instead of protected, so the old workaround of
+ // https://ssl.icu-project.org/trac/ticket/5498
+ // doesn't work anymore. However, they also claim to have fixed
+ // the cause that an initial fBreakType==-1 would lead to an
+ // endless loop under some circumstances.
+ // Let's see ...
switch (rBreakType) {
case LOAD_CHARACTER_BREAKITERATOR: rbi->publicSetBreakType(UBRK_CHARACTER); break;
case LOAD_WORD_BREAKITERATOR: rbi->publicSetBreakType(UBRK_WORD); break;
case LOAD_SENTENCE_BREAKITERATOR: rbi->publicSetBreakType(UBRK_SENTENCE); break;
case LOAD_LINE_BREAKITERATOR: rbi->publicSetBreakType(UBRK_LINE); break;
}
+#endif
icuBI->aBreakIterator = rbi;
}
}