From 0e6a2601b39cbadaff7f7506ba9e804f108060db Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 23 Oct 2013 13:29:32 +0200 Subject: 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 --- sd/source/filter/eppt/pptexanimations.cxx | 2 +- sd/source/filter/ppt/pptinanimations.cxx | 2 +- sd/source/ui/unoidl/unosrch.cxx | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'sd') 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 ); -- cgit