diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-08-28 11:15:47 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-08-29 09:00:52 +0200 |
commit | 6dbae37b8d2d2d1ecad85c772fd684803b5a52cb (patch) | |
tree | cb6637327913a5f9641c2c0065de4c6a00983947 /svx/source | |
parent | dc06c8f4989fc28d0c31ebd333e53dfe0e0f5f66 (diff) |
loplugin:constantparam (1)
Change-Id: I25077e391ecca1b678062d261a83d88daadf0a58
Reviewed-on: https://gerrit.libreoffice.org/59701
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source')
-rw-r--r-- | svx/source/fmcomp/gridcell.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx index 59a559a33aff..b4d5695ec178 100644 --- a/svx/source/fmcomp/gridcell.cxx +++ b/svx/source/fmcomp/gridcell.cxx @@ -2602,9 +2602,9 @@ OUString DbListBox::GetFormatText(const Reference< css::sdb::XColumn >& _rxField sText = _rxField->getString(); if ( m_bBound ) { - Sequence< sal_Int16 > aPosSeq = ::comphelper::findValue( m_aValueList, sText, true ); - if ( aPosSeq.getLength() ) - sText = static_cast<ListBox*>(m_pWindow.get())->GetEntry(aPosSeq.getConstArray()[0]); + sal_Int32 nPos = ::comphelper::findValue( m_aValueList, sText ); + if ( nPos != -1 ) + sText = static_cast<ListBox*>(m_pWindow.get())->GetEntry(nPos); else sText.clear(); } @@ -2952,9 +2952,9 @@ void DbFilterField::SetText(const OUString& rText) } break; case css::form::FormComponentType::LISTBOX: { - Sequence<sal_Int16> aPosSeq = ::comphelper::findValue(m_aValueList, m_aText, true); - if (aPosSeq.getLength()) - static_cast<ListBox*>(m_pWindow.get())->SelectEntryPos(aPosSeq.getConstArray()[0]); + sal_Int32 nPos = ::comphelper::findValue(m_aValueList, m_aText); + if (nPos != -1) + static_cast<ListBox*>(m_pWindow.get())->SelectEntryPos(nPos); else static_cast<ListBox*>(m_pWindow.get())->SetNoSelection(); } break; |