diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-07-28 09:11:29 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-07-28 09:11:29 +0100 |
commit | 715c486c10e670adf998983ce7cf65ab14e18819 (patch) | |
tree | 175575cb0a155ec92dbd28d1d3b27a8c253ff002 /sw | |
parent | d541c21e72dcd1154562145d189067983f40dc35 (diff) |
use DrawUndoGuard to turn off undo for draw layer for duration of its scope
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/doc/doclay.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx index 4d6690888aff..edcf01a53524 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 { |