summaryrefslogtreecommitdiff
path: root/sw/source/core/doc/docdesc.cxx
diff options
context:
space:
mode:
authorMichael Stahl <mst@openoffice.org>2010-12-15 09:14:05 +0100
committerMichael Stahl <mst@openoffice.org>2010-12-15 09:14:05 +0100
commit8fc6a5fc179b85e35f7e8af0e150241ce5b9371b (patch)
tree8556a62585e48c5cb3b25b7aa602f6d862445bfd /sw/source/core/doc/docdesc.cxx
parent6fb613830f69e1ab22d5b030ae42654a27ce8dbe (diff)
undoapi: #i114888#: move sw::UndoGuards:
in order to ensure that AppendUndo() is only called when Undo is enabled, move some UndoGuards a couple lines downward.
Diffstat (limited to 'sw/source/core/doc/docdesc.cxx')
-rw-r--r--sw/source/core/doc/docdesc.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/core/doc/docdesc.cxx b/sw/source/core/doc/docdesc.cxx
index 79a9df76d327..f88b17202913 100644
--- a/sw/source/core/doc/docdesc.cxx
+++ b/sw/source/core/doc/docdesc.cxx
@@ -201,12 +201,12 @@ void SwDoc::ChgPageDesc( USHORT i, const SwPageDesc &rChged )
SwPageDesc *pDesc = aPageDescs[i];
- ::sw::UndoGuard const undoGuard(GetIDocumentUndoRedo());
- if (undoGuard.UndoWasEnabled())
+ if (GetIDocumentUndoRedo().DoesUndo())
{
SwUndo *const pUndo(new SwUndoPageDesc(*pDesc, rChged, this));
GetIDocumentUndoRedo().AppendUndo(pUndo);
}
+ ::sw::UndoGuard const undoGuard(GetIDocumentUndoRedo());
//Als erstes wird ggf. gespiegelt.
if ( rChged.GetUseOn() == nsUseOnPage::PD_MIRROR )