Kaydet (Commit) 4f90bd64 authored tarafından Matteo Casalin's avatar Matteo Casalin

Avoid getTokenCount()

Change-Id: I13318d43d3c572bd81080d5bb164fdcd9cd7d27b
üst d3596b72
......@@ -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".*)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment