From: Jean-Marc Lasgouttes Date: Fri, 12 Dec 2008 15:38:52 +0000 (+0000) Subject: 1/ call InsetCollapsable::validate instead of InsetText::validate in several X-Git-Tag: 2.0.0~7566 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=370a4d8cf286b5a0d1160fe65742e387a8529daf;p=features.git 1/ call InsetCollapsable::validate instead of InsetText::validate in several to allow customization in layout files 2/ do not add preamble chunks for features that are used in inactive insets (notes, inactive branches) git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27859 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/insets/InsetBox.cpp b/src/insets/InsetBox.cpp index cc45619e0c..43d29d8dcd 100644 --- a/src/insets/InsetBox.cpp +++ b/src/insets/InsetBox.cpp @@ -508,7 +508,7 @@ void InsetBox::validate(LaTeXFeatures & features) const features.require("framed"); break; } - InsetText::validate(features); + InsetCollapsable::validate(features); } diff --git a/src/insets/InsetBranch.cpp b/src/insets/InsetBranch.cpp index 968abf0400..d33069f62b 100644 --- a/src/insets/InsetBranch.cpp +++ b/src/insets/InsetBranch.cpp @@ -241,7 +241,8 @@ void InsetBranch::tocString(odocstream & os) const void InsetBranch::validate(LaTeXFeatures & features) const { - InsetText::validate(features); + if (isBranchSelected()) + InsetCollapsable::validate(features); } diff --git a/src/insets/InsetNote.cpp b/src/insets/InsetNote.cpp index 91258a891e..f7f924bc0a 100644 --- a/src/insets/InsetNote.cpp +++ b/src/insets/InsetNote.cpp @@ -328,13 +328,18 @@ int InsetNote::docbook(odocstream & os, OutputParams const & runparams_in) const void InsetNote::validate(LaTeXFeatures & features) const { - if (params_.type == InsetNoteParams::Comment) + switch (params_.type) { + case InsetNoteParams::Comment: features.require("verbatim"); - if (params_.type == InsetNoteParams::Greyedout) { + break; + case InsetNoteParams::Greyedout: features.require("color"); features.require("lyxgreyedout"); + InsetCollapsable::validate(features); + break; + case InsetNoteParams::Note: + break; } - InsetText::validate(features); }