From: Jean-Marc Lasgouttes Date: Thu, 25 Sep 2008 13:05:43 +0000 (+0000) Subject: move the validation code from InsetFlex to InsetCollapsable X-Git-Tag: 1.6.10~3338 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=0c68af937aabad17f06085f80c142065a773b216;p=features.git move the validation code from InsetFlex to InsetCollapsable git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26538 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/insets/InsetCollapsable.cpp b/src/insets/InsetCollapsable.cpp index 788218ee61..50153b2a2c 100644 --- a/src/insets/InsetCollapsable.cpp +++ b/src/insets/InsetCollapsable.cpp @@ -832,11 +832,10 @@ int InsetCollapsable::latex(odocstream & os, void InsetCollapsable::validate(LaTeXFeatures & features) const { - if (!layout_) - return; - - // Force inclusion of preamble snippet in layout file - features.require(to_utf8(layout_->name())); + string const preamble = getLayout().preamble(); + if (!preamble.empty()) + features.addPreambleSnippet(preamble); + features.require(getLayout().requires()); InsetText::validate(features); } diff --git a/src/insets/InsetFlex.cpp b/src/insets/InsetFlex.cpp index a4bd7d2c29..0d98f15fd1 100644 --- a/src/insets/InsetFlex.cpp +++ b/src/insets/InsetFlex.cpp @@ -113,12 +113,4 @@ void InsetFlex::textString(odocstream & os) const } -void InsetFlex::validate(LaTeXFeatures & features) const -{ - string const preamble = getLayout().preamble(); - if (!preamble.empty()) - features.addPreambleSnippet(preamble); - features.require(getLayout().requires()); -} - } // namespace lyx diff --git a/src/insets/InsetFlex.h b/src/insets/InsetFlex.h index 2fdc43ccb0..bd165c55af 100644 --- a/src/insets/InsetFlex.h +++ b/src/insets/InsetFlex.h @@ -44,8 +44,6 @@ public: int docbook(odocstream &, OutputParams const &) const; /// the string that is passed to the TOC void textString(odocstream &) const; - /// - void validate(LaTeXFeatures &) const; /// should paragraph indendation be ommitted in any case? bool neverIndent() const { return true; }