summaryrefslogtreecommitdiff
path: root/sdext
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 /sdext
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 'sdext')
-rw-r--r--sdext/source/pdfimport/pdfparse/pdfentries.cxx6
-rw-r--r--sdext/source/presenter/PresenterTextView.cxx2
2 files changed, 4 insertions, 4 deletions
diff --git a/sdext/source/pdfimport/pdfparse/pdfentries.cxx b/sdext/source/pdfimport/pdfparse/pdfentries.cxx
index 66804ff3b9f1..c1343d9c891b 100644
--- a/sdext/source/pdfimport/pdfparse/pdfentries.cxx
+++ b/sdext/source/pdfimport/pdfparse/pdfentries.cxx
@@ -1311,7 +1311,7 @@ PDFFileImplData* PDFFile::impl_getData() const
#if OSL_DEBUG_LEVEL > 1
OUString aTmp;
for( int i = 0; i < m_pData->m_aDocID.getLength(); i++ )
- aTmp += OUString::number((unsigned int)sal_uInt8(m_pData->m_aDocID.getStr()[i]), 16);
+ aTmp += OUString::number((unsigned int)sal_uInt8(m_pData->m_aDocID[i]), 16);
SAL_INFO("sdext.pdfimport.pdfparse", "DocId is <" << OUStringToOString(aTmp, RTL_TEXTENCODING_UTF8).getStr() << ">");
#endif
}
@@ -1375,7 +1375,7 @@ PDFFileImplData* PDFFile::impl_getData() const
{
OUString aTmp;
for( int i = 0; i < aEnt.getLength(); i++ )
- aTmp += " " + OUString::number((unsigned int)sal_uInt8(aEnt.getStr()[i]), 16);
+ aTmp += " " + OUString::number((unsigned int)sal_uInt8(aEnt[i]), 16);
SAL_WARN("sdext.pdfimport.pdfparse",
"O entry has length " << (int)aEnt.getLength() << ", should be 32 <" << OUStringToOString(aTmp, RTL_TEXTENCODING_UTF8).getStr() << ">" );
}
@@ -1395,7 +1395,7 @@ PDFFileImplData* PDFFile::impl_getData() const
{
OUString aTmp;
for( int i = 0; i < aEnt.getLength(); i++ )
- aTmp += " " + OUString::number((unsigned int)sal_uInt8(aEnt.getStr()[i]), 16);
+ aTmp += " " + OUString::number((unsigned int)sal_uInt8(aEnt[i]), 16);
SAL_WARN("sdext.pdfimport.pdfparse",
"U entry has length " << (int)aEnt.getLength() << ", should be 32 <" << OUStringToOString(aTmp, RTL_TEXTENCODING_UTF8).getStr() << ">" );
}
diff --git a/sdext/source/presenter/PresenterTextView.cxx b/sdext/source/presenter/PresenterTextView.cxx
index 4463ea236c10..8073190a39d3 100644
--- a/sdext/source/presenter/PresenterTextView.cxx
+++ b/sdext/source/presenter/PresenterTextView.cxx
@@ -788,7 +788,7 @@ sal_Unicode PresenterTextParagraph::GetCharacter (
}
else
{
- return msParagraphText.getStr()[nGlobalCharacterIndex - mnCharacterOffset];
+ return msParagraphText[nGlobalCharacterIndex - mnCharacterOffset];
}
}