From 0da6e8800b8188caae60707ed2c609d9a17c1dd8 Mon Sep 17 00:00:00 2001 From: Matteo Casalin Date: Sun, 9 Sep 2018 11:29:29 +0200 Subject: Avoid getTokenCount() Change-Id: Ib84104ea0c523729c3a7fe6019ed2e788ff7b189 --- dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'dbaccess') diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx index fde2fd045af3..c99cfd24b64d 100644 --- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx +++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx @@ -2199,18 +2199,17 @@ bool OSelectionBrowseBox::GetFunctionName(sal_uInt32 _nFunctionTokenId, OUString break; default: { - sal_Int32 nCount = comphelper::string::getTokenCount(m_aFunctionStrings, ';'); - sal_Int32 i; - for( i = 0; i < nCount-1; i++ ) // grouping is not counted + const sal_Int32 nStopIdx = m_aFunctionStrings.lastIndexOf(';'); // grouping is not counted + for (sal_Int32 nIdx {0}; nIdx