diff options
Diffstat (limited to 'dbaccess/source')
-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!"); } |