BUG 3598: display framed and shaded notes in a separate paragraph, require package color also for framed note

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18412 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Bo Peng 2007-05-18 20:00:19 +00:00
parent 862a35bf2b
commit d848a5e393
2 changed files with 17 additions and 1 deletions

View File

@ -150,6 +150,18 @@ docstring const InsetNote::editMessage() const
}
Inset::DisplayType InsetNote::display() const
{
switch (params_.type) {
case InsetNoteParams::Framed:
case InsetNoteParams::Shaded:
return AlignLeft;
default:
return Inline;
}
}
void InsetNote::write(Buffer const & buf, ostream & os) const
{
params_.write(os);
@ -353,8 +365,10 @@ void InsetNote::validate(LaTeXFeatures & features) const
features.require("color");
features.require("framed");
}
if (params_.type == InsetNoteParams::Framed)
if (params_.type == InsetNoteParams::Framed) {
features.require("color");
features.require("framed");
}
InsetText::validate(features);
}

View File

@ -53,6 +53,8 @@ public:
Inset::Code lyxCode() const { return Inset::NOTE_CODE; }
///
docstring name() const { return from_ascii("Note"); }
/// framed and shaded notes are displayed
virtual DisplayType display() const;
///
void write(Buffer const &, std::ostream &) const;
///