summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2015-03-07 09:04:34 +0100
committerChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2015-04-09 23:24:20 +0000
commit0dbc0f95d2d0a8ded4ee98e7cd07f217537305c2 (patch)
treec02a4736bee8972e227acb8c62ee6fdafaef0831
parentd75ae19498a5cfec93cad91044a6d93691222837 (diff)
tdf#88847: Fields of query design can be moved to the left only
Part of code 1299 ImplHeadItemList::iterator it = mpItemList->begin(); 1300 ::std::advance( it, nPos ); 1301 ImplHeadItem* pItem = *it; 1302 mpItemList->erase( it ); 1303 if ( nNewPos < nPos ) <-- case move to left 1304 nPos = nNewPos; 1305 it = mpItemList->begin(); 1306 ::std::advance( it, nPos ); 1307 mpItemList->insert( it, pItem ); So in move to right case, we erase and insert pItem at the same place We just have to use nNewPos in all cases regression from bd24a310be1459510b760b812838cb87923853c5 Also add back "ImplUpdate" call erroneously removed in merge commit 67d2af6fac2d9bad52a6b1f6e0cbd1229eb88a42 (there is an ImplUpdate call in each parent of that merge commit) Change-Id: I100b0c6874b366f777c5d38470fcee7a9a7326df (cherry picked from commit 63050dccbc50f148cd788730faa53d822d37e54f) Reviewed-on: https://gerrit.libreoffice.org/14787 Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu> Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
-rw-r--r--svtools/source/control/headbar.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/svtools/source/control/headbar.cxx b/svtools/source/control/headbar.cxx
index 1b3970712db3..53092811caec 100644
--- a/svtools/source/control/headbar.cxx
+++ b/svtools/source/control/headbar.cxx
@@ -1302,8 +1302,9 @@ void HeaderBar::MoveItem( sal_uInt16 nItemId, sal_uInt16 nNewPos )
if ( nNewPos < nPos )
nPos = nNewPos;
it = mpItemList->begin();
- ::std::advance( it, nPos );
+ ::std::advance( it, nNewPos );
mpItemList->insert( it, pItem );
+ ImplUpdate( nPos, true);
}
}
}