sd/source/ui/view/ViewClipboard.cxx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
New commits: commit 574bac673366bc317e8ef10f288945d8dd5c2050 Author: Caolán McNamara <[email protected]> Date: Fri Nov 10 16:16:01 2017 +0000 Resolves: tdf#113405 don't try and assign a master page to a master page when in master view mode go straight to adding the master page to the list of masters Change-Id: I345ce30b44099cd546267fb2acae0b1cc8a73dbe Reviewed-on: https://gerrit.libreoffice.org/44606 Tested-by: Jenkins <[email protected]> Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Caolán McNamara <[email protected]> diff --git a/sd/source/ui/view/ViewClipboard.cxx b/sd/source/ui/view/ViewClipboard.cxx index cb28d4b1a974..38b1a9ebea47 100644 --- a/sd/source/ui/view/ViewClipboard.cxx +++ b/sd/source/ui/view/ViewClipboard.cxx @@ -20,6 +20,7 @@ #include <ViewClipboard.hxx> #include <DrawDocShell.hxx> +#include <DrawViewShell.hxx> #include <View.hxx> #include <ViewShell.hxx> #include <Window.hxx> @@ -49,8 +50,11 @@ void ViewClipboard::HandlePageDrop (const SdTransferable& rTransferable) { // Determine whether to insert the given set of slides or to assign a // given master page. - SdPage* pMasterPage = GetFirstMasterPage (rTransferable); - if (pMasterPage != nullptr) + // tdf#113405 only assign master pages to normal pages, don't attempt to assign a master + // page to a master page + sd::DrawViewShell* pDrawViewShell = dynamic_cast<::sd::DrawViewShell*>(mrView.GetViewShell()); + SdPage* pMasterPage = (pDrawViewShell && pDrawViewShell->GetEditMode() == EditMode::Page) ? GetFirstMasterPage(rTransferable) : nullptr; + if (pMasterPage) AssignMasterPage (rTransferable, pMasterPage); else InsertSlides (rTransferable, DetermineInsertPosition (rTransferable));
_______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
