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 --- sdext/source/pdfimport/pdfparse/pdfentries.cxx | 6 +++--- sdext/source/presenter/PresenterTextView.cxx | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'sdext') 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]; } } -- cgit v1.2.3