sw/source/core/edit/edtab.cxx | 4 ++++ 1 file changed, 4 insertions(+)
New commits: commit 952ce9b534857151ae57e517bc7ab6c9190b9916 Author: Mike Kaganski <[email protected]> AuthorDate: Wed Dec 20 18:52:17 2023 +0300 Commit: Xisco Fauli <[email protected]> CommitDate: Thu Dec 21 12:03:58 2023 +0100 tdf#158794: do not try to insert DDE table into footnotes / endnotes Until tdf#76007 is fixed, of course. Change-Id: Iad7fb0de679e024a8cebdd005ac5a66af3ace163 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161078 Tested-by: Jenkins Reviewed-by: Mike Kaganski <[email protected]> (cherry picked from commit 3a33a97d2358a7ad2e67c01edc1fca29d1b7041c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161090 Reviewed-by: Xisco Fauli <[email protected]> diff --git a/sw/source/core/edit/edtab.cxx b/sw/source/core/edit/edtab.cxx index b011a182b3ca..5e318ea74820 100644 --- a/sw/source/core/edit/edtab.cxx +++ b/sw/source/core/edit/edtab.cxx @@ -225,6 +225,10 @@ void SwEditShell::InsertDDETable( const SwInsertTableOptions& rInsTableOpts, sal_uInt16 nRows, sal_uInt16 nCols ) { SwPosition* pPos = GetCursor()->GetPoint(); + // Do not try to insert table into Footnotes/Endnotes! tdf#76007 prevents that. + if (pPos->GetNode() < pPos->GetNodes().GetEndOfInserts() + && pPos->GetNode().GetIndex() >= pPos->GetNodes().GetEndOfInserts().StartOfSectionIndex()) + return; StartAllAction();
