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 /dbaccess | |
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 'dbaccess')
-rw-r--r-- | dbaccess/source/core/dataaccess/connection.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/querydesign/QueryTableView.cxx | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/dbaccess/source/core/dataaccess/connection.cxx b/dbaccess/source/core/dataaccess/connection.cxx index 4919c9b42615..598b4e815c0f 100644 --- a/dbaccess/source/core/dataaccess/connection.cxx +++ b/dbaccess/source/core/dataaccess/connection.cxx @@ -89,7 +89,7 @@ Sequence< OUString > OConnection::getSupportedServiceNames( ) { Sequence< OUString > aSupported = OConnectionWrapper::getSupportedServiceNames(); - if ( 0 == findValue( aSupported, SERVICE_SDB_CONNECTION, true ).getLength() ) + if ( comphelper::findValue( aSupported, SERVICE_SDB_CONNECTION ) == -1 ) { sal_Int32 nLen = aSupported.getLength(); aSupported.realloc( nLen + 1 ); diff --git a/dbaccess/source/ui/querydesign/QueryTableView.cxx b/dbaccess/source/ui/querydesign/QueryTableView.cxx index 12688f0b4877..58d0fe320cb4 100644 --- a/dbaccess/source/ui/querydesign/QueryTableView.cxx +++ b/dbaccess/source/ui/querydesign/QueryTableView.cxx @@ -150,9 +150,9 @@ namespace xColumn->getPropertyValue(PROPERTY_RELATEDCOLUMN) >>= sRelatedColumn; { - Sequence< sal_Int16> aFind(::comphelper::findValue(_rSource.GetOriginalColumns()->getElementNames(),rElement,true)); - if(aFind.getLength()) - pNewConnData->SetFieldIndex(JTCS_FROM,aFind[0]+1); + sal_Int32 nFindIndex = ::comphelper::findValue(_rSource.GetOriginalColumns()->getElementNames(),rElement); + if(nFindIndex != -1) + pNewConnData->SetFieldIndex(JTCS_FROM,nFindIndex+1); else OSL_FAIL("Column not found!"); } @@ -160,9 +160,9 @@ namespace Reference<XNameAccess> xRefColumns = _rDest.GetOriginalColumns(); if(xRefColumns.is()) { - Sequence< sal_Int16> aFind(::comphelper::findValue(xRefColumns->getElementNames(),sRelatedColumn,true)); - if(aFind.getLength()) - pNewConnData->SetFieldIndex(JTCS_TO,aFind[0]+1); + sal_Int32 nFindIndex = ::comphelper::findValue(xRefColumns->getElementNames(),sRelatedColumn); + if(nFindIndex != -1) + pNewConnData->SetFieldIndex(JTCS_TO,nFindIndex+1); else OSL_FAIL("Column not found!"); } |