Kaydet (Commit) 4f0b568e authored tarafından Michael Stahl's avatar Michael Stahl

tdf#38703 i#42807 sw: stop clearing Undo stack on ToX Update

Reverts the "fix" for i#42807 from CWS swqcore08 since there's
now SwUndoUpdateIndex.

Change-Id: I6e71513c4a6da57bafcbc3d57b8fa113153d6c2d
Reviewed-on: https://gerrit.libreoffice.org/71324
Tested-by: Jenkins
Reviewed-by: 's avatarMichael Stahl <Michael.Stahl@cib.de>
üst 41df42a8
...@@ -1733,8 +1733,6 @@ void SwDoc::ChangeTOX(SwTOXBase & rTOX, const SwTOXBase & rNew, ...@@ -1733,8 +1733,6 @@ void SwDoc::ChangeTOX(SwTOXBase & rTOX, const SwTOXBase & rNew,
{ {
if (GetIDocumentUndoRedo().DoesUndo()) if (GetIDocumentUndoRedo().DoesUndo())
{ {
GetIDocumentUndoRedo().DelAllUndoObj();
GetIDocumentUndoRedo().AppendUndo( GetIDocumentUndoRedo().AppendUndo(
std::make_unique<SwUndoTOXChange>(this, &rTOX, rNew)); std::make_unique<SwUndoTOXChange>(this, &rTOX, rNew));
} }
......
...@@ -436,7 +436,6 @@ bool SwTOXMgr::UpdateOrInsertTOX(const SwTOXDescription& rDesc, ...@@ -436,7 +436,6 @@ bool SwTOXMgr::UpdateOrInsertTOX(const SwTOXDescription& rDesc,
if (pDoc->GetIDocumentUndoRedo().DoesUndo()) if (pDoc->GetIDocumentUndoRedo().DoesUndo())
{ {
pDoc->GetIDocumentUndoRedo().DelAllUndoObj();
pDoc->GetIDocumentUndoRedo().StartUndo(SwUndoId::TOXCHANGE, nullptr); pDoc->GetIDocumentUndoRedo().StartUndo(SwUndoId::TOXCHANGE, nullptr);
} }
......
...@@ -324,15 +324,6 @@ void SwWrtShell::UpdateTableOf(const SwTOXBase& rTOX, const SfxItemSet* pSet) ...@@ -324,15 +324,6 @@ void SwWrtShell::UpdateTableOf(const SwTOXBase& rTOX, const SfxItemSet* pSet)
if(CanInsert()) if(CanInsert())
{ {
SwEditShell::UpdateTableOf(rTOX, pSet); SwEditShell::UpdateTableOf(rTOX, pSet);
if (pSet == nullptr)
{
SwDoc *const pDoc_ = GetDoc();
if (pDoc_)
{
pDoc_->GetIDocumentUndoRedo().DelAllUndoObj();
}
}
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment