summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorLionel Elie Mamane <lionel@mamane.lu>2016-05-27 11:51:10 +0200
committerCaolán McNamara <caolanm@redhat.com>2016-05-31 09:49:07 +0000
commit4fb26b371c52e856ef05d4c67e9219117eaf3225 (patch)
tree33f6be34b656bb36cc5284db95bea10dc1d6139d /dbaccess
parent1290680ae6044bc8cc9e7c25f7bb62416336a0ae (diff)
tdf#96516 do not increment position counter when an entry is removed
Change-Id: I81a4455df1fd5962d0362f4e5fa3396764a0ae5a Reviewed-on: https://gerrit.libreoffice.org/25548 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/ui/querydesign/querydlg.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/dbaccess/source/ui/querydesign/querydlg.cxx b/dbaccess/source/ui/querydesign/querydlg.cxx
index dc743c061ab0..3ea04b4e6d23 100644
--- a/dbaccess/source/ui/querydesign/querydlg.cxx
+++ b/dbaccess/source/ui/querydesign/querydlg.cxx
@@ -123,13 +123,15 @@ DlgQryJoin::DlgQryJoin( OQueryTableView * pParent,
else
{
const sal_Int32 nCount = m_pLB_JoinType->GetEntryCount();
- for (sal_Int32 i = 0; i < nCount; ++i)
+ for (sal_Int32 i = 0; i < nCount;)
{
const sal_IntPtr nJoinTyp = reinterpret_cast<sal_IntPtr>(m_pLB_JoinType->GetEntryData(i));
if ( !bSupportFullJoin && nJoinTyp == ID_FULL_JOIN )
m_pLB_JoinType->RemoveEntry(i);
else if ( !bSupportOuterJoin && (nJoinTyp == ID_LEFT_JOIN || nJoinTyp == ID_RIGHT_JOIN) )
m_pLB_JoinType->RemoveEntry(i);
+ else
+ ++i;
}
m_pTableControl->NotifyCellChange();