summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui/querydesign
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2017-12-17 23:00:24 +0300
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-12-18 07:36:32 +0100
commit4e144751f12a06e358e4f7efa7c8f13954e6cfd7 (patch)
treec6df66d58d02ecaf5caa437a944665fe83959402 /dbaccess/source/ui/querydesign
parent39c618caf5aa19da95285bec6cab7108bee3984c (diff)
loplugin:unusedindex
Change-Id: I256a807dd2a4c81126b5a76f3d472e31b8224146 Reviewed-on: https://gerrit.libreoffice.org/46652 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'dbaccess/source/ui/querydesign')
-rw-r--r--dbaccess/source/ui/querydesign/QueryTableView.cxx11
1 files changed, 4 insertions, 7 deletions
diff --git a/dbaccess/source/ui/querydesign/QueryTableView.cxx b/dbaccess/source/ui/querydesign/QueryTableView.cxx
index 5144525f2c97e..d721ed7da46d7 100644
--- a/dbaccess/source/ui/querydesign/QueryTableView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryTableView.cxx
@@ -139,13 +139,10 @@ namespace
OUString sRelatedColumn;
// iterate through all foreignkey columns to create the connections
- Sequence< OUString> aElements(_rxSourceForeignKeyColumns->getElementNames());
- const OUString* pIter = aElements.getConstArray();
- const OUString* pEnd = pIter + aElements.getLength();
- for(sal_Int32 i=0;pIter != pEnd;++pIter,++i)
+ for(const OUString& rElement : _rxSourceForeignKeyColumns->getElementNames())
{
Reference<XPropertySet> xColumn;
- if ( !( _rxSourceForeignKeyColumns->getByName(*pIter) >>= xColumn ) )
+ if ( !( _rxSourceForeignKeyColumns->getByName(rElement) >>= xColumn ) )
{
OSL_FAIL( "addConnections: invalid foreign key column!" );
continue;
@@ -154,7 +151,7 @@ namespace
xColumn->getPropertyValue(PROPERTY_RELATEDCOLUMN) >>= sRelatedColumn;
{
- Sequence< sal_Int16> aFind(::comphelper::findValue(_rSource.GetOriginalColumns()->getElementNames(),*pIter,true));
+ Sequence< sal_Int16> aFind(::comphelper::findValue(_rSource.GetOriginalColumns()->getElementNames(),rElement,true));
if(aFind.getLength())
pNewConnData->SetFieldIndex(JTCS_FROM,aFind[0]+1);
else
@@ -170,7 +167,7 @@ namespace
else
OSL_FAIL("Column not found!");
}
- pNewConnData->AppendConnLine(*pIter,sRelatedColumn);
+ pNewConnData->AppendConnLine(rElement,sRelatedColumn);
// now add the Conn itself
ScopedVclPtrInstance< OQueryTableConnection > aNewConn(_pView, aNewConnData);