summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config_host.mk.in1
-rw-r--r--configure.ac11
-rw-r--r--i18npool/CustomTarget_breakiterator.mk1
-rw-r--r--i18npool/source/breakiterator/data/line.txt3
-rw-r--r--i18nutil/source/utility/unicode.cxx20
5 files changed, 23 insertions, 13 deletions
diff --git a/config_host.mk.in b/config_host.mk.in
index e1249dda521d..a40d361c6e7a 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -252,6 +252,7 @@ export ICECREAM_RUN=@ICECREAM_RUN@
export ICU_MAJOR=@ICU_MAJOR@
export ICU_MICRO=@ICU_MICRO@
export ICU_MINOR=@ICU_MINOR@
+export ICU_RECLASSIFIED_CLOSE_PARENTHESIS=@ICU_RECLASSIFIED_CLOSE_PARENTHESIS@
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@
diff --git a/configure.ac b/configure.ac
index ef68d5288f04..6fad25ab3c9c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -8457,6 +8457,7 @@ SYSTEM_GENCMN=
ICU_MAJOR=49
ICU_MINOR=1
ICU_MICRO=1
+ICU_RECLASSIFIED_CLOSE_PARENTHESIS="YES"
ICU_RECLASSIFIED_PREPEND_SET_EMPTY="YES"
ICU_RECLASSIFIED_CONDITIONAL_JAPANESE_STARTER="YES"
ICU_RECLASSIFIED_HEBREW_LETTER="YES"
@@ -8481,10 +8482,10 @@ if test "$with_system_icu" = "yes"; then
ICU_MINOR=`echo $ICU_VERSION | cut -d"." -f2`
ICU_MICRO=`echo $ICU_VERSION | cut -d"." -f3`
- if test "$ICU_MAJOR" -ge "49" -o \( "$ICU_MAJOR" = "4" -a "$ICU_MINOR" -ge "6" \); then
+ if test "$ICU_MAJOR" -ge "49" -o \( "$ICU_MAJOR" = "4" -a "$ICU_MINOR" -ge "2" \); then
AC_MSG_RESULT([OK, $ICU_VERSION])
else
- AC_MSG_ERROR([not suitable, only >= 4.6 supported currently])
+ AC_MSG_ERROR([not suitable, only >= 4.2 supported currently])
fi
if test "$cross_compiling" = "yes" -a \( "$with_system_icu_for_build" = "yes" -o "$with_system_icu_for_build" = "force" \); then
@@ -8519,6 +8520,11 @@ You can use --with-system-icu-for-build=force to use it anyway.])
if test -z "$SYSTEM_GENCMN"; then
AC_MSG_ERROR([\'gencmn\' not found in \$PATH, install the icu development tool \'gencmn\'])
fi
+ if test "$ICU_MAJOR" -ge "49" -o \( "$ICU_MAJOR" = "4" -a "$ICU_MINOR" -ge "4" \); then
+ ICU_RECLASSIFIED_CLOSE_PARENTHESIS="YES"
+ else
+ ICU_RECLASSIFIED_CLOSE_PARENTHESIS="NO"
+ fi
if test "$ICU_MAJOR" -ge "49"; then
ICU_RECLASSIFIED_PREPEND_SET_EMPTY="YES"
ICU_RECLASSIFIED_CONDITIONAL_JAPANESE_STARTER="YES"
@@ -8552,6 +8558,7 @@ AC_SUBST(SYSTEM_GENCMN)
AC_SUBST(ICU_MAJOR)
AC_SUBST(ICU_MINOR)
AC_SUBST(ICU_MICRO)
+AC_SUBST(ICU_RECLASSIFIED_CLOSE_PARENTHESIS)
AC_SUBST(ICU_RECLASSIFIED_PREPEND_SET_EMPTY)
AC_SUBST(ICU_RECLASSIFIED_CONDITIONAL_JAPANESE_STARTER)
AC_SUBST(ICU_RECLASSIFIED_HEBREW_LETTER)
diff --git a/i18npool/CustomTarget_breakiterator.mk b/i18npool/CustomTarget_breakiterator.mk
index da3c2248e66e..887b11ec364c 100644
--- a/i18npool/CustomTarget_breakiterator.mk
+++ b/i18npool/CustomTarget_breakiterator.mk
@@ -97,6 +97,7 @@ $(i18npool_BIDIR)/%.brk : $(i18npool_BIDIR)/%.txt $(call gb_ExternalExecutable_g
$(i18npool_BIDIR)/%.txt : \
$(SRCDIR)/i18npool/source/breakiterator/data/%.txt | $(i18npool_BIDIR)/.dir
sed -e ': dummy' \
+ $(if $(filter YES,$(ICU_RECLASSIFIED_CLOSE_PARENTHESIS)),-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##' \
diff --git a/i18npool/source/breakiterator/data/line.txt b/i18npool/source/breakiterator/data/line.txt
index 148b7e1708a9..91c8f3d4850d 100644
--- a/i18npool/source/breakiterator/data/line.txt
+++ b/i18npool/source/breakiterator/data/line.txt
@@ -62,8 +62,7 @@ $BK = [:LineBreak = Mandatory_Break:];
$B2 = [:LineBreak = Break_Both:];
$CB = [:LineBreak = Contingent_Break:];
$CJ = [:LineBreak = Conditional_Japanese_Starter:];
-$CP = [:LineBreak = Close_Parenthesis:];
-$CL = [[:LineBreak = Close_Punctuation:] $CP];
+$CL = [:LineBreak = Close_Punctuation:] ;
$CM = [:LineBreak = Combining_Mark:];
$CR = [:LineBreak = Carriage_Return:];
$EX = [:LineBreak = Exclamation:];
diff --git a/i18nutil/source/utility/unicode.cxx b/i18nutil/source/utility/unicode.cxx
index 2f6f6dd17952..ba62d71181ae 100644
--- a/i18nutil/source/utility/unicode.cxx
+++ b/i18nutil/source/utility/unicode.cxx
@@ -494,12 +494,6 @@ OString SAL_CALL unicode::getExemplerLanguageForUScriptCode(UScriptCode eScript)
case USCRIPT_UNKNOWN:
sRet = "und";
break;
- case USCRIPT_NABATAEAN: //no language with an assigned code yet
- sRet = "mis";
- break;
- case USCRIPT_PALMYRENE: //no language with an assigned code yet
- sRet = "mis";
- break;
case USCRIPT_ARABIC:
sRet = "ar";
break;
@@ -742,9 +736,6 @@ OString SAL_CALL unicode::getExemplerLanguageForUScriptCode(UScriptCode eScript)
case USCRIPT_LINEAR_A:
sRet = "ecr";
break;
- case USCRIPT_MANDAIC:
- sRet = "mic";
- break;
case USCRIPT_MAYAN_HIEROGLYPHS:
sRet = "myn";
break;
@@ -862,6 +853,16 @@ OString SAL_CALL unicode::getExemplerLanguageForUScriptCode(UScriptCode eScript)
case USCRIPT_TAI_VIET:
sRet = "blt";
break;
+#if (U_ICU_VERSION_MAJOR_NUM > 4) || (U_ICU_VERSION_MAJOR_NUM == 4 && U_ICU_VERSION_MINOR_NUM >= 4)
+ case USCRIPT_NABATAEAN: //no language with an assigned code yet
+ sRet = "mis";
+ break;
+ case USCRIPT_PALMYRENE: //no language with an assigned code yet
+ sRet = "mis";
+ break;
+ case USCRIPT_MANDAIC:
+ sRet = "mic";
+ break;
case USCRIPT_BAMUM:
sRet = "bax";
break;
@@ -907,6 +908,7 @@ OString SAL_CALL unicode::getExemplerLanguageForUScriptCode(UScriptCode eScript)
case USCRIPT_WARANG_CITI:
sRet = "hoc";
break;
+#endif
#if (U_ICU_VERSION_MAJOR_NUM > 4) || (U_ICU_VERSION_MAJOR_NUM == 4 && U_ICU_VERSION_MINOR_NUM >= 8)
case USCRIPT_AFAKA:
sRet = "djk";