summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorArmin Weiss <aw@openoffice.org>2001-11-13 17:10:33 +0000
committerArmin Weiss <aw@openoffice.org>2001-11-13 17:10:33 +0000
commit7a01a1d1a07cbef23991ebe3ae2234439182fdfe (patch)
tree4a5710d540c8310a270628dc63b6d0615ebde2e8 /sd
parenta2b9206e0475b768ba773b08a936bfab4fdfe5a5 (diff)
#94637# when UndoStack is cleared by ModifyPageUndoAction the nCount may have changed, so test GetUndoActionCount()
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/view/drviewse.cxx12
1 files changed, 8 insertions, 4 deletions
diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx
index 5740410bf7a1..8796a417ea37 100644
--- a/sd/source/ui/view/drviewse.cxx
+++ b/sd/source/ui/view/drviewse.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: drviewse.cxx,v $
*
- * $Revision: 1.22 $
+ * $Revision: 1.23 $
*
- * last change: $Author: aw $ $Date: 2001-08-17 10:28:02 $
+ * last change: $Author: aw $ $Date: 2001-11-13 18:10:33 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -1472,7 +1472,9 @@ void SdDrawViewShell::FuSupport(SfxRequest& rReq)
sal_uInt16 nCount(pUndoManager->GetUndoActionCount());
if(nCount >= nNumber)
{
- while(nNumber--)
+ // #94637# when UndoStack is cleared by ModifyPageUndoAction
+ // the nCount may have changed, so test GetUndoActionCount()
+ while(nNumber-- && pUndoManager->GetUndoActionCount())
{
pUndoManager->Undo();
}
@@ -1506,7 +1508,9 @@ void SdDrawViewShell::FuSupport(SfxRequest& rReq)
sal_uInt16 nCount(pUndoManager->GetRedoActionCount());
if(nCount >= nNumber)
{
- while(nNumber--)
+ // #94637# when UndoStack is cleared by ModifyPageRedoAction
+ // the nCount may have changed, so test GetRedoActionCount()
+ while(nNumber-- && pUndoManager->GetRedoActionCount())
{
pUndoManager->Redo();
}