Kaydet (Commit) 574bac67 authored tarafından Caolán McNamara's avatar Caolán McNamara

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/44606Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 8a5a9e05
......@@ -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));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment