summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorMatteo Casalin <matteo.casalin@yahoo.com>2019-02-10 16:03:12 +0100
committerMatteo Casalin <matteo.casalin@yahoo.com>2019-02-13 07:54:35 +0100
commitf528ad715834d4ffb0c762f7af9c19d5dce2dadd (patch)
tree1505b2d8f11829cb45bf6a10ee71f81c5e13041f /sfx2
parentac200764897f738f3faac47fc664048409fe37f8 (diff)
Take advantage of indexed getToken()
Change-Id: Iac7b4caf58706e153981be7994cba1929520f44c Reviewed-on: https://gerrit.libreoffice.org/67636 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/appl/newhelp.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx
index 0035877b1bff..d4e774b1f775 100644
--- a/sfx2/source/appl/newhelp.cxx
+++ b/sfx2/source/appl/newhelp.cxx
@@ -1472,9 +1472,8 @@ void SfxHelpIndexWindow_Impl::Initialize()
for (const OUString & rRow : aFactories)
{
sal_Int32 nIdx = 0;
- OUString aTitle = rRow.getToken( 0, '\t', nIdx );
- nIdx = 0;
- OUString aURL = rRow.getToken( 2, '\t', nIdx );
+ OUString aTitle = rRow.getToken( 0, '\t', nIdx ); // token 0
+ OUString aURL = rRow.getToken( 1, '\t', nIdx ); // token 2
OUString* pFactory = new OUString( INetURLObject( aURL ).GetHost() );
const sal_Int32 nPos = m_pActiveLB->InsertEntry( aTitle );
m_pActiveLB->SetEntryData( nPos, pFactory );
@@ -2794,8 +2793,9 @@ IMPL_LINK_NOARG(SfxHelpWindow_Impl, OpenHdl, Control*, bool)
OUString aAnchor = OUString('#');
if ( comphelper::string::getTokenCount(aEntry, '#') == 2 )
{
- aId = aEntry.getToken( 0, '#' );
- aAnchor += aEntry.getToken( 1, '#' );
+ sal_Int32 nIdx{ 0 };
+ aId = aEntry.getToken( 0, '#', nIdx );
+ aAnchor += aEntry.getToken( 0, '#', nIdx );
}
else
aId = aEntry;