diff options
author | Pranam Lashkari <lpranam@collabora.com> | 2020-10-06 18:53:34 +0530 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2020-10-13 22:53:15 +0200 |
commit | 494cee664a3b3dc64dc83e1c29b17097d184a2d7 (patch) | |
tree | bfc8b23e98620e59cf7482fe8704d33ab7728075 /sd | |
parent | f43a202ec1d9ed37cc894c31ff3f2ad4c5a1d2ad (diff) |
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.timar@collabora.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/view/drviews2.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
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; |