summaryrefslogtreecommitdiff
path: root/reportdesign
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 /reportdesign
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 'reportdesign')
-rw-r--r--reportdesign/source/core/misc/conditionalexpression.cxx2
-rw-r--r--reportdesign/source/core/sdr/formatnormalizer.cxx2
2 files changed, 2 insertions, 2 deletions
diff --git a/reportdesign/source/core/misc/conditionalexpression.cxx b/reportdesign/source/core/misc/conditionalexpression.cxx
index 2a278a9a13fd..08c1fcf6bd69 100644
--- a/reportdesign/source/core/misc/conditionalexpression.cxx
+++ b/reportdesign/source/core/misc/conditionalexpression.cxx
@@ -39,7 +39,7 @@ namespace rptui
while ( nPatternIndex > -1 )
{
const OUString* pReplace = NULL;
- switch ( sExpression.getStr()[ nPatternIndex + 1 ] )
+ switch ( sExpression[ nPatternIndex + 1 ] )
{
case '$': pReplace = &_rFieldDataSource; break;
case '1': pReplace = &_rLHS; break;
diff --git a/reportdesign/source/core/sdr/formatnormalizer.cxx b/reportdesign/source/core/sdr/formatnormalizer.cxx
index 97168a5213b9..0532817442a2 100644
--- a/reportdesign/source/core/sdr/formatnormalizer.cxx
+++ b/reportdesign/source/core/sdr/formatnormalizer.cxx
@@ -227,7 +227,7 @@ namespace rptui
// not bound to a table field
// TODO: we might also do this kind of thing for functions and expressions ...
return;
- if ( sDataField.getStr()[ sDataField.getLength() - 1 ] != ']' )
+ if ( !sDataField.endsWith("]") )
{
// last character is not the closing brace
OSL_FAIL( "FormatNormalizer::impl_adjustFormatToDataFieldType_nothrow: suspicious data field value!" );