summaryrefslogtreecommitdiff
path: root/svtools
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:14:39 +0000
commit63050dccbc50f148cd788730faa53d822d37e54f (patch)
treed3a0efdcd56da87559fa6b98fbab5b861839bf28 /svtools
parente3cb10c3c55a4d78497e94671d19ccdc16d478b0 (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 Reviewed-on: https://gerrit.libreoffice.org/14777 Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu> Tested-by: Lionel Elie Mamane <lionel@mamane.lu>
Diffstat (limited to 'svtools')
-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 80e0b320f0c9..ba4431ab06c5 100644
--- a/svtools/source/control/headbar.cxx
+++ b/svtools/source/control/headbar.cxx
@@ -1303,8 +1303,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);
}
}
}