Kaydet (Commit) 43e24154 authored tarafından Caolán McNamara's avatar Caolán McNamara

Resolves: tdf#101004 crash on using slide master design from master view

started asserting since...

commit f7ed8b99
Author: Caolán McNamara <caolanm@redhat.com>
Date:   Tue Jun 23 16:54:52 2015 +0100

    allow slide design to affect multiple standard pages

but looks broken well before that

Change-Id: I03988696e7a25e4f8c932f55bcd1879994ac1005
üst 264f3830
......@@ -136,12 +136,6 @@ void FuPresentationLayout::DoExecute( SfxRequest& rReq )
}
}
assert(!aSelectedPages.empty() && "no selected page");
OUString aOldLayoutName(aSelectedPages.back()->GetLayoutName());
sal_Int32 nPos = aOldLayoutName.indexOf(SD_LT_SEPARATOR);
if (nPos != -1)
aOldLayoutName = aOldLayoutName.copy(0, nPos);
bool bMasterPage = bOnMaster;
bool bCheckMasters = false;
......@@ -154,7 +148,15 @@ void FuPresentationLayout::DoExecute( SfxRequest& rReq )
aSet.Put( SfxBoolItem( ATTR_PRESLAYOUT_LOAD, bLoad));
aSet.Put( SfxBoolItem( ATTR_PRESLAYOUT_MASTER_PAGE, bMasterPage ) );
aSet.Put( SfxBoolItem( ATTR_PRESLAYOUT_CHECK_MASTERS, bCheckMasters ) );
aSet.Put( SfxStringItem( ATTR_PRESLAYOUT_NAME, aOldLayoutName));
if (!aSelectedPages.empty())
{
OUString aOldLayoutName(aSelectedPages.back()->GetLayoutName());
sal_Int32 nPos = aOldLayoutName.indexOf(SD_LT_SEPARATOR);
if (nPos != -1)
aOldLayoutName = aOldLayoutName.copy(0, nPos);
aSet.Put(SfxStringItem(ATTR_PRESLAYOUT_NAME, aOldLayoutName));
}
const SfxItemSet *pArgs = rReq.GetArgs ();
......@@ -237,7 +239,7 @@ void FuPresentationLayout::DoExecute( SfxRequest& rReq )
static_cast<DrawView*>(mpView)->BlockPageOrderChangedHint(false);
// if the master page was visible, show it again
if (!bError)
if (!bError && !aSelectedPages.empty())
{
if (bOnMaster)
{
......
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