diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2005-02-24 14:12:45 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2005-02-24 14:12:45 +0000 |
commit | e5979a0584bb5b83dfe26119dc97e35d65e99ad2 (patch) | |
tree | a152f5827c1e12bcb7d7447d67a690de8ad8e70b /sd/source/ui/toolpanel/controls/MasterPagesSelector.cxx | |
parent | b9fa5dbdc574cc3a3128d8047cf43d93d76658b0 (diff) |
INTEGRATION: CWS impress34 (1.6.2); FILE MERGED
2005/02/09 17:48:34 cl 1.6.2.2: #i42042# create undo actions for new masterpages
2005/02/09 13:53:13 cl 1.6.2.1: #i42040# Add surrounding undo action for assigning master pages to more than one slide
Diffstat (limited to 'sd/source/ui/toolpanel/controls/MasterPagesSelector.cxx')
-rw-r--r-- | sd/source/ui/toolpanel/controls/MasterPagesSelector.cxx | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/sd/source/ui/toolpanel/controls/MasterPagesSelector.cxx b/sd/source/ui/toolpanel/controls/MasterPagesSelector.cxx index 38644fd339b7..eff4c8471b9a 100644 --- a/sd/source/ui/toolpanel/controls/MasterPagesSelector.cxx +++ b/sd/source/ui/toolpanel/controls/MasterPagesSelector.cxx @@ -2,9 +2,9 @@ * * $RCSfile: MasterPagesSelector.cxx,v $ * - * $Revision: 1.7 $ + * $Revision: 1.8 $ * - * last change: $Author: vg $ $Date: 2005-02-16 17:00:11 $ + * last change: $Author: vg $ $Date: 2005-02-24 15:12:45 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -58,7 +58,6 @@ * * ************************************************************************/ - #include "MasterPagesSelector.hxx" #include "MasterPageContainer.hxx" @@ -422,6 +421,10 @@ void MasterPagesSelector::AssignMasterPageToPageList ( if (aCleanedList.size() == 0) break; + SfxUndoManager* pUndoMgr = mrDocument.GetDocSh()->GetUndoManager(); + if( pUndoMgr ) + pUndoMgr->EnterListAction(String(SdResId(STR_UNDO_SET_PRESLAYOUT)), String()); + SdPage* pMasterPageInDocument = ProvideMasterPage(pMasterPage,rPageList); if (pMasterPageInDocument == NULL) break; @@ -436,6 +439,9 @@ void MasterPagesSelector::AssignMasterPageToPageList ( sBaseLayoutName, *iPage); } + + if( pUndoMgr ) + pUndoMgr->LeaveListAction(); } while (false); } @@ -469,11 +475,18 @@ SdPage* MasterPagesSelector::ProvideMasterPage ( } if (pMasterPage->GetModel() != &mrDocument) + { pMasterPageInDocument = AddMasterPage (&mrDocument, pMasterPage, nInsertionIndex); + mrDocument.AddUndo(new SdrUndoNewPage(*pClonedMasterPage)); + } else pMasterPageInDocument = pMasterPage; if (pNotesMasterPage->GetModel() != &mrDocument) - AddMasterPage (&mrDocument, pNotesMasterPage, nInsertionIndex+1); + { + SdPage* pClonedNotesMasterPage + = AddMasterPage (&mrDocument, pNotesMasterPage, nInsertionIndex+1); + mrDocument.AddUndo(new SdrUndoNewPage(*pClonedNotesMasterPage)); + } } return pMasterPageInDocument; } |