]> git.lyx.org Git - features.git/commitdiff
move the validation code from InsetFlex to InsetCollapsable
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 25 Sep 2008 13:05:43 +0000 (13:05 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 25 Sep 2008 13:05:43 +0000 (13:05 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26538 a592a061-630c-0410-9148-cb99ea01b6c8

src/insets/InsetCollapsable.cpp
src/insets/InsetFlex.cpp
src/insets/InsetFlex.h

index 788218ee61e424d9f2160808ac67557fc0af5df5..50153b2a2cd243f8198f1d0836f159191411b74b 100644 (file)
@@ -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);
 }
 
index a4bd7d2c29e9bf83abc0a4925af9f18f1717daf8..0d98f15fd10c8d45967dd5cd3c2ac770d1e34c15 100644 (file)
@@ -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
index 2fdc43ccb0065238c14093ff8dbfc3a99008c39b..bd165c55af1f6948d428a4245fa67ea56edc505e 100644 (file)
@@ -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; }