[Libreoffice-commits] core.git: 2 commits - config_host.mk.in configure.ac i18npool/CustomTarget_breakiterator.mk i18npool/source i18nutil/source xmlreader/inc
Caolán McNamara
caolanm at redhat.com
Tue Feb 19 07:43:16 PST 2013
config_host.mk.in | 1 +
configure.ac | 11 +++++++++--
i18npool/CustomTarget_breakiterator.mk | 1 +
i18npool/source/breakiterator/data/line.txt | 3 +--
i18nutil/source/utility/unicode.cxx | 20 +++++++++++---------
xmlreader/inc/xmlreader/span.hxx | 16 +++++++++++++++-
6 files changed, 38 insertions(+), 14 deletions(-)
New commits:
commit 826cb27cc80ae843927d68e0337ad2caffa9f023
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Feb 19 15:36:44 2013 +0000
reuse the ConstCharArrayDetector in Span
Change-Id: I33bc390aaa8f6e3cc2505632670970038140eb3c
diff --git a/xmlreader/inc/xmlreader/span.hxx b/xmlreader/inc/xmlreader/span.hxx
index 58266e9..f7cd157 100644
--- a/xmlreader/inc/xmlreader/span.hxx
+++ b/xmlreader/inc/xmlreader/span.hxx
@@ -22,7 +22,8 @@
#include "sal/config.h"
-#include "rtl/string.h"
+#include "rtl/string.hxx"
+#include "rtl/stringutils.hxx"
#include "sal/types.h"
#include "xmlreader/detail/xmlreaderdllapi.hxx"
@@ -58,6 +59,19 @@ struct OOO_DLLPUBLIC_XMLREADER Span {
begin, length, text.getStr(), text.getLength()) == 0;
}
+#ifdef RTL_FAST_STRING
+ /**
+ @overload
+ This function accepts an ASCII string literal as its argument.
+ */
+ template< typename T > bool
+ equals( T& literal, typename rtl::internal::ConstCharArrayDetector< T, rtl::internal::Dummy >::Type = rtl::internal::Dummy() ) SAL_THROW(())
+ {
+ assert( strlen( literal ) == rtl::internal::ConstCharArrayDetector< T >::size - 1 );
+ return rtl_str_compare_WithLength( begin, length, literal, rtl::internal::ConstCharArrayDetector< T, void >::size - 1 );
+ }
+#endif
+
rtl::OUString convertFromUtf8() const;
};
commit 138e5a051805ca8a3b7e9626742cc475e3577cc4
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Feb 19 14:32:41 2013 +0000
make it possible to build with system icu 4.2 (RHEL-6)
Change-Id: I69bf7bc33a619c4aa9483e2dc3d5540e4dfa7458
diff --git a/config_host.mk.in b/config_host.mk.in
index e1249dd..a40d361 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 ef68d52..6fad25a 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 da3c224..887b11e 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 148b7e1..91c8f3d 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 2f6f6dd..ba62d71 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";
More information about the Libreoffice-commits
mailing list