diff options
author | Kurt Zenker <kz@openoffice.org> | 2009-06-04 16:21:29 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2009-06-04 16:21:29 +0000 |
commit | ef7c5c7534ecf24b2af1bc0de6e221327b4a4c49 (patch) | |
tree | 91654c3c0af54f00d2246874ee38e7a02e7035b4 /sd/source/ui/func/fuexpand.cxx | |
parent | e8cad7c6d2daf5b2b4ec672dbf740737fba426fd (diff) |
CWS-TOOLING: integrate CWS clnoundo
2009-05-18 09:40:22 +0200 wg r271998 : i102011
2009-04-28 12:20:24 +0200 cl r271318 : CWS-TOOLING: rebase CWS clnoundo to trunk@270723 (milestone: DEV300:m46)
2009-04-02 11:37:14 +0200 cl r270388 : #i100371# check valid positions all the time to avoid crashes during model lock
2009-03-30 13:02:27 +0200 cl r270219 : #i100371# do not create undo actions in drawing layer during load
2009-03-30 12:59:41 +0200 cl r270218 : #i100371# do not create undo actions in drawing layer during load
2009-03-30 12:55:06 +0200 cl r270217 : #i100371# do not create undo actions in drawing layer during load
2009-03-30 12:53:27 +0200 cl r270216 : #i100371# do not create undo actions in drawing layer during load
2009-03-30 12:49:28 +0200 cl r270215 : #i100371# added EnableUndo() and IsUndoEnabled()
Diffstat (limited to 'sd/source/ui/func/fuexpand.cxx')
-rw-r--r-- | sd/source/ui/func/fuexpand.cxx | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/sd/source/ui/func/fuexpand.cxx b/sd/source/ui/func/fuexpand.cxx index cc8d582aea91..d71456a7409a 100644 --- a/sd/source/ui/func/fuexpand.cxx +++ b/sd/source/ui/func/fuexpand.cxx @@ -122,7 +122,10 @@ void FuExpandPage::DoExecute( SfxRequest& ) if (pActualOutline) { - mpView->BegUndo(String(SdResId(STR_UNDO_EXPAND_PAGE))); + const bool bUndo = mpView->IsUndoEnabled(); + + if( bUndo ) + mpView->BegUndo(String(SdResId(STR_UNDO_EXPAND_PAGE))); // Aktuelles Gliederungsobjekt in Outliner setzen OutlinerParaObject* pParaObj = pActualOutline->GetOutlinerParaObject(); @@ -159,7 +162,9 @@ void FuExpandPage::DoExecute( SfxRequest& ) // Seite hinter aktueller Seite einfuegen mpDoc->InsertPage(pPage, nActualPageNum + nPos); nPos++; - mpView->AddUndo(mpDoc->GetSdrUndoFactory().CreateUndoNewPage(*pPage)); + + if( bUndo ) + mpView->AddUndo(mpDoc->GetSdrUndoFactory().CreateUndoNewPage(*pPage)); // MasterPage der aktuellen Seite verwenden pPage->TRG_SetMasterPage(pActualPage->TRG_GetMasterPage()); @@ -180,7 +185,9 @@ void FuExpandPage::DoExecute( SfxRequest& ) // Seite hinter aktueller Seite einfuegen mpDoc->InsertPage(pNotesPage, nActualPageNum + nPos); nPos++; - mpView->AddUndo(mpDoc->GetSdrUndoFactory().CreateUndoNewPage(*pNotesPage)); + + if( bUndo ) + mpView->AddUndo(mpDoc->GetSdrUndoFactory().CreateUndoNewPage(*pNotesPage)); // MasterPage der aktuellen Seite verwenden pNotesPage->TRG_SetMasterPage(pActualNotesPage->TRG_GetMasterPage()); @@ -258,7 +265,8 @@ void FuExpandPage::DoExecute( SfxRequest& ) pPara = pOutl->GetParagraph( ++nParaPos ); } - mpView->EndUndo(); + if( bUndo ) + mpView->EndUndo(); } delete pOutl; |