summaryrefslogtreecommitdiff
path: root/xmlhelp
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2017-05-28 19:41:52 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-08-17 11:55:13 +0200
commit9881bea8d41997fb46579eb5f0314300159c96cc (patch)
treef52daa7055d2d28959e2d1ad576d963b7c0d3b2d /xmlhelp
parentec4034c4a4f23574401ba2a74b635d9ed4befbc8 (diff)
remove unnecessary use of OUString::getStr
Change-Id: I3d13e1c0bb6aa4a7aacc463198747c1368ebc9b4 Reviewed-on: https://gerrit.libreoffice.org/38114 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmlhelp')
-rw-r--r--xmlhelp/source/cxxhelp/provider/databases.cxx7
-rw-r--r--xmlhelp/source/cxxhelp/provider/urlparameter.cxx8
-rw-r--r--xmlhelp/source/treeview/tvread.cxx8
3 files changed, 11 insertions, 12 deletions
diff --git a/xmlhelp/source/cxxhelp/provider/databases.cxx b/xmlhelp/source/cxxhelp/provider/databases.cxx
index 6cfa804e4f02..1c263ec7c306 100644
--- a/xmlhelp/source/cxxhelp/provider/databases.cxx
+++ b/xmlhelp/source/cxxhelp/provider/databases.cxx
@@ -607,7 +607,6 @@ KeywordInfo::KeywordElement::KeywordElement( Databases const *pDatabases,
void KeywordInfo::KeywordElement::init( Databases const *pDatabases,helpdatafileproxy::Hdf* pHdf,const OUString& ids )
{
- const sal_Unicode* idstr = ids.getStr();
std::vector< OUString > id,anchor;
int idx = -1,k;
while( ( idx = ids.indexOf( ';',k = ++idx ) ) != -1 )
@@ -616,12 +615,12 @@ void KeywordInfo::KeywordElement::init( Databases const *pDatabases,helpdatafile
if( h < idx )
{
// found an anchor
- id.push_back( OUString( &idstr[k],h-k ) );
- anchor.push_back( OUString( &idstr[h+1],idx-h-1 ) );
+ id.push_back( ids.copy( k, h-k ) );
+ anchor.push_back( ids.copy( h+1, idx-h-1 ) );
}
else
{
- id.push_back( OUString( &idstr[k],idx-k ) );
+ id.push_back( ids.copy( k, idx-k ) );
anchor.push_back( OUString() );
}
}
diff --git a/xmlhelp/source/cxxhelp/provider/urlparameter.cxx b/xmlhelp/source/cxxhelp/provider/urlparameter.cxx
index 6ccdf3964527..5666592dd9f9 100644
--- a/xmlhelp/source/cxxhelp/provider/urlparameter.cxx
+++ b/xmlhelp/source/cxxhelp/provider/urlparameter.cxx
@@ -414,7 +414,7 @@ bool URLParameter::module()
{
sal_Int32 idx = 0,length = m_aExpr.getLength();
- while( idx < length && rtl::isAsciiAlphanumeric( (m_aExpr.getStr())[idx] ) )
+ while( idx < length && rtl::isAsciiAlphanumeric( m_aExpr[idx] ) )
++idx;
if( idx != 0 )
@@ -434,10 +434,10 @@ bool URLParameter::name( bool modulePresent )
sal_Int32 length = m_aExpr.getLength();
- if( length != 0 && (m_aExpr.getStr())[0] == '/' )
+ if( length != 0 && m_aExpr[0] == '/' )
{
sal_Int32 idx = 1;
- while( idx < length && (m_aExpr.getStr())[idx] != '?' )
+ while( idx < length && m_aExpr[idx] != '?' )
++idx;
if( idx != 1 && ! modulePresent )
@@ -459,7 +459,7 @@ bool URLParameter::query()
if( m_aExpr.isEmpty() )
return true;
- else if( (m_aExpr.getStr())[0] == '?' )
+ else if( m_aExpr[0] == '?' )
query_ = m_aExpr.copy( 1 ).trim();
else
return false;
diff --git a/xmlhelp/source/treeview/tvread.cxx b/xmlhelp/source/treeview/tvread.cxx
index 424ec3029ada..d3e885680c17 100644
--- a/xmlhelp/source/treeview/tvread.cxx
+++ b/xmlhelp/source/treeview/tvread.cxx
@@ -511,7 +511,7 @@ bool TVChildTarget::SearchAndInsert(TVDom* p, TVDom* tvDom)
Any SAL_CALL
TVChildTarget::getByName( const OUString& aName )
{
- OUString num( aName.getStr()+2,aName.getLength()-4 );
+ OUString num( aName.copy( 2, aName.getLength()-4 ) );
sal_Int32 idx = num.toInt32() - 1;
if( idx < 0 || Elements.size() <= sal_uInt32( idx ) )
throw NoSuchElementException();
@@ -533,7 +533,7 @@ TVChildTarget::getElementNames( )
sal_Bool SAL_CALL
TVChildTarget::hasByName( const OUString& aName )
{
- OUString num( aName.getStr()+2,aName.getLength()-4 );
+ OUString num( aName.copy( 2, aName.getLength()-4 ) );
sal_Int32 idx = num.toInt32() - 1;
if( idx < 0 || Elements.size() <= sal_uInt32( idx ) )
return false;
@@ -550,7 +550,7 @@ TVChildTarget::getByHierarchicalName( const OUString& aName )
if( ( idx = aName.indexOf( '/' ) ) != -1 )
{
- OUString num( aName.getStr()+2,idx-4 );
+ OUString num( aName.copy( 2, idx-4 ) );
sal_Int32 pref = num.toInt32() - 1;
if( pref < 0 || Elements.size() <= sal_uInt32( pref ) )
@@ -569,7 +569,7 @@ TVChildTarget::hasByHierarchicalName( const OUString& aName )
if( ( idx = aName.indexOf( '/' ) ) != -1 )
{
- OUString num( aName.getStr()+2,idx-4 );
+ OUString num( aName.copy( 2, idx-4 ) );
sal_Int32 pref = num.toInt32() - 1;
if( pref < 0 || Elements.size() <= sal_uInt32( pref ) )
return false;