[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - vcl/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Tue Feb 25 17:21:04 UTC 2020
vcl/source/app/salvtables.cxx | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
New commits:
commit 94c9d1e61702e64c03b2261ce1359bf3e459b75a
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Feb 25 11:45:41 2020 +0000
Commit: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
CommitDate: Tue Feb 25 18:20:35 2020 +0100
tdf#130915 SvTreeList::Move needs to move from lower index to higher
the reverse doesn't work
Change-Id: I0d84e6e44b26c0c4f1f0d221de3fad03c183f6ff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89434
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 48f960f851c0..6b092f4d89cd 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -3659,9 +3659,11 @@ public:
virtual void swap(int pos1, int pos2) override
{
+ int min = std::min(pos1, pos2);
+ int max = std::max(pos1, pos2);
SvTreeList* pModel = m_xTreeView->GetModel();
- SvTreeListEntry* pEntry1 = pModel->GetEntry(nullptr, pos1);
- SvTreeListEntry* pEntry2 = pModel->GetEntry(nullptr, pos2);
+ SvTreeListEntry* pEntry1 = pModel->GetEntry(nullptr, min);
+ SvTreeListEntry* pEntry2 = pModel->GetEntry(nullptr, max);
pModel->Move(pEntry1, pEntry2);
}
More information about the Libreoffice-commits
mailing list