summaryrefslogtreecommitdiff
path: root/cui
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 /cui
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 'cui')
-rw-r--r--cui/source/dialogs/thesdlg.cxx3
-rw-r--r--cui/source/tabpages/numpages.cxx6
2 files changed, 4 insertions, 5 deletions
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#