From b30aa9b756e81ba21696f3f84959f2821fe61e89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Wed, 28 Aug 2013 11:03:11 +0100 Subject: [PATCH] more work to build with icu 4.2 --- ...ake-charmap.cxx-compile-with-icu-4.4.patch | 27 ++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/0001-Make-charmap.cxx-compile-with-icu-4.4.patch b/0001-Make-charmap.cxx-compile-with-icu-4.4.patch index 0c0f46c..b4f5f3e 100644 --- a/0001-Make-charmap.cxx-compile-with-icu-4.4.patch +++ b/0001-Make-charmap.cxx-compile-with-icu-4.4.patch @@ -112,6 +112,27 @@ index b820b8b..edc8458 100644 #define isSeenOrSadChar(c) (IS_JOINING_GROUP((c), SAD) || IS_JOINING_GROUP((c), SEEN)) bool isTransparentChar ( sal_Unicode cCh ) --- -1.8.3.1 - +diff --git a/i18npool/qa/cppunit/test_breakiterator.cxx b/i18npool/qa/cppunit/test_breakiterator.cxx +--- a/i18npool/qa/cppunit/test_breakiterator.cxx ++++ b/i18npool/qa/cppunit/test_breakiterator.cxx +@@ -233,14 +233,18 @@ + } + + //See https://bugs.freedesktop.org/show_bug.cgi?id=49629 +- //Note that the breakiterator test will fail on older icu versions +- //(4.2.1) for the 200B (ZWSP) Zero Width Space testcase. + sal_Unicode aBreakTests[] = { ' ', 1, 2, 3, 4, 5, 6, 7, 0x91, 0x92, 0x200B, 0xE8FF, 0xF8FF }; + for (int mode = i18n::WordType::ANY_WORD; mode <= i18n::WordType::WORD_COUNT; ++mode) + { + //make sure that in all cases isBeginWord and isEndWord matches getWordBoundary + for (size_t i = 0; i < SAL_N_ELEMENTS(aBreakTests); ++i) + { ++#if (U_ICU_VERSION_MAJOR_NUM == 4) && (U_ICU_VERSION_MINOR_NUM <= 2) ++ //Note the breakiterator test is known to fail on older icu ++ //versions (4.2.1) for the 200B (ZWSP) Zero Width Space testcase. ++ if (aBreakTests[i] == 0x200B) ++ continue; ++#endif + OUString aTest("Word"); + aTest += OUString(aBreakTests[i]) + OUString("Word"); + aBounds = m_xBreak->getWordBoundary(aTest, 0, aLocale, mode, true);