summaryrefslogtreecommitdiff
path: root/extensions
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 /extensions
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 'extensions')
-rw-r--r--extensions/source/plugin/base/nfuncs.cxx4
-rw-r--r--extensions/source/propctrlr/standardcontrol.cxx2
2 files changed, 3 insertions, 3 deletions
diff --git a/extensions/source/plugin/base/nfuncs.cxx b/extensions/source/plugin/base/nfuncs.cxx
index f827026095f4..d56e02a9b7f5 100644
--- a/extensions/source/plugin/base/nfuncs.cxx
+++ b/extensions/source/plugin/base/nfuncs.cxx
@@ -146,13 +146,13 @@ static OString normalizeURL( XPlugin_Impl* plugin, const OString& url )
int nPos;
if( ( nPos = aLoadURL.indexOf( "://" ) ) != -1 )
{
- if( !url.isEmpty() && (url.getStr()[ 0 ] == '/' || url.indexOf( '/' ) != -1) )
+ if( url.indexOf( '/' ) != -1 )
{
// this means same server but new path
nPos = aLoadURL.indexOf( '/', nPos+3 );
if( nPos != -1 )
- aLoadURL = aLoadURL.copy( 0, url.getStr()[0] == '/' ? nPos : nPos+1 );
+ aLoadURL = aLoadURL.copy( 0, url.startsWith("/") ? nPos : nPos+1 );
}
else
{
diff --git a/extensions/source/propctrlr/standardcontrol.cxx b/extensions/source/propctrlr/standardcontrol.cxx
index 61c2c0e7496f..395b564291be 100644
--- a/extensions/source/propctrlr/standardcontrol.cxx
+++ b/extensions/source/propctrlr/standardcontrol.cxx
@@ -204,7 +204,7 @@ namespace pcr
if ( m_bIsPassword )
{
if ( !sText.isEmpty() )
- aPropValue <<= (sal_Int16)sText.getStr()[0];
+ aPropValue <<= (sal_Int16)sText[0];
}
else
aPropValue <<= sText;