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 --- cui/source/dialogs/thesdlg.cxx | 3 +-- cui/source/tabpages/numpages.cxx | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) (limited to 'cui') diff --git a/cui/source/dialogs/thesdlg.cxx b/cui/source/dialogs/thesdlg.cxx index 6157c749c414..6ae616a43586 100644 --- a/cui/source/dialogs/thesdlg.cxx +++ b/cui/source/dialogs/thesdlg.cxx @@ -271,8 +271,7 @@ uno::Sequence< uno::Reference< linguistic2::XMeaning > > SvxThesaurusDialog::que xThesaurus->queryMeanings( rTerm, rLocale, rProperties ) ); // text with '.' at the end? - if ( 0 == aMeanings.getLength() && !rTerm.isEmpty() && - rTerm.getStr()[ rTerm.getLength() - 1 ] == '.') + if ( 0 == aMeanings.getLength() && rTerm.endsWith(".") ) { // try again without trailing '.' chars. It may be a word at the // end of a sentence and not an abbreviation... diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx index 6b21a99a2a57..d646da233c10 100644 --- a/cui/source/tabpages/numpages.cxx +++ b/cui/source/tabpages/numpages.cxx @@ -320,8 +320,8 @@ IMPL_LINK_NOARG(SvxSingleNumPickTabPage, NumSelectHdl_Impl) return 0; SvxNumSettings_Impl* _pSet = &aNumSettingsArr[nIdx]; sal_Int16 eNewType = _pSet->nNumberType; - const sal_Unicode cLocalPrefix = !_pSet->sPrefix.isEmpty() ? _pSet->sPrefix.getStr()[0] : 0; - const sal_Unicode cLocalSuffix = !_pSet->sSuffix.isEmpty() ? _pSet->sSuffix.getStr()[0] : 0; + const sal_Unicode cLocalPrefix = !_pSet->sPrefix.isEmpty() ? _pSet->sPrefix[0] : 0; + const sal_Unicode cLocalSuffix = !_pSet->sSuffix.isEmpty() ? _pSet->sSuffix[0] : 0; sal_uInt16 nMask = 1; for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++) @@ -730,7 +730,7 @@ IMPL_LINK_NOARG(SvxNumPickTabPage, NumSelectHdl_Impl) aFmt.SetBulletFont( &rActBulletFont ); aFmt.SetBulletChar( !pLevelSettings->sBulletChar.isEmpty() - ? pLevelSettings->sBulletChar.getStr()[0] + ? pLevelSettings->sBulletChar[0] : 0 ); aFmt.SetCharFmtName( sBulletCharFmtName ); // #62069# // #92724# -- cgit