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: Michael Stahl <Michael.Stahl@cib.de>
diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx
index de810a4..cee2e77 100644
--- a/sw/source/core/doc/doc.cxx
+++ b/sw/source/core/doc/doc.cxx
@@ -1733,8 +1733,6 @@
{
if (GetIDocumentUndoRedo().DoesUndo())
{
GetIDocumentUndoRedo().DelAllUndoObj();
GetIDocumentUndoRedo().AppendUndo(
std::make_unique<SwUndoTOXChange>(this, &rTOX, rNew));
}
diff --git a/sw/source/uibase/index/toxmgr.cxx b/sw/source/uibase/index/toxmgr.cxx
index afae269..d2ed262 100644
--- a/sw/source/uibase/index/toxmgr.cxx
+++ b/sw/source/uibase/index/toxmgr.cxx
@@ -436,7 +436,6 @@
if (pDoc->GetIDocumentUndoRedo().DoesUndo())
{
pDoc->GetIDocumentUndoRedo().DelAllUndoObj();
pDoc->GetIDocumentUndoRedo().StartUndo(SwUndoId::TOXCHANGE, nullptr);
}
diff --git a/sw/source/uibase/wrtsh/wrtsh2.cxx b/sw/source/uibase/wrtsh/wrtsh2.cxx
index 6fbd3d6..9298ffb 100644
--- a/sw/source/uibase/wrtsh/wrtsh2.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh2.cxx
@@ -324,15 +324,6 @@
if(CanInsert())
{
SwEditShell::UpdateTableOf(rTOX, pSet);
if (pSet == nullptr)
{
SwDoc *const pDoc_ = GetDoc();
if (pDoc_)
{
pDoc_->GetIDocumentUndoRedo().DelAllUndoObj();
}
}
}
}