[Libreoffice-commits] core.git: 2 commits - sd/source sfx2/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Thu Apr 8 07:33:02 UTC 2021


 sd/source/ui/view/drviews4.cxx         |   11 +++++++++--
 sfx2/source/appl/openuriexternally.cxx |    1 -
 sfx2/source/sidebar/DeckLayouter.cxx   |    2 --
 3 files changed, 9 insertions(+), 5 deletions(-)

New commits:
commit d9e0d49434c216d8f24a7f8e696286298d96b568
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Apr 7 21:02:30 2021 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu Apr 8 09:32:32 2021 +0200

    drop some unneeded includes
    
    Change-Id: I4357b70a6affa763b844034bb8f33f101bfa9287
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113774
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sfx2/source/appl/openuriexternally.cxx b/sfx2/source/appl/openuriexternally.cxx
index f8c5eda0c500..8ef0ed2ea5ba 100644
--- a/sfx2/source/appl/openuriexternally.cxx
+++ b/sfx2/source/appl/openuriexternally.cxx
@@ -20,7 +20,6 @@
 #include <sfx2/app.hxx>
 #include <sfx2/sfxresid.hxx>
 #include <vcl/svapp.hxx>
-#include <vcl/window.hxx>
 #include <vcl/weld.hxx>
 #include <openuriexternally.hxx>
 #include <comphelper/lok.hxx>
diff --git a/sfx2/source/sidebar/DeckLayouter.cxx b/sfx2/source/sidebar/DeckLayouter.cxx
index aea8b9b651ee..c60549e5d65e 100644
--- a/sfx2/source/sidebar/DeckLayouter.cxx
+++ b/sfx2/source/sidebar/DeckLayouter.cxx
@@ -28,8 +28,6 @@
 #include <comphelper/lok.hxx>
 
 #include <comphelper/processfactory.hxx>
-#include <vcl/window.hxx>
-#include <vcl/scrbar.hxx>
 
 #include <com/sun/star/uno/Reference.hxx>
 #include <com/sun/star/frame/Desktop.hpp>
commit 722b7a18c04aa69bfa10aaac8d47648912af94db
Author:     Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Mon Mar 22 12:28:36 2021 +0100
Commit:     Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Thu Apr 8 09:32:13 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>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113728
    Tested-by: Jenkins
    Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>

diff --git a/sd/source/ui/view/drviews4.cxx b/sd/source/ui/view/drviews4.cxx
index 2fd177135ecf..c3557b4980d8 100644
--- a/sd/source/ui/view/drviews4.cxx
+++ b/sd/source/ui/view/drviews4.cxx
@@ -59,6 +59,7 @@
 #include <svx/bmpmask.hxx>
 #include <LayerTabBar.hxx>
 
+#include <SlideSorterViewShell.hxx>
 #include <svx/svditer.hxx>
 
 #include <navigatr.hxx>
@@ -88,9 +89,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