summaryrefslogtreecommitdiff
path: root/i18npool/source
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-10-23 13:29:32 +0200
committerNoel Grandin <noel@peralex.com>2013-11-04 08:06:10 +0200
commit0e6a2601b39cbadaff7f7506ba9e804f108060db (patch)
treeffd6bb4970f689d20087b721eb8dfd4bc86cd53f /i18npool/source
parent457b349edbaf6d9dc747f3a631fee70e0c035bae (diff)
Convert code that calls OUString::getStr()[] to use the [] operator
This also means that this code now gets bounds checked in debug builds. Change-Id: Id777f85eaee6a737bbcb84625e6e110abe0e0f27
Diffstat (limited to 'i18npool/source')
-rw-r--r--i18npool/source/characterclassification/cclass_unicode_parser.cxx4
-rw-r--r--i18npool/source/localedata/LocaleNode.cxx6
2 files changed, 5 insertions, 5 deletions
diff --git a/i18npool/source/characterclassification/cclass_unicode_parser.cxx b/i18npool/source/characterclassification/cclass_unicode_parser.cxx
index adf9737a09b6..2c372eb01f80 100644
--- a/i18npool/source/characterclassification/cclass_unicode_parser.cxx
+++ b/i18npool/source/characterclassification/cclass_unicode_parser.cxx
@@ -458,8 +458,8 @@ void cclass_Unicode::initParserTable( const Locale& rLocale, sal_Int32 startChar
mxLocaleData->getLocaleItem( aParserLocale );
//!TODO: theoretically separators may be a string, adjustment would have to be
//! done here and in parsing and in ::rtl::math::stringToDouble()
- cGroupSep = aItem.thousandSeparator.getStr()[0];
- cDecimalSep = aItem.decimalSeparator.getStr()[0];
+ cGroupSep = aItem.thousandSeparator[0];
+ cDecimalSep = aItem.decimalSeparator[0];
}
if ( cGroupSep < nDefCnt )
diff --git a/i18npool/source/localedata/LocaleNode.cxx b/i18npool/source/localedata/LocaleNode.cxx
index 2b1fed680665..46696770d5e0 100644
--- a/i18npool/source/localedata/LocaleNode.cxx
+++ b/i18npool/source/localedata/LocaleNode.cxx
@@ -419,14 +419,14 @@ void LCCTYPENode::generateCode (const OFileWriter &of) const
sepNode = findNode("LongDateDayOfWeekSeparator");
aLDS = sepNode->getValue();
of.writeParameter("LongDateDayOfWeekSeparator", aLDS);
- if (aLDS.getLength() == 1 && aLDS.getStr()[0] == ',')
+ if (aLDS == ",")
fprintf( stderr, "Warning: %s\n",
"LongDateDayOfWeekSeparator is only a comma not followed by a space. Usually this is not the case and may lead to concatenated display names like \"Wednesday,May 9, 2007\".");
sepNode = findNode("LongDateDaySeparator");
aLDS = sepNode->getValue();
of.writeParameter("LongDateDaySeparator", aLDS);
- if (aLDS.getLength() == 1 && (aLDS.getStr()[0] == ',' || aLDS.getStr()[0] == '.'))
+ if (aLDS == "," || aLDS == ".")
fprintf( stderr, "Warning: %s\n",
"LongDateDaySeparator is only a comma or dot not followed by a space. Usually this is not the case and may lead to concatenated display names like \"Wednesday, May 9,2007\".");
@@ -459,7 +459,7 @@ void LCCTYPENode::generateCode (const OFileWriter &of) const
if (aListSep == aThoSep)
fprintf( stderr, "Warning: %s\n",
"ListSeparator equals ThousandSeparator.");
- if (aListSep.getLength() != 1 || aListSep.getStr()[0] != ';')
+ if (aListSep.getLength() != 1 || aListSep[0] != ';')
{
incError( "ListSeparator not ';' semicolon. Strongly recommended. Currently required.");
++nSavErr; // format codes not affected