summaryrefslogtreecommitdiff
path: root/writerfilter
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 /writerfilter
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 'writerfilter')
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.cxx6
-rw-r--r--writerfilter/source/dmapper/NumberingManager.cxx2
-rw-r--r--writerfilter/source/rtftok/rtfdocumentimpl.cxx2
3 files changed, 5 insertions, 5 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 289b83cfb46a..e2f6d7ebbf92 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -2019,8 +2019,8 @@ OUString lcl_ExctractAskVariableAndHint( const OUString& rCommand, OUString& rHi
// the text after the variable and before a '\' is the hint
// if no hint is set the variable is used as hint
// the quotes of the hint have to be removed
- sal_Int32 nIndex = rCommand.indexOf( ' ', 2);//find last space after 'ASK'
- while(rCommand.getStr()[nIndex] == ' ')
+ sal_Int32 nIndex = rCommand.indexOf( ' ', 2); //find last space after 'ASK'
+ while(rCommand[nIndex] == ' ')
++nIndex;
OUString sShortCommand( rCommand.copy( nIndex ) ); //cut off the " ASK "
@@ -2212,7 +2212,7 @@ void FieldContext::AppendCommand(const OUString& rPart)
if (sToken.isEmpty())
continue;
- if (sToken.getStr()[0] == '"')
+ if (sToken[0] == '"')
{
bInStringNext = true;
sToken = sToken.copy(1);
diff --git a/writerfilter/source/dmapper/NumberingManager.cxx b/writerfilter/source/dmapper/NumberingManager.cxx
index 917abb23c356..7a1787c49358 100644
--- a/writerfilter/source/dmapper/NumberingManager.cxx
+++ b/writerfilter/source/dmapper/NumberingManager.cxx
@@ -185,7 +185,7 @@ sal_Int16 ListLevel::GetParentNumbering( OUString sText, sal_Int16 nLevel,
{
if( sLevelText.getLength() > 1 )
{
- sal_Unicode cLevel = sLevelText.getStr()[1];
+ sal_Unicode cLevel = sLevelText[1];
if( cLevel >= '1' && cLevel <= '9' )
{
if( cLevel - '1' < nMinLevel )
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 2e288d1e7d2c..c0f14e40a595 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -1005,7 +1005,7 @@ void RTFDocumentImpl::text(OUString& rString)
if (rString.getLength() == 1 && m_aStates.top().nDestinationState != DESTINATION_DOCCOMM)
{
// No cheating! Tokenizer ignores bare \r and \n, their hex \'0d / \'0a form doesn't count, either.
- sal_Unicode ch = rString.getStr()[0];
+ sal_Unicode ch = rString[0];
if (ch == 0x0d || ch == 0x0a)
return;
}