summaryrefslogtreecommitdiff
path: root/sd/source/ui/toolpanel/controls/MasterPagesSelector.cxx
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2005-09-23 10:32:24 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2005-09-23 10:32:24 +0000
commit491cc8bfc36150d9956c9f6add984d3f0821b714 (patch)
treed6989ac9829d5acfedd5732de5c5f9ae9d81e859 /sd/source/ui/toolpanel/controls/MasterPagesSelector.cxx
parent8461981855ff1006d20d28f29fbcd4e3da5094e0 (diff)
INTEGRATION: CWS impress57 (1.10.100); FILE MERGED
2005/07/20 08:33:17 af 1.10.100.2: RESYNC: (1.10-1.11); FILE MERGED 2005/06/07 16:08:41 af 1.10.100.1: #i44823# Remove background object before assigning a master page.
Diffstat (limited to 'sd/source/ui/toolpanel/controls/MasterPagesSelector.cxx')
-rw-r--r--sd/source/ui/toolpanel/controls/MasterPagesSelector.cxx14
1 files changed, 11 insertions, 3 deletions
diff --git a/sd/source/ui/toolpanel/controls/MasterPagesSelector.cxx b/sd/source/ui/toolpanel/controls/MasterPagesSelector.cxx
index 1001e67b1dac..5a7c2cef54f5 100644
--- a/sd/source/ui/toolpanel/controls/MasterPagesSelector.cxx
+++ b/sd/source/ui/toolpanel/controls/MasterPagesSelector.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: MasterPagesSelector.cxx,v $
*
- * $Revision: 1.12 $
+ * $Revision: 1.13 $
*
- * last change: $Author: rt $ $Date: 2005-09-09 06:41:10 $
+ * last change: $Author: hr $ $Date: 2005-09-23 11:32:24 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -100,6 +100,7 @@
#ifndef _SFXITEMPOOL_HXX //autogen
#include <svtools/itempool.hxx>
#endif
+#include "undoback.hxx"
using namespace ::sd::toolpanel::controls;
#define MasterPagesSelector
@@ -525,7 +526,14 @@ void MasterPagesSelector::AssignMasterPageToPage (
if ( ! pPage->IsMasterPage())
{
- // 1. Assign master pages to regular slide.
+ // 1. Remove the background object (so that that, if it exists, does
+ // not override the new master page) and assign the master page to
+ // the regular slide.
+ mrDocument.GetDocSh()->GetUndoManager()->AddUndoAction(
+ new SdBackgroundObjUndoAction(mrDocument, *pPage, pPage->GetBackgroundObj()),
+ TRUE);
+ pPage->SetBackgroundObj(NULL);
+
mrDocument.SetMasterPage (
(pPage->GetPageNum()-1)/2,
rsBaseLayoutName,