[Libreoffice-commits] .: sw/source
Caolán McNamara
caolan at kemper.freedesktop.org
Thu Jul 28 01:37:21 PDT 2011
sw/source/core/doc/doclay.cxx | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
New commits:
commit 10d8c87d7bc49e57d9b85a9d14afd5dc4d4abaad
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Jul 28 09:11:29 2011 +0100
use DrawUndoGuard to turn off undo for draw layer for duration of its scope
diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx
index c4d348a..830839e 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
{
More information about the Libreoffice-commits
mailing list