summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-07-06 10:10:27 +0100
committerCaolán McNamara <caolanm@redhat.com>2016-07-06 10:44:40 +0100
commitde4908eb4d2f1f2ce38a37eea18a9efc4a0073b1 (patch)
tree9ebdb938702da6ec7ce421f26cb9d0cf51936b00 /sd
parent50ba4a079ec6dbf00277bcfbbf15dc2f10d8cdcf (diff)
Resolves: rhbz#1353069 don't clear XATTR_FILL* from stylesheet if...
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 b876bbe2cacce8af379b10d82da6c7e7d229b361 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: I91fb8f622a0e35741ecc37cef14fc93199bb730b
Diffstat (limited to 'sd')
-rw-r--r--sd/source/core/drawdoc3.cxx13
1 files changed, 11 insertions, 2 deletions
diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx
index cf01895789ae..d857b380e238 100644
--- a/sd/source/core/drawdoc3.cxx
+++ b/sd/source/core/drawdoc3.cxx
@@ -792,8 +792,17 @@ bool SdDrawDocument::InsertBookmarkAsPage(
aTest == aMPLayout &&
eKind == pTest->GetPageKind() )
{
- if( bUndo )
- AddUndo(GetSdrUndoFactory().CreateUndoDeletePage(*pRefPage));
+ 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));
+ }
RemoveMasterPage(nPage);