Kaydet (Commit) 92a9b778 authored tarafından Caolán McNamara's avatar Caolán McNamara

follow logical consequences of a minimum icu version of 4.6

since commit f20ed895

Change-Id: I4f2fc5d9eb7a581b9ed707a3c3f96be817141846
üst c4b2921f
...@@ -251,8 +251,6 @@ export ICECREAM_RUN=@ICECREAM_RUN@ ...@@ -251,8 +251,6 @@ export ICECREAM_RUN=@ICECREAM_RUN@
export ICU_MAJOR=@ICU_MAJOR@ export ICU_MAJOR=@ICU_MAJOR@
export ICU_MICRO=@ICU_MICRO@ export ICU_MICRO=@ICU_MICRO@
export ICU_MINOR=@ICU_MINOR@ export ICU_MINOR=@ICU_MINOR@
export ICU_RECLASSIFIED_CONDITIONAL_JAPANESE_STARTER=@ICU_RECLASSIFIED_CONDITIONAL_JAPANESE_STARTER@
export ICU_RECLASSIFIED_HEBREW_LETTER=@ICU_RECLASSIFIED_HEBREW_LETTER@
export ICU_RECLASSIFIED_PREPEND_SET_EMPTY=@ICU_RECLASSIFIED_PREPEND_SET_EMPTY@ export ICU_RECLASSIFIED_PREPEND_SET_EMPTY=@ICU_RECLASSIFIED_PREPEND_SET_EMPTY@
export ILIB=@ILIB@ export ILIB=@ILIB@
export INPATH=@INPATH@ export INPATH=@INPATH@
......
...@@ -8343,8 +8343,6 @@ ICU_MAJOR=49 ...@@ -8343,8 +8343,6 @@ ICU_MAJOR=49
ICU_MINOR=1 ICU_MINOR=1
ICU_MICRO=1 ICU_MICRO=1
ICU_RECLASSIFIED_PREPEND_SET_EMPTY="YES" ICU_RECLASSIFIED_PREPEND_SET_EMPTY="YES"
ICU_RECLASSIFIED_CONDITIONAL_JAPANESE_STARTER="YES"
ICU_RECLASSIFIED_HEBREW_LETTER="YES"
AC_MSG_CHECKING([which icu to use]) AC_MSG_CHECKING([which icu to use])
if test "$with_system_icu" = "yes"; then if test "$with_system_icu" = "yes"; then
AC_MSG_RESULT([external]) AC_MSG_RESULT([external])
...@@ -8409,10 +8407,6 @@ You can use --with-system-icu-for-build=force to use it anyway.]) ...@@ -8409,10 +8407,6 @@ You can use --with-system-icu-for-build=force to use it anyway.])
else else
ICU_RECLASSIFIED_PREPEND_SET_EMPTY="NO" ICU_RECLASSIFIED_PREPEND_SET_EMPTY="NO"
fi fi
if test "$ICU_MAJOR" -le 4; then
ICU_RECLASSIFIED_CONDITIONAL_JAPANESE_STARTER="NO"
ICU_RECLASSIFIED_HEBREW_LETTER="NO"
fi
fi fi
libo_MINGW_CHECK_DLL([ICUDATA], [icudata][$ICU_MAJOR][$ICU_MINOR]) libo_MINGW_CHECK_DLL([ICUDATA], [icudata][$ICU_MAJOR][$ICU_MINOR])
...@@ -8430,8 +8424,6 @@ AC_SUBST(SYSTEM_GENCMN) ...@@ -8430,8 +8424,6 @@ AC_SUBST(SYSTEM_GENCMN)
AC_SUBST(ICU_MAJOR) AC_SUBST(ICU_MAJOR)
AC_SUBST(ICU_MINOR) AC_SUBST(ICU_MINOR)
AC_SUBST(ICU_MICRO) AC_SUBST(ICU_MICRO)
AC_SUBST([ICU_RECLASSIFIED_CONDITIONAL_JAPANESE_STARTER])
AC_SUBST([ICU_RECLASSIFIED_HEBREW_LETTER])
AC_SUBST(ICU_RECLASSIFIED_PREPEND_SET_EMPTY) AC_SUBST(ICU_RECLASSIFIED_PREPEND_SET_EMPTY)
AC_SUBST([MINGW_ICUDATA_DLL]) AC_SUBST([MINGW_ICUDATA_DLL])
AC_SUBST([MINGW_ICUI18N_DLL]) AC_SUBST([MINGW_ICUI18N_DLL])
......
...@@ -96,28 +96,11 @@ $(i18npool_BIDIR)/%.brk : $(i18npool_BIDIR)/%.txt $(call gb_ExternalExecutable_g ...@@ -96,28 +96,11 @@ $(i18npool_BIDIR)/%.brk : $(i18npool_BIDIR)/%.txt $(call gb_ExternalExecutable_g
# fdo#31271 ")" reclassified in more recent Unicode Standards / ICU 4.4 # fdo#31271 ")" reclassified in more recent Unicode Standards / ICU 4.4
# * Prepend set empty as of Unicode Version 6.1 / ICU 4.9, which bails out if used. # * Prepend set empty as of Unicode Version 6.1 / ICU 4.9, which bails out if used.
# NOTE: strips every line with _word_ 'Prepend', including $Prepend # NOTE: strips every line with _word_ 'Prepend', including $Prepend
# * Conditional_Japanese_Starter does not exist in ICU 4.6, which bails out if used.
# * Hebrew_Letter does not exist in ICU 4.6, which bails out if used.
# NOTE: I sincerely hope there is a better way to avoid problems than this abominable # NOTE: I sincerely hope there is a better way to avoid problems than this abominable
# sed substitution... # sed substitution...
$(i18npool_BIDIR)/%.txt : \ $(i18npool_BIDIR)/%.txt : \
$(SRCDIR)/i18npool/source/breakiterator/data/%.txt | $(i18npool_BIDIR)/.dir $(SRCDIR)/i18npool/source/breakiterator/data/%.txt | $(i18npool_BIDIR)/.dir
sed -e ': dummy' \ sed -e ': dummy' \
-e "s#\[:LineBreak = Close_Punctuation:\]#\[& \[:LineBreak = Close_Parenthesis:\]\]#" \
$(if $(filter-out YES,$(ICU_RECLASSIFIED_CONDITIONAL_JAPANESE_STARTER)),\
-e '/\[:LineBreak = Conditional_Japanese_Starter:\]/d' \
-e 's# $$CJ##' \
) \
$(if $(filter-out YES,$(ICU_RECLASSIFIED_HEBREW_LETTER)),\
-e '/\[:LineBreak = Hebrew_Letter:\]/d' \
-e '/^$$HLcm =/d' \
-e '/^$$HLcm $$NUcm;/d' \
-e '/^$$NUcm $$HLcm;/d' \
-e '/^$$HL $$CM+;/d' \
-e 's# | $$HL\(cm\)\?##g' \
-e 's#$$HLcm ##g' \
-e 's# $$HL##g' \
) \
$(if $(filter YES,$(ICU_RECLASSIFIED_PREPEND_SET_EMPTY)),-e "/Prepend/d") \ $(if $(filter YES,$(ICU_RECLASSIFIED_PREPEND_SET_EMPTY)),-e "/Prepend/d") \
$< > $@ $< > $@
......
...@@ -72,10 +72,9 @@ public: ...@@ -72,10 +72,9 @@ public:
#if TODO #if TODO
CPPUNIT_TEST(testNorthernThai); CPPUNIT_TEST(testNorthernThai);
#endif #endif
#if (U_ICU_VERSION_MAJOR_NUM > 4)
CPPUNIT_TEST(testWordBoundaries); CPPUNIT_TEST(testWordBoundaries);
CPPUNIT_TEST(testKhmer); CPPUNIT_TEST(testKhmer);
#endif
CPPUNIT_TEST(testJapanese); CPPUNIT_TEST(testJapanese);
CPPUNIT_TEST_SUITE_END(); CPPUNIT_TEST_SUITE_END();
private: private:
...@@ -866,12 +865,8 @@ void TestBreakIterator::testNorthernThai() ...@@ -866,12 +865,8 @@ void TestBreakIterator::testNorthernThai()
} }
#endif #endif
#if (U_ICU_VERSION_MAJOR_NUM > 4)
//A test to ensure that our khmer word boundary detection is useful //A test to ensure that our khmer word boundary detection is useful
//https://bugs.freedesktop.org/show_bug.cgi?id=52020 //https://bugs.freedesktop.org/show_bug.cgi?id=52020
//
//icu doesn't have the Khmer word boundary dictionaries in <= 4.0.0 but does in
//the current 49.x.y . Not sure which version first had them introduced.
void TestBreakIterator::testKhmer() void TestBreakIterator::testKhmer()
{ {
lang::Locale aLocale; lang::Locale aLocale;
...@@ -891,7 +886,6 @@ void TestBreakIterator::testKhmer() ...@@ -891,7 +886,6 @@ void TestBreakIterator::testKhmer()
CPPUNIT_ASSERT(aBounds.startPos == 3 && aBounds.endPos == 5); CPPUNIT_ASSERT(aBounds.startPos == 3 && aBounds.endPos == 5);
} }
#endif
void TestBreakIterator::testJapanese() void TestBreakIterator::testJapanese()
{ {
......
...@@ -62,7 +62,7 @@ $BK = [:LineBreak = Mandatory_Break:]; ...@@ -62,7 +62,7 @@ $BK = [:LineBreak = Mandatory_Break:];
$B2 = [:LineBreak = Break_Both:]; $B2 = [:LineBreak = Break_Both:];
$CB = [:LineBreak = Contingent_Break:]; $CB = [:LineBreak = Contingent_Break:];
$CJ = [:LineBreak = Conditional_Japanese_Starter:]; $CJ = [:LineBreak = Conditional_Japanese_Starter:];
$CL = [:LineBreak = Close_Punctuation:] ; $CL = [:LineBreak = Close_Parenthesis:];
$CM = [:LineBreak = Combining_Mark:]; $CM = [:LineBreak = Combining_Mark:];
$CR = [:LineBreak = Carriage_Return:]; $CR = [:LineBreak = Carriage_Return:];
$EX = [:LineBreak = Exclamation:]; $EX = [:LineBreak = Exclamation:];
......
...@@ -72,11 +72,7 @@ using namespace i18n::ScriptType; ...@@ -72,11 +72,7 @@ using namespace i18n::ScriptType;
#define isRehChar(c) IS_JOINING_GROUP((c), REH) #define isRehChar(c) IS_JOINING_GROUP((c), REH)
#define isTehMarbutaChar(c) IS_JOINING_GROUP((c), TEH_MARBUTA) #define isTehMarbutaChar(c) IS_JOINING_GROUP((c), TEH_MARBUTA)
#define isWawChar(c) IS_JOINING_GROUP((c), WAW) #define isWawChar(c) IS_JOINING_GROUP((c), WAW)
#if ( (U_ICU_VERSION_MAJOR_NUM > 4 ) || ((U_ICU_VERSION_MAJOR_NUM == 4) && (U_ICU_VERSION_MINOR_NUM >= 4)) )
#define isYehChar(c) (IS_JOINING_GROUP((c), YEH) || IS_JOINING_GROUP((c), FARSI_YEH)) #define isYehChar(c) (IS_JOINING_GROUP((c), YEH) || IS_JOINING_GROUP((c), FARSI_YEH))
#else
#define isYehChar(c) (c == 0x626 || c == 0x649 || c == 0x64A || c == 0x678 || c == 0x6CC || c == 0x6CE || c == 0x6D0 || c == 0x6D1)
#endif
#define isSeenOrSadChar(c) (IS_JOINING_GROUP((c), SAD) || IS_JOINING_GROUP((c), SEEN)) #define isSeenOrSadChar(c) (IS_JOINING_GROUP((c), SAD) || IS_JOINING_GROUP((c), SEEN))
bool isTransparentChar ( sal_Unicode cCh ) bool isTransparentChar ( sal_Unicode cCh )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment