summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-07-28 09:11:29 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-07-28 09:11:29 +0100
commit10d8c87d7bc49e57d9b85a9d14afd5dc4d4abaad (patch)
treea691d17c17fdf65971f18322405e279f58a83343
parent49707cf4fb3993b13f9fe001a5f19e33fb8155e5 (diff)
use DrawUndoGuard to turn off undo for draw layer for duration of its scope
-rw-r--r--sw/source/core/doc/doclay.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx
index c4d348aa0b..830839e920 100644
--- a/sw/source/core/doc/doclay.cxx
+++ b/sw/source/core/doc/doclay.cxx
@@ -473,12 +473,12 @@ SwFrmFmt *SwDoc::CopyLayoutFmt( const SwFrmFmt& rSource,
// sorge dafuer das auch Fly's in Fly's kopiert werden
aIdx = *pSttNd->EndOfSectionNode();
- bool bDrawingLayerUndoState = GetIDocumentUndoRedo().DoesDrawUndo();
- //fdo#36631 disable any undo operations associated with the contact
- //object itself. They should be managed by SwUndoInsLayFmt.
- GetIDocumentUndoRedo().DoDrawUndo(false);
+
+ //fdo#36631 disable (scoped) any undo operations associated with the
+ //contact object itself. They should be managed by SwUndoInsLayFmt.
+ const ::sw::DrawUndoGuard drawUndoGuard(GetIDocumentUndoRedo());
+
pSrcDoc->CopyWithFlyInFly( aRg, 0, aIdx, sal_False, sal_True, sal_True );
- GetIDocumentUndoRedo().DoDrawUndo(bDrawingLayerUndoState);
}
else
{