summaryrefslogtreecommitdiff
path: root/sd
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 /sd
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 'sd')
-rw-r--r--sd/source/filter/eppt/pptexanimations.cxx2
-rw-r--r--sd/source/filter/ppt/pptinanimations.cxx2
-rw-r--r--sd/source/ui/unoidl/unosrch.cxx4
3 files changed, 4 insertions, 4 deletions
diff --git a/sd/source/filter/eppt/pptexanimations.cxx b/sd/source/filter/eppt/pptexanimations.cxx
index 951b2cf44744..355877ce9e0b 100644
--- a/sd/source/filter/eppt/pptexanimations.cxx
+++ b/sd/source/filter/eppt/pptexanimations.cxx
@@ -128,7 +128,7 @@ void ImplTranslateAttribute( OUString& rString, const TranslateMode eTranslateMo
while( (nIndex = rString.indexOf( aSearch, nIndex )) != -1 )
{
sal_Int32 nLength = aSearch.getLength();
- if( nIndex && (rString.getStr()[nIndex-1] == '#' ) )
+ if( nIndex && ( rString[nIndex-1] == '#' ) )
{
nIndex--;
nLength++;
diff --git a/sd/source/filter/ppt/pptinanimations.cxx b/sd/source/filter/ppt/pptinanimations.cxx
index 8dfd43ae49b2..03e8110da2f8 100644
--- a/sd/source/filter/ppt/pptinanimations.cxx
+++ b/sd/source/filter/ppt/pptinanimations.cxx
@@ -139,7 +139,7 @@ static bool convertMeasure( OUString& rString )
while( (nIndex = rString.indexOf( aSearch, nIndex )) != -1 )
{
sal_Int32 nLength = aSearch.getLength();
- if( nIndex && (rString.getStr()[nIndex-1] == '#' ) )
+ if( nIndex && (rString[nIndex-1] == '#' ) )
{
nIndex--;
nLength++;
diff --git a/sd/source/ui/unoidl/unosrch.cxx b/sd/source/ui/unoidl/unosrch.cxx
index 17c743963a44..50198a3d7bc3 100644
--- a/sd/source/ui/unoidl/unosrch.cxx
+++ b/sd/source/ui/unoidl/unosrch.cxx
@@ -646,8 +646,8 @@ sal_Bool SdUnoSearchReplaceShape::Search( const OUString& rText, sal_Int32& nSta
if(pDescr->IsWords())
{
- if( (nStartPos > 0 && aText.getStr()[nStartPos-1] > ' ') ||
- (nEndPos < aText.getLength() && aText.getStr()[nEndPos] > ' ') )
+ if( (nStartPos > 0 && aText[nStartPos-1] > ' ') ||
+ (nEndPos < aText.getLength() && aText[nEndPos] > ' ') )
{
nStartPos++;
return Search( aText, nStartPos, nEndPos, pDescr );