diff options
author | Noel Grandin <noel@peralex.com> | 2013-10-23 13:29:32 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-11-04 08:06:10 +0200 |
commit | 0e6a2601b39cbadaff7f7506ba9e804f108060db (patch) | |
tree | ffd6bb4970f689d20087b721eb8dfd4bc86cd53f /basctl | |
parent | 457b349edbaf6d9dc747f3a631fee70e0c035bae (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 'basctl')
-rw-r--r-- | basctl/source/basicide/bastypes.cxx | 4 | ||||
-rw-r--r-- | basctl/source/basicide/localizationmgr.cxx | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/basctl/source/basicide/bastypes.cxx b/basctl/source/basicide/bastypes.cxx index 43391664cfc0..98a9f62bf642 100644 --- a/basctl/source/basicide/bastypes.cxx +++ b/basctl/source/basicide/bastypes.cxx @@ -684,8 +684,8 @@ void CutLines( OUString& rStr, sal_Int32 nStartLine, sal_Int32 nLines, bool bEra { sal_Int32 n = nStartPos; sal_Int32 nLen = rStr.getLength(); - while ( ( n < nLen ) && ( rStr.getStr()[ n ] == LINE_SEP || - rStr.getStr()[ n ] == LINE_SEP_CR ) ) + while ( ( n < nLen ) && ( rStr[ n ] == LINE_SEP || + rStr[ n ] == LINE_SEP_CR ) ) { n++; } diff --git a/basctl/source/basicide/localizationmgr.cxx b/basctl/source/basicide/localizationmgr.cxx index dfbbfaaa6ef6..28123870d47a 100644 --- a/basctl/source/basicide/localizationmgr.cxx +++ b/basctl/source/basicide/localizationmgr.cxx @@ -235,7 +235,7 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties // Replace string by id, add id+string to StringResource if( eMode == SET_IDS ) { - bool bEscAlreadyExisting = (!aPropStr.isEmpty() && aPropStr.getStr()[0] == '&' ); + bool bEscAlreadyExisting = aPropStr.startsWith("&"); if( bEscAlreadyExisting ) continue; @@ -425,7 +425,7 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties for ( i = 0; i < nPropStringCount; ++i ) { OUString aPropStr = pPropStrings[i]; - bool bEscAlreadyExisting = (!aPropStr.isEmpty() && aPropStr.getStr()[0] == '&' ); + bool bEscAlreadyExisting = aPropStr.startsWith("&"); if( bEscAlreadyExisting ) { pIdStrings[i] = aPropStr; |