diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2018-06-30 09:56:57 +0200 |
---|---|---|
committer | Matteo Casalin <matteo.casalin@yahoo.com> | 2018-06-30 23:00:18 +0200 |
commit | f4b1a454883b71c631516ed9fb7f32e31f177821 (patch) | |
tree | b66959fa4bc1b1fc10a187bc5d904574b8987e0e /svx | |
parent | ba437fd59da07768826a1e816ba727109d3c5d3b (diff) |
Avoid using getTokenCount() to get last token in a string
Change-Id: I6c36394f391850baf641268912e71ebaa3504b5d
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/form/fmshimp.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx index 033ea0f337b8..4f3f6cd4eba7 100644 --- a/svx/source/form/fmshimp.cxx +++ b/svx/source/form/fmshimp.cxx @@ -408,9 +408,8 @@ namespace for (j=0; j<pCurrentArray->getLength(); ++j, ++pCurrentListeners) { OUString aListener = (*pCurrentListeners).getTypeName(); - sal_Int32 nTokens = comphelper::string::getTokenCount(aListener, '.'); - if (nTokens) - aListener = aListener.getToken(nTokens - 1, '.'); + if (!aListener.isEmpty()) + aListener = aListener.copy(aListener.lastIndexOf('.')+1); if (aListener == pCurrent->ListenerType) // the current ScriptEventDescriptor doesn't match the current listeners class |