summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2015-03-07 09:04:34 +0100
committerLionel Elie Mamane <lionel@mamane.lu>2015-03-07 19:15:59 +0000
commita598a553ad98e5bfc5fedf03cc704e09601dab55 (patch)
tree8a1ac46a15a455e8c2ea7aa1a69cad8774b46d24
parent8ace7ee616e7a38f7c626a74e680b928832c78df (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/14786 Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu> Tested-by: Lionel Elie Mamane <lionel@mamane.lu>
-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 8f3c2626287b..3037c0228a69 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);
}
}
}