[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - dbaccess/source

Lionel Elie Mamane lionel at mamane.lu
Tue May 31 09:50:02 UTC 2016


 dbaccess/source/ui/querydesign/querydlg.cxx |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 55f7843316b3ec24b008771cfe41afa5bcb5ea50
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date:   Fri May 27 11:51:10 2016 +0200

    tdf#96516 do not increment position counter when an entry is removed
    
    Change-Id: I81a4455df1fd5962d0362f4e5fa3396764a0ae5a
    (cherry picked from commit 0df3760bc2035a54454db9fe2774dca58c58593f)
    Reviewed-on: https://gerrit.libreoffice.org/25552
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/dbaccess/source/ui/querydesign/querydlg.cxx b/dbaccess/source/ui/querydesign/querydlg.cxx
index dc743c0..3ea04b4 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();


More information about the Libreoffice-commits mailing list