diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2018-06-30 12:21:22 +0200 |
---|---|---|
committer | Matteo Casalin <matteo.casalin@yahoo.com> | 2018-06-30 23:00:20 +0200 |
commit | d253ee7c8b04d19e415a4fdeefdc450bdee824e2 (patch) | |
tree | 1ef952949f0216a20c3370b5f4a069cfbcc47ec8 /svtools | |
parent | 7f232e3319d39e7fb8e0ba0930c20176a91d6325 (diff) |
Avoid using getTokenCount() to get last token in a string
Change-Id: I8e26d07c67fe10a55717a238563dd036b94fd381
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/config/printoptions.cxx | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/svtools/source/config/printoptions.cxx b/svtools/source/config/printoptions.cxx index f5d3c178f471..af1101acd8cd 100644 --- a/svtools/source/config/printoptions.cxx +++ b/svtools/source/config/printoptions.cxx @@ -30,7 +30,6 @@ #include <comphelper/configurationhelper.hxx> #include <comphelper/processfactory.hxx> -#include <comphelper/string.hxx> #include "itemholder2.hxx" @@ -129,10 +128,7 @@ SvtPrintOptions_Impl::SvtPrintOptions_Impl(const OUString& rConfigRoot) if (m_xCfg.is()) { - using comphelper::string::getTokenCount; - sal_Int32 nTokenCount = getTokenCount(rConfigRoot, '/'); - OUString sTok = rConfigRoot.getToken(nTokenCount - 1, '/'); - m_xCfg->getByName(sTok) >>= m_xNode; + m_xCfg->getByName(rConfigRoot.copy(rConfigRoot.lastIndexOf('/')+1)) >>= m_xNode; } } catch (const css::uno::Exception&) |