From 10d8c87d7bc49e57d9b85a9d14afd5dc4d4abaad Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Thu, 28 Jul 2011 09:11:29 +0100 Subject: use DrawUndoGuard to turn off undo for draw layer for duration of its scope --- sw/source/core/doc/doclay.cxx | 10 +++++----- 1 file 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 { -- cgit v1.2.3