diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2018-09-09 10:24:44 +0200 |
---|---|---|
committer | Matteo Casalin <matteo.casalin@yahoo.com> | 2018-09-09 21:07:59 +0200 |
commit | 4f90bd648de91cfb803e94148e8ffcbc9502299e (patch) | |
tree | 9fff60ee48dc21c17a2ee2ce99556728b74b5a51 /dbaccess | |
parent | d3596b7274934e124b6baf57a2fb2fe75d732598 (diff) |
Avoid getTokenCount()
Change-Id: I13318d43d3c572bd81080d5bb164fdcd9cd7d27b
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx index 604f9bd66ec0..02096f44f68e 100644 --- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx +++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx @@ -135,10 +135,9 @@ OSelectionBrowseBox::OSelectionBrowseBox( vcl::Window* pParent ) aTitleFont.SetFontSize(Size(0, 6)); SetTitleFont(aTitleFont); - OUString aTxt(DBA_RES(STR_QUERY_SORTTEXT)); - sal_Int32 nCount = comphelper::string::getTokenCount(aTxt, ';'); - for (sal_Int32 nIdx = 0; nIdx < nCount; nIdx++) - m_pOrderCell->InsertEntry(aTxt.getToken(nIdx, ';')); + const OUString aTxt(DBA_RES(STR_QUERY_SORTTEXT)); + for (sal_Int32 nIdx {0}; nIdx>=0;) + m_pOrderCell->InsertEntry(aTxt.getToken(0, ';', nIdx)); m_bVisibleRow.insert(m_bVisibleRow.end(), BROW_ROW_CNT, true); @@ -202,9 +201,8 @@ void OSelectionBrowseBox::initialize() // We slip in a few optionals one, too. if ( lcl_SupportsCoreSQLGrammar(xConnection) ) { - sal_Int32 nCount = comphelper::string::getTokenCount(m_aFunctionStrings, ';'); - for( sal_Int32 nIdx = 0; nIdx < nCount; nIdx++ ) - m_pFunctionCell->InsertEntry(m_aFunctionStrings.getToken(nIdx, ';')); + for (sal_Int32 nIdx {0}; nIdx>=0;) + m_pFunctionCell->InsertEntry(m_aFunctionStrings.getToken(0, ';', nIdx)); } else // else only COUNT(*) and COUNT("table".*) { |