From d253ee7c8b04d19e415a4fdeefdc450bdee824e2 Mon Sep 17 00:00:00 2001 From: Matteo Casalin Date: Sat, 30 Jun 2018 12:21:22 +0200 Subject: Avoid using getTokenCount() to get last token in a string Change-Id: I8e26d07c67fe10a55717a238563dd036b94fd381 --- svtools/source/config/printoptions.cxx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'svtools') 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 #include -#include #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&) -- cgit