sd/source/ui/view/drviews2.cxx |    7 +++++++
 1 file changed, 7 insertions(+)

New commits:
commit 494cee664a3b3dc64dc83e1c29b17097d184a2d7
Author:     Pranam Lashkari <lpra...@collabora.com>
AuthorDate: Tue Oct 6 18:53:34 2020 +0530
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Tue Oct 13 22:53:15 2020 +0200

    fixed crashing on duplicating slide if slide pan is not visible
    
    Change-Id: I30cdc8365d0a31b408dc4eb18b195703837c838a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104027
    Tested-by: Andras Timar <andras.ti...@collabora.com>
    Reviewed-by: Andras Timar <andras.ti...@collabora.com>

diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index ad6802318591..85587bbde585 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -770,10 +770,17 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
 
         case SID_DUPLICATE_PAGE:
         {
+            auto slideSorter = 
sd::slidesorter::SlideSorterViewShell::GetSlideSorter(GetViewShellBase());
+            SdPage* pNewPage = nullptr;
+            if(slideSorter)
             DuplicateSelectedSlides(rReq);
+            else
+                pNewPage = CreateOrDuplicatePage (rReq, mePageKind, 
GetActualPage());
             Cancel();
             if(HasCurrentFunction(SID_BEZIER_EDIT) )
                 GetViewFrame()->GetDispatcher()->Execute(SID_OBJECT_SELECT, 
SfxCallMode::ASYNCHRON);
+            if(!slideSorter && pNewPage != nullptr)
+                SwitchPage((pNewPage->GetPageNum()-1)/2);
             rReq.Done();
         }
         break;
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to