summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2023-12-20 18:52:17 +0300
committerXisco Fauli <xiscofauli@libreoffice.org>2023-12-21 12:03:58 +0100
commit952ce9b534857151ae57e517bc7ab6c9190b9916 (patch)
tree3b5faff72ebda70950145169a49e84018ad827a1
parent2f9ecce61b0c806a33a9f641e43f4a71ed699fee (diff)
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 <mike.kaganski@collabora.com> (cherry picked from commit 3a33a97d2358a7ad2e67c01edc1fca29d1b7041c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161090 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
-rw-r--r--sw/source/core/edit/edtab.cxx4
1 files changed, 4 insertions, 0 deletions
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();