From: Bo Peng Date: Fri, 18 May 2007 20:00:19 +0000 (+0000) Subject: BUG 3598: display framed and shaded notes in a separate paragraph, require package... X-Git-Tag: 1.6.10~9701 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=d848a5e393f7145bdf40e7cde9af3539ceba7c87;p=features.git 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 --- diff --git a/src/insets/InsetNote.cpp b/src/insets/InsetNote.cpp index f99d51d02a..55fc6911d7 100644 --- a/src/insets/InsetNote.cpp +++ b/src/insets/InsetNote.cpp @@ -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); } diff --git a/src/insets/InsetNote.h b/src/insets/InsetNote.h index e2d2ac31d3..97cd5d4256 100644 --- a/src/insets/InsetNote.h +++ b/src/insets/InsetNote.h @@ -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; ///