From: Juergen Spitzmueller Date: Thu, 8 Feb 2024 08:00:57 +0000 (+0100) Subject: Amend ad6aa8ba4b9525 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=61aa19ef9cbaf81b1b25df096f153a7fbeceb720;p=features.git Amend ad6aa8ba4b9525 Apparently, the cell is not queried in all cases. --- diff --git a/src/insets/InsetTabular.cpp b/src/insets/InsetTabular.cpp index c98308c8d4..9b4f175f74 100644 --- a/src/insets/InsetTabular.cpp +++ b/src/insets/InsetTabular.cpp @@ -4518,6 +4518,25 @@ void InsetTabular::setBuffer(Buffer & buf) } +bool InsetTabular::insetAllowed(InsetCode code) const +{ + switch (code) { + case FLOAT_CODE: + case MARGIN_CODE: + case MATHMACRO_CODE: + case WRAP_CODE: + return false; + + case CAPTION_CODE: + // this is handled on cell level + return false; + + default: + return true; + } +} + + bool InsetTabular::allowMultiPar() const { for (col_type c = 0; c < tabular.ncols(); ++c) { diff --git a/src/insets/InsetTabular.h b/src/insets/InsetTabular.h index 7b8375f0a5..c38fab0385 100644 --- a/src/insets/InsetTabular.h +++ b/src/insets/InsetTabular.h @@ -1037,6 +1037,8 @@ public: /// bool hasSettings() const override { return true; } /// + bool insetAllowed(InsetCode code) const override; + /// bool allowSpellCheck() const override { return true; } /// bool canTrackChanges() const override { return true; }