summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorMatteo Casalin <matteo.casalin@yahoo.com>2019-02-09 18:11:32 +0100
committerMatteo Casalin <matteo.casalin@yahoo.com>2019-02-13 07:38:29 +0100
commitf4a75a254dbc172e07cac18b7bb8edc965f378d7 (patch)
tree4ce0e95c1dab938fd29e832542cec72c5e092221 /svtools
parent60ee3d8e18b2cab428c22eb49883a5e307b8a689 (diff)
Avoid index for single getToken() call
Change-Id: Ia95c9f78978c2299382ffdec603e44b06299549e Reviewed-on: https://gerrit.libreoffice.org/67625 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/config/extcolorcfg.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/svtools/source/config/extcolorcfg.cxx b/svtools/source/config/extcolorcfg.cxx
index 9c5408111185..6f195039d4a1 100644
--- a/svtools/source/config/extcolorcfg.cxx
+++ b/svtools/source/config/extcolorcfg.cxx
@@ -243,8 +243,7 @@ void ExtendedColorConfig_Impl::Load(const OUString& rScheme)
OUString sComponentDisplayName;
if ( aComponentDisplayNamesValue.getLength() && (aComponentDisplayNamesValue[0] >>= sComponentDisplayName) )
{
- sal_Int32 nIndex = 0;
- m_aComponentDisplayNames.emplace(componentName.getToken(1,'/',nIndex),sComponentDisplayName);
+ m_aComponentDisplayNames.emplace(componentName.getToken(1, '/'),sComponentDisplayName);
}
componentName += "/Entries";
@@ -347,8 +346,7 @@ void ExtendedColorConfig_Impl::FillComponentColors(uno::Sequence < OUString >& _
OUString sTemp = sName.copy(0,sName.lastIndexOf(sColor));
TDisplayNames::const_iterator aFind = _rDisplayNames.find(sTemp);
- nIndex = 0;
- sName = sName.getToken(2,'/',nIndex);
+ sName = sName.getToken(2, '/');
OSL_ENSURE(aFind != _rDisplayNames.end(),"DisplayName is not in EntryNames config list!");
if ( aFind != _rDisplayNames.end() )
sDisplayName = aFind->second;