diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2018-06-30 16:39:46 +0200 |
---|---|---|
committer | Matteo Casalin <matteo.casalin@yahoo.com> | 2018-06-30 23:00:20 +0200 |
commit | fbd787dc9bf048bfc1be8eebf5920a69e34b6b75 (patch) | |
tree | 2dbc10b2469d18db8e4473fd2d3c73f735ae6d2d /sfx2 | |
parent | d253ee7c8b04d19e415a4fdeefdc450bdee824e2 (diff) |
Use indexed getToken() and avoid getTokenCount()
Change-Id: I8807f8e7fd0fb76723bc4d46fa35cc346777051e
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/appl/newhelp.cxx | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx index a8234eaa99bf..0ac8ef38b41b 100644 --- a/sfx2/source/appl/newhelp.cxx +++ b/sfx2/source/appl/newhelp.cxx @@ -928,16 +928,17 @@ SearchTabPage_Impl::SearchTabPage_Impl(vcl::Window* pParent, SfxHelpIndexWindow_ Any aUserItem = aViewOpt.GetUserItem( USERITEM_NAME ); if ( aUserItem >>= aUserData ) { - bool bChecked = aUserData.getToken(0, ';').toInt32() == 1; + sal_Int32 nIdx {0}; + bool bChecked = aUserData.getToken(0, ';', nIdx).toInt32() == 1; m_pFullWordsCB->Check( bChecked ); - bChecked = aUserData.getToken(1, ';').toInt32() == 1; + bChecked = aUserData.getToken(0, ';', nIdx).toInt32() == 1; m_pScopeCB->Check( bChecked ); - for ( sal_Int32 i = 2; i < comphelper::string::getTokenCount(aUserData, ';'); ++i ) + while ( nIdx > 0 ) { - OUString aToken = aUserData.getToken(i, ';'); m_pSearchED->InsertEntry( INetURLObject::decode( - aToken, INetURLObject::DecodeMechanism::WithCharset ) ); + aUserData.getToken(0, ';', nIdx), + INetURLObject::DecodeMechanism::WithCharset ) ); } } } |