diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-09-30 12:45:03 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-10-03 15:46:28 +0100 |
commit | 1c1d9867b0f789b21730faf76c02d2f86fcee43c (patch) | |
tree | c306acc5a2bf74ae7a8a9c87c5159be23930b5f5 /sd/source | |
parent | Update min OS version to a more realistic value for iOS (diff) | |
download | core-1c1d9867b0f789b21730faf76c02d2f86fcee43c.tar.gz core-1c1d9867b0f789b21730faf76c02d2f86fcee43c.zip |
Resolves: tdf#101711 problems with attempt to remove unused bg images
only do the save, unset (and possibly restore) of a bg image on the
stylesheet if it has one owner, this continue to make the original
scenario function without (so far anyway) the various reported problems
Change-Id: I73382961973b1c53bf2ceff205615727dd378c77
Diffstat (limited to 'sd/source')
-rw-r--r-- | sd/source/core/drawdoc3.cxx | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx index 65905c697c96..4d1d1b3173bc 100644 --- a/sd/source/core/drawdoc3.cxx +++ b/sd/source/core/drawdoc3.cxx @@ -796,17 +796,8 @@ bool SdDrawDocument::InsertBookmarkAsPage( aTest == aMPLayout && eKind == pTest->GetPageKind() ) { - if (bUndo) - { - bool bSoleOwnerOfStyleSheet = true; - if (pRefPage->IsMasterPage()) - { - const SfxStyleSheet* pRefSheet = pRefPage->getSdrPageProperties().GetStyleSheet(); - const SfxStyleSheet* pTestSheet = pTest->getSdrPageProperties().GetStyleSheet(); - bSoleOwnerOfStyleSheet = pRefSheet != pTestSheet; - } - AddUndo(GetSdrUndoFactory().CreateUndoDeletePage(*pRefPage, bSoleOwnerOfStyleSheet)); - } + if( bUndo ) + AddUndo(GetSdrUndoFactory().CreateUndoDeletePage(*pRefPage)); RemoveMasterPage(nPage); @@ -1243,7 +1234,6 @@ 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 ) @@ -1258,10 +1248,6 @@ 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; } } } @@ -1295,7 +1281,7 @@ void SdDrawDocument::RemoveUnnecessaryMasterPages(SdPage* pMasterPage, bool bOnl delete pNotesMaster; if( bUndo ) - AddUndo(GetSdrUndoFactory().CreateUndoDeletePage(*pMaster, bSoleOwnerOfStyleSheet)); + AddUndo(GetSdrUndoFactory().CreateUndoDeletePage(*pMaster)); RemoveMasterPage( pMaster->GetPageNum() ); |