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
This commit is contained in:
Jean-Marc Lasgouttes 2008-12-12 15:38:52 +00:00
parent e79a9fa983
commit 370a4d8cf2
3 changed files with 11 additions and 5 deletions

View File

@ -508,7 +508,7 @@ void InsetBox::validate(LaTeXFeatures & features) const
features.require("framed");
break;
}
InsetText::validate(features);
InsetCollapsable::validate(features);
}

View File

@ -241,7 +241,8 @@ void InsetBranch::tocString(odocstream & os) const
void InsetBranch::validate(LaTeXFeatures & features) const
{
InsetText::validate(features);
if (isBranchSelected())
InsetCollapsable::validate(features);
}

View File

@ -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);
}