diff options
-rw-r--r-- | sw/source/core/undo/SwUndoField.cxx | 3 | ||||
-rw-r--r-- | sw/source/core/undo/SwUndoFmt.cxx | 15 | ||||
-rw-r--r-- | sw/source/core/undo/SwUndoPageDesc.cxx | 13 | ||||
-rw-r--r-- | sw/source/core/undo/docundo.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/undo/unattr.cxx | 3 | ||||
-rw-r--r-- | sw/source/core/undo/undel.cxx | 1 | ||||
-rw-r--r-- | sw/source/core/undo/unins.cxx | 1 | ||||
-rw-r--r-- | sw/source/core/undo/unmove.cxx | 1 | ||||
-rw-r--r-- | sw/source/core/undo/unnum.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/undo/unovwr.cxx | 1 | ||||
-rw-r--r-- | sw/source/core/undo/untblk.cxx | 1 |
11 files changed, 7 insertions, 40 deletions
diff --git a/sw/source/core/undo/SwUndoField.cxx b/sw/source/core/undo/SwUndoField.cxx index 248ca9898f8c..578e6edf144e 100644 --- a/sw/source/core/undo/SwUndoField.cxx +++ b/sw/source/core/undo/SwUndoField.cxx @@ -93,7 +93,6 @@ void SwUndoFieldFromDoc::Undo( SwUndoIter& ) if (pField) { - ::sw::UndoGuard const undoGuard(pDoc->GetIDocumentUndoRedo()); pDoc->UpdateFld(pTxtFld, *pOldField, pHnt, bUpdate); } } @@ -105,7 +104,6 @@ void SwUndoFieldFromDoc::Redo( SwUndoIter& ) if (pField) { - ::sw::UndoGuard const undoGuard(pDoc->GetIDocumentUndoRedo()); pDoc->UpdateFld(pTxtFld, *pNewField, pHnt, bUpdate); SwFmtFld* pDstFmtFld = (SwFmtFld*)&pTxtFld->GetFld(); @@ -116,6 +114,7 @@ void SwUndoFieldFromDoc::Redo( SwUndoIter& ) void SwUndoFieldFromDoc::Repeat(SwUndoIter & rIt) { + ::sw::UndoGuard const undoGuard(pDoc->GetIDocumentUndoRedo()); Redo(rIt); } diff --git a/sw/source/core/undo/SwUndoFmt.cxx b/sw/source/core/undo/SwUndoFmt.cxx index 9efc5830e6aa..00518539a8ae 100644 --- a/sw/source/core/undo/SwUndoFmt.cxx +++ b/sw/source/core/undo/SwUndoFmt.cxx @@ -72,7 +72,6 @@ void SwUndoFmtCreate::Undo(SwUndoIter &) nId = pNew->GetPoolFmtId() & COLL_GET_RANGE_BITS; bAuto = pNew->IsAuto(); - ::sw::UndoGuard const undoGuard(pDoc->GetIDocumentUndoRedo()); Delete(); } } @@ -80,8 +79,6 @@ void SwUndoFmtCreate::Undo(SwUndoIter &) void SwUndoFmtCreate::Redo(SwUndoIter &) { - ::sw::UndoGuard const undoGuard(pDoc->GetIDocumentUndoRedo()); - SwFmt * pDerivedFrom = Find(sDerivedFrom); SwFmt * pFmt = Create(pDerivedFrom); @@ -128,8 +125,6 @@ SwUndoFmtDelete::~SwUndoFmtDelete() void SwUndoFmtDelete::Undo(SwUndoIter &) { - ::sw::UndoGuard const undoGuard(pDoc->GetIDocumentUndoRedo()); - SwFmt * pDerivedFrom = Find(sDerivedFrom); SwFmt * pFmt = Create(pDerivedFrom); @@ -150,7 +145,6 @@ void SwUndoFmtDelete::Redo(SwUndoIter &) if (pOld) { - ::sw::UndoGuard const undoGuard(pDoc->GetIDocumentUndoRedo()); Delete(pOld); } } @@ -184,7 +178,6 @@ void SwUndoRenameFmt::Undo(SwUndoIter &) if (pFmt) { - ::sw::UndoGuard const undoGuard(pDoc->GetIDocumentUndoRedo()); pDoc->RenameFmt(*pFmt, sOldName, TRUE); } } @@ -195,7 +188,6 @@ void SwUndoRenameFmt::Redo(SwUndoIter &) if (pFmt) { - ::sw::UndoGuard const undoGuard(pDoc->GetIDocumentUndoRedo()); pDoc->RenameFmt(*pFmt, sNewName, TRUE); } } @@ -383,8 +375,6 @@ SwUndoNumruleCreate::SwUndoNumruleCreate(const SwNumRule * _pNew, void SwUndoNumruleCreate::Undo(SwUndoIter &) { - ::sw::UndoGuard const undoGuard(pDoc->GetIDocumentUndoRedo()); - if (! bInitialized) { aNew = *pNew; @@ -396,7 +386,6 @@ void SwUndoNumruleCreate::Undo(SwUndoIter &) void SwUndoNumruleCreate::Redo(SwUndoIter &) { - ::sw::UndoGuard const undoGuard(pDoc->GetIDocumentUndoRedo()); pDoc->MakeNumRule(aNew.GetName(), &aNew, TRUE); } @@ -423,13 +412,11 @@ SwUndoNumruleDelete::SwUndoNumruleDelete(const SwNumRule & rRule, void SwUndoNumruleDelete::Undo(SwUndoIter &) { - ::sw::UndoGuard const undoGuard(pDoc->GetIDocumentUndoRedo()); pDoc->MakeNumRule(aOld.GetName(), &aOld, TRUE); } void SwUndoNumruleDelete::Redo(SwUndoIter &) { - ::sw::UndoGuard const undoGuard(pDoc->GetIDocumentUndoRedo()); pDoc->DelNumRule(aOld.GetName(), TRUE); } @@ -452,13 +439,11 @@ SwUndoNumruleRename::SwUndoNumruleRename(const String & _aOldName, void SwUndoNumruleRename::Undo(SwUndoIter &) { - ::sw::UndoGuard const undoGuard(pDoc->GetIDocumentUndoRedo()); pDoc->RenameNumRule(aNewName, aOldName, TRUE); } void SwUndoNumruleRename::Redo(SwUndoIter &) { - ::sw::UndoGuard const undoGuard(pDoc->GetIDocumentUndoRedo()); pDoc->RenameNumRule(aOldName, aNewName, TRUE); } diff --git a/sw/source/core/undo/SwUndoPageDesc.cxx b/sw/source/core/undo/SwUndoPageDesc.cxx index 53ecdb1ec9c2..adada319d516 100644 --- a/sw/source/core/undo/SwUndoPageDesc.cxx +++ b/sw/source/core/undo/SwUndoPageDesc.cxx @@ -328,8 +328,6 @@ void SwUndoPageDesc::ExchangeContentNodes( SwPageDesc& rSource, SwPageDesc &rDes void SwUndoPageDesc::Undo(SwUndoIter &) { - ::sw::UndoGuard const undoGuard(pDoc->GetIDocumentUndoRedo()); - // Move (header/footer)content node responsibility from new page descriptor to old one again. if( bExchange ) ExchangeContentNodes( (SwPageDesc&)aNew, (SwPageDesc&)aOld ); @@ -338,8 +336,6 @@ void SwUndoPageDesc::Undo(SwUndoIter &) void SwUndoPageDesc::Redo(SwUndoIter &) { - ::sw::UndoGuard const undoGuard(pDoc->GetIDocumentUndoRedo()); - // Move (header/footer)content node responsibility from old page descriptor to new one again. if( bExchange ) ExchangeContentNodes( (SwPageDesc&)aOld, (SwPageDesc&)aNew ); @@ -376,8 +372,6 @@ SwUndoPageDescCreate::~SwUndoPageDescCreate() void SwUndoPageDescCreate::Undo(SwUndoIter &) { - ::sw::UndoGuard const undoGuard(pDoc->GetIDocumentUndoRedo()); - // -> #116530# if (pDesc) { @@ -392,14 +386,13 @@ void SwUndoPageDescCreate::Undo(SwUndoIter &) void SwUndoPageDescCreate::Redo(SwUndoIter &) { - ::sw::UndoGuard const undoGuard(pDoc->GetIDocumentUndoRedo()); - SwPageDesc aPageDesc = aNew; pDoc->MakePageDesc(aNew.GetName(), &aPageDesc, FALSE, TRUE); // #116530# } void SwUndoPageDescCreate::Repeat(SwUndoIter & rIt) { + ::sw::UndoGuard const undoGuard(pDoc->GetIDocumentUndoRedo()); Redo(rIt); } @@ -429,20 +422,18 @@ SwUndoPageDescDelete::~SwUndoPageDescDelete() void SwUndoPageDescDelete::Undo(SwUndoIter &) { - ::sw::UndoGuard const undoGuard(pDoc->GetIDocumentUndoRedo()); - SwPageDesc aPageDesc = aOld; pDoc->MakePageDesc(aOld.GetName(), &aPageDesc, FALSE, TRUE); // #116530# } void SwUndoPageDescDelete::Redo(SwUndoIter &) { - ::sw::UndoGuard const undoGuard(pDoc->GetIDocumentUndoRedo()); pDoc->DelPageDesc(aOld.GetName(), TRUE); // #116530# } void SwUndoPageDescDelete::Repeat(SwUndoIter & rIt) { + ::sw::UndoGuard const undoGuard(pDoc->GetIDocumentUndoRedo()); Redo(rIt); } diff --git a/sw/source/core/undo/docundo.cxx b/sw/source/core/undo/docundo.cxx index 2eb24b86f988..81ca7e8ecb73 100644 --- a/sw/source/core/undo/docundo.cxx +++ b/sw/source/core/undo/docundo.cxx @@ -460,6 +460,8 @@ bool UndoManager::Undo( SwUndoIter& rUndoIter ) return false; } + ::sw::UndoGuard const undoGuard(*this); + SwUndo * pUndo = (*m_pUndos)[ --m_nUndoPos ]; RedlineMode_t const eOld = m_rRedlineAccess.GetRedlineMode(); @@ -913,6 +915,8 @@ bool UndoManager::Redo(SwUndoIter & rUndoIter) return false; } + ::sw::UndoGuard const undoGuard(*this); + SwUndo *const pUndo = (*m_pUndos)[ m_nUndoPos++ ]; RedlineMode_t const eOld = m_rRedlineAccess.GetRedlineMode(); diff --git a/sw/source/core/undo/unattr.cxx b/sw/source/core/undo/unattr.cxx index 8806287ec690..1886e40ec4b9 100644 --- a/sw/source/core/undo/unattr.cxx +++ b/sw/source/core/undo/unattr.cxx @@ -1089,7 +1089,6 @@ SwUndoMoveLeftMargin::~SwUndoMoveLeftMargin() void SwUndoMoveLeftMargin::Undo( SwUndoIter& rIter ) { SwDoc* pDoc = &rIter.GetDoc(); - ::sw::UndoGuard const undoGuard(pDoc->GetIDocumentUndoRedo()); // restore old values m_pHistory->TmpRollback( pDoc, 0 ); @@ -1135,8 +1134,6 @@ void SwUndoChangeFootNote::Undo( SwUndoIter& rIter ) SwDoc& rDoc = rIter.GetDoc(); SetPaM( rIter ); - ::sw::UndoGuard const undoGuard(rDoc.GetIDocumentUndoRedo()); - m_pHistory->TmpRollback( &rDoc, 0 ); m_pHistory->SetTmpEnd( m_pHistory->Count() ); diff --git a/sw/source/core/undo/undel.cxx b/sw/source/core/undo/undel.cxx index 61d50767288e..db51feb5d138 100644 --- a/sw/source/core/undo/undel.cxx +++ b/sw/source/core/undo/undel.cxx @@ -646,7 +646,6 @@ void lcl_ReAnchorAtCntntFlyFrames( const SwSpzFrmFmts& rSpzArr, SwPosition &rPos void SwUndoDelete::Undo( SwUndoIter& rUndoIter ) { SwDoc* pDoc = &rUndoIter.GetDoc(); - ::sw::UndoGuard const undoGuard(pDoc->GetIDocumentUndoRedo()); ULONG nCalcStt = nSttNode - nNdDiff; diff --git a/sw/source/core/undo/unins.cxx b/sw/source/core/undo/unins.cxx index 992dff8a096f..215cc8693f7e 100644 --- a/sw/source/core/undo/unins.cxx +++ b/sw/source/core/undo/unins.cxx @@ -734,7 +734,6 @@ void SwUndoReplace::Impl::Undo( SwUndoIter& rIter ) void SwUndoReplace::Impl::Redo( SwUndoIter& rIter ) { SwDoc& rDoc = rIter.GetDoc(); - ::sw::UndoGuard const undoGuard(rDoc.GetIDocumentUndoRedo()); SwPaM& rPam = *rIter.pAktPam; rPam.DeleteMark(); diff --git a/sw/source/core/undo/unmove.cxx b/sw/source/core/undo/unmove.cxx index f257afd7476e..1b155a8e3c7d 100644 --- a/sw/source/core/undo/unmove.cxx +++ b/sw/source/core/undo/unmove.cxx @@ -191,7 +191,6 @@ void SwUndoMove::SetDestRange( const SwNodeIndex& rStt, void SwUndoMove::Undo( SwUndoIter& rUndoIter ) { SwDoc* pDoc = &rUndoIter.GetDoc(); - ::sw::UndoGuard const undoGuard(pDoc->GetIDocumentUndoRedo()); // Block, damit aus diesem gesprungen werden kann do { diff --git a/sw/source/core/undo/unnum.cxx b/sw/source/core/undo/unnum.cxx index 398e4985fa5a..f5947bc702b4 100644 --- a/sw/source/core/undo/unnum.cxx +++ b/sw/source/core/undo/unnum.cxx @@ -94,8 +94,6 @@ void SwUndoInsNum::Undo( SwUndoIter& rUndoIter ) if( nSttNode ) SetPaM( rUndoIter ); - ::sw::UndoGuard const undoGuard(rDoc.GetIDocumentUndoRedo()); - if( pOldNumRule ) rDoc.ChgNumRuleFmts( *pOldNumRule ); @@ -218,8 +216,6 @@ void SwUndoDelNum::Undo( SwUndoIter& rUndoIter ) SwDoc& rDoc = rUndoIter.GetDoc(); SetPaM( rUndoIter ); - ::sw::UndoGuard const undoGuard(rDoc.GetIDocumentUndoRedo()); - pHistory->TmpRollback( &rDoc, 0 ); pHistory->SetTmpEnd( pHistory->Count() ); diff --git a/sw/source/core/undo/unovwr.cxx b/sw/source/core/undo/unovwr.cxx index 60b4f45215f0..b9a3d8a709b6 100644 --- a/sw/source/core/undo/unovwr.cxx +++ b/sw/source/core/undo/unovwr.cxx @@ -385,7 +385,6 @@ SwUndoTransliterate::~SwUndoTransliterate() void SwUndoTransliterate::Undo( SwUndoIter& rUndoIter ) { SwDoc& rDoc = rUndoIter.GetDoc(); - ::sw::UndoGuard const undoGuard(rDoc.GetIDocumentUndoRedo()); // since the changes were added to the vector from the end of the string/node towards // the start, we need to revert them from the start towards the end now to keep the diff --git a/sw/source/core/undo/untblk.cxx b/sw/source/core/undo/untblk.cxx index c6a7338f2391..b984d645dbf7 100644 --- a/sw/source/core/undo/untblk.cxx +++ b/sw/source/core/undo/untblk.cxx @@ -176,7 +176,6 @@ void SwUndoInserts::Undo( SwUndoIter& rUndoIter ) SwPaM * pPam = rUndoIter.pAktPam; SwDoc* pDoc = pPam->GetDoc(); SetPaM( rUndoIter ); - ::sw::UndoGuard const undoGuard(pDoc->GetIDocumentUndoRedo()); if( IDocumentRedlineAccess::IsRedlineOn( GetRedlineMode() )) pDoc->DeleteRedline( *pPam, true, USHRT_MAX ); |