From 7547cf9e5ff5e5623b88216974dbf5228df95653 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Uwe=20St=C3=B6hr?= Date: Sat, 7 Aug 2010 03:16:38 +0000 Subject: [PATCH] - InsetTabular.cpp: floats must not be inserted to tables, fixes #6844 - InsetCaption.cpp: margin notes and footnotes are not allowed in captions git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35073 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/insets/InsetCaption.cpp | 8 +++++--- src/insets/InsetTabular.cpp | 5 +++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/insets/InsetCaption.cpp b/src/insets/InsetCaption.cpp index 10471841c7..c8b774c0bc 100644 --- a/src/insets/InsetCaption.cpp +++ b/src/insets/InsetCaption.cpp @@ -176,12 +176,14 @@ bool InsetCaption::insetAllowed(InsetCode code) const { switch (code) { // code that is not allowed in a caption - case FLOAT_CODE: - case TABULAR_CODE: - case WRAP_CODE: case CAPTION_CODE: + case FLOAT_CODE: + case FOOT_CODE: case NEWPAGE_CODE: + case MARGIN_CODE: case MATHMACRO_CODE: + case TABULAR_CODE: + case WRAP_CODE: return false; default: return InsetText::insetAllowed(code); diff --git a/src/insets/InsetTabular.cpp b/src/insets/InsetTabular.cpp index 5712fb4654..806d8256f2 100644 --- a/src/insets/InsetTabular.cpp +++ b/src/insets/InsetTabular.cpp @@ -3245,10 +3245,11 @@ void InsetTabular::setBuffer(Buffer & buf) bool InsetTabular::insetAllowed(InsetCode code) const { - switch (code) - { + switch (code) { + case FLOAT_CODE: case MARGIN_CODE: case MATHMACRO_CODE: + case WRAP_CODE: return false; case CAPTION_CODE: -- 2.39.2