[LyX/master] Amend ad6aa8ba4b9525
Juergen Spitzmueller
spitz at lyx.org
Thu Feb 8 06:32:07 UTC 2024
commit 61aa19ef9cbaf81b1b25df096f153a7fbeceb720
Author: Juergen Spitzmueller <spitz at lyx.org>
Date: Thu Feb 8 09:00:57 2024 +0100
Amend ad6aa8ba4b9525
Apparently, the cell is not queried in all cases.
---
src/insets/InsetTabular.cpp | 19 +++++++++++++++++++
src/insets/InsetTabular.h | 2 ++
2 files changed, 21 insertions(+), 0 deletions(-)
diff --git a/src/insets/InsetTabular.cpp b/src/insets/InsetTabular.cpp
index c98308c..9b4f175 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 7b8375f..c38fab0 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; }
More information about the lyx-cvs
mailing list