Kaydet (Commit) 914d72ee authored tarafından Caolán McNamara's avatar Caolán McNamara

Related: rhbz#1353069 don't clear XATTR_FILL* from stylesheet if...

This is similar to de4908eb where

the master page is not the sole owner. Which happens when copying
and pasting slides which bring along a duplicate master page to
an already existing one, and the attempt to remove the duplicate
strips the fill properties from the shared stylesheet in use by
the other

regression from...

commit b876bbe2
Author: David Tardon <dtardon@redhat.com>
Date:   Tue Apr 26 09:17:11 2016 +0200

    rbhz#1326602 avoid exp. bg bitmaps from deleted slides

Change-Id: I0a3a34ade2ad8464b1edb67a6e28dab45c761a2c
üst e58324aa
......@@ -1243,6 +1243,7 @@ void SdDrawDocument::RemoveUnnecessaryMasterPages(SdPage* pMasterPage, bool bOnl
{
// Do not delete master pages that have their precious flag set
bool bDeleteMaster = !pMaster->IsPrecious();
bool bSoleOwnerOfStyleSheet = true;
OUString aLayoutName = pMaster->GetLayoutName();
if(bOnlyDuplicatePages )
......@@ -1257,6 +1258,10 @@ void SdDrawDocument::RemoveUnnecessaryMasterPages(SdPage* pMasterPage, bool bOnl
{
// duplicate page found -> remove it
bDeleteMaster = true;
const SfxStyleSheet* pRefSheet = pMaster->getSdrPageProperties().GetStyleSheet();
const SfxStyleSheet* pTestSheet = pMPg->getSdrPageProperties().GetStyleSheet();
bSoleOwnerOfStyleSheet = pRefSheet != pTestSheet;
}
}
}
......@@ -1290,7 +1295,7 @@ void SdDrawDocument::RemoveUnnecessaryMasterPages(SdPage* pMasterPage, bool bOnl
delete pNotesMaster;
if( bUndo )
AddUndo(GetSdrUndoFactory().CreateUndoDeletePage(*pMaster));
AddUndo(GetSdrUndoFactory().CreateUndoDeletePage(*pMaster, bSoleOwnerOfStyleSheet));
RemoveMasterPage( pMaster->GetPageNum() );
......
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