[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - sd/source
Szymon KÅos (via logerrit)
logerrit at kemper.freedesktop.org
Mon Mar 29 10:31:00 UTC 2021
sd/source/ui/view/drviews4.cxx | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
New commits:
commit d633ee6bdf464de839f3bcea876f46f4b4e1e594
Author: Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Mon Mar 22 12:28:36 2021 +0100
Commit: Jan Holesovsky <kendy at collabora.com>
CommitDate: Mon Mar 29 12:30:29 2021 +0200
impress: delete correct page when has multiple users
When multiple users are editing the presentation
few pages could be selected. Then the first selected
page was removed instead of currently selected by user
who executed the delete action. SlideSorterViewShell
has better knowledge about selected slides by current view.
Change-Id: Icb3157c8426027a7edc225249f8dd99270e9b2da
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112883
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Jan Holesovsky <kendy at collabora.com>
diff --git a/sd/source/ui/view/drviews4.cxx b/sd/source/ui/view/drviews4.cxx
index be16871f630f..d6952d79685f 100644
--- a/sd/source/ui/view/drviews4.cxx
+++ b/sd/source/ui/view/drviews4.cxx
@@ -58,6 +58,7 @@
#include <svx/bmpmask.hxx>
#include <LayerTabBar.hxx>
+#include <SlideSorterViewShell.hxx>
#include <svx/svditer.hxx>
#include <navigatr.hxx>
@@ -87,9 +88,15 @@ void DrawViewShell::DeleteActualPage()
for (sal_uInt16 i = 0; i < nPageCount; i++)
{
pPage = GetDoc()->GetSdPage(i, mePageKind);
- if(pPage->IsSelected())
+ sal_uInt16 nPageIndex = maTabControl->GetPagePos(pPage->getPageId());
+
+ slidesorter::SlideSorterViewShell* pVShell
+ = slidesorter::SlideSorterViewShell::GetSlideSorter(GetViewShellBase());
+ bool bUseSlideSorter = pVShell != nullptr;
+
+ if((bUseSlideSorter && IsSelected(nPageIndex)) || (!bUseSlideSorter && pPage->IsSelected()))
{
- Reference< XDrawPage > xPage( xPages->getByIndex( maTabControl->GetPagePos(pPage->getPageId()) ), UNO_QUERY_THROW );
+ Reference< XDrawPage > xPage( xPages->getByIndex( nPageIndex ), UNO_QUERY_THROW );
pagesToDelete.push_back(xPage);
}
}
More information about the Libreoffice-commits
mailing list