summaryrefslogtreecommitdiff
path: root/i18npool
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-11-14 08:16:35 +0200
committerNoel Grandin <noel@peralex.com>2013-11-14 08:17:32 +0200
commitd366c9b20ec86f3fe521812a0c22def3bfd1f05e (patch)
tree4bd09438c8cd8f0dbcd0881fc923d56a0a721fc5 /i18npool
parentd2fa59e4025050c9b668ecff379d668f0db52639 (diff)
remove unnecessary sal_Unicode casts in various places
Change-Id: Ibf04062ca86ed866202d748c3b62a210d30ed6ec
Diffstat (limited to 'i18npool')
-rw-r--r--i18npool/source/indexentry/genindex_data.cxx2
-rw-r--r--i18npool/source/indexentry/indexentrysupplier_default.cxx10
-rw-r--r--i18npool/source/localedata/LocaleNode.cxx2
-rw-r--r--i18npool/source/localedata/localedata.cxx4
-rw-r--r--i18npool/source/textconversion/genconv_dict.cxx8
5 files changed, 13 insertions, 13 deletions
diff --git a/i18npool/source/indexentry/genindex_data.cxx b/i18npool/source/indexentry/genindex_data.cxx
index 03bdd4ea7afc..f3fa9c6abd99 100644
--- a/i18npool/source/indexentry/genindex_data.cxx
+++ b/i18npool/source/indexentry/genindex_data.cxx
@@ -49,7 +49,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
sal_Int32 i, j, k;
sal_Int32 address[MAX_ADDRESS];
for (i=0; i<MAX_ADDRESS; i++) address[i]=-1;
- OUString sep=OUString(sal_Unicode('|'));
+ OUString sep=OUString('|');
OUString result=sep;
sal_Int32 max=0;
diff --git a/i18npool/source/indexentry/indexentrysupplier_default.cxx b/i18npool/source/indexentry/indexentrysupplier_default.cxx
index cb54e22b730a..8edd4b29f557 100644
--- a/i18npool/source/indexentry/indexentrysupplier_default.cxx
+++ b/i18npool/source/indexentry/indexentrysupplier_default.cxx
@@ -180,7 +180,7 @@ void Index::makeIndexKeys(const lang::Locale &rLocale, const OUString &algorithm
for (i = 0; i < len && key_count < MAX_KEYS; i++)
{
sal_Unicode curr = keyStr[i];
- sal_Unicode close = sal_Unicode(')');
+ sal_Unicode close = ')';
if (unicode::isWhiteSpace(curr))
continue;
@@ -196,10 +196,10 @@ void Index::makeIndexKeys(const lang::Locale &rLocale, const OUString &algorithm
throw RuntimeException();
break;
case sal_Unicode('['):
- for (i++; i < len && keyStr[i] != sal_Unicode(']'); i++) {
+ for (i++; i < len && keyStr[i] != ']'; i++) {
if (unicode::isWhiteSpace(keyStr[i])) {
continue;
- } else if (keyStr[i] == sal_Unicode('_')) {
+ } else if (keyStr[i] == '_') {
for (curr=keyStr[i-1]+1; curr <= keyStr[i+1]; curr++)
skipping_chars+=OUString(curr);
i+=2;
@@ -209,7 +209,7 @@ void Index::makeIndexKeys(const lang::Locale &rLocale, const OUString &algorithm
}
break;
case sal_Unicode('{'):
- close = sal_Unicode('}');
+ close = '}';
case sal_Unicode('('):
if (key_count > 0) {
sal_Int16 end = i+1;
@@ -217,7 +217,7 @@ void Index::makeIndexKeys(const lang::Locale &rLocale, const OUString &algorithm
if (end >= len) // no found
throw RuntimeException();
- if (close == sal_Unicode(')'))
+ if (close == ')')
keys[key_count-1].desc = keyStr.copy(i+1, end-i-1);
else {
mkeys[mkey_count++]=key_count;
diff --git a/i18npool/source/localedata/LocaleNode.cxx b/i18npool/source/localedata/LocaleNode.cxx
index ff4ce9784fdd..2e1043ac49e0 100644
--- a/i18npool/source/localedata/LocaleNode.cxx
+++ b/i18npool/source/localedata/LocaleNode.cxx
@@ -713,7 +713,7 @@ void LCFormatNode::generateCode (const OFileWriter &of) const
// Ensure only one default per usage and type.
if (bDefault)
{
- OUString aKey( aUsage + OUString( sal_Unicode(',')) + aType);
+ OUString aKey( aUsage + OUString( ',') + aType);
if (!aDefaultsSet.insert( aKey).second)
{
OUString aStr( "Duplicated default for usage=\"");
diff --git a/i18npool/source/localedata/localedata.cxx b/i18npool/source/localedata/localedata.cxx
index b621737675d3..a8a6d3fda780 100644
--- a/i18npool/source/localedata/localedata.cxx
+++ b/i18npool/source/localedata/localedata.cxx
@@ -294,8 +294,8 @@ static const struct {
#endif
-static const sal_Unicode cUnder = sal_Unicode('_');
-static const sal_Unicode cHyphen = sal_Unicode('-');
+static const sal_Unicode cUnder = '_';
+static const sal_Unicode cHyphen = '-';
static const sal_Int16 nbOfLocales = SAL_N_ELEMENTS(aLibTable);
diff --git a/i18npool/source/textconversion/genconv_dict.cxx b/i18npool/source/textconversion/genconv_dict.cxx
index 77a676fff356..fbd6b0eb74f2 100644
--- a/i18npool/source/textconversion/genconv_dict.cxx
+++ b/i18npool/source/textconversion/genconv_dict.cxx
@@ -193,7 +193,7 @@ void make_stc_char(FILE *sfp, FILE *cfp)
OUString Ostr((const sal_Char *)Cstr, strlen(Cstr) - 1, RTL_TEXTENCODING_UTF8);
const sal_Unicode *Ustr = Ostr.getStr();
sal_Int32 len = Ostr.getLength();
- if (Ustr[1] == sal_Unicode('v'))
+ if (Ustr[1] == 'v')
SChinese2VChineseData[Ustr[0]] = Ustr[2];
else {
SChinese2TChineseData[Ustr[0]] = Ustr[2];
@@ -363,9 +363,9 @@ void make_stc_word(FILE *sfp, FILE *cfp)
return;
}
sal_Int32 sep=-1, eq=-1, gt=-1, lt=-1;
- if (((sep = eq = Ostr.indexOf(sal_Unicode('='))) > 0) ||
- ((sep = gt = Ostr.indexOf(sal_Unicode('>'))) > 0) ||
- ((sep = lt = Ostr.indexOf(sal_Unicode('<'))) > 0)) {
+ if (((sep = eq = Ostr.indexOf('=')) > 0) ||
+ ((sep = gt = Ostr.indexOf('>')) > 0) ||
+ ((sep = lt = Ostr.indexOf('<')) > 0)) {
if (eq > 0 || gt > 0) {
STC_WordEntry_S2T[count_S2T].address = sal::static_int_cast<sal_uInt16>( char_total );