]> git.lyx.org Git - features.git/commitdiff
BUG 3598: display framed and shaded notes in a separate paragraph, require package...
authorBo Peng <bpeng@lyx.org>
Fri, 18 May 2007 20:00:19 +0000 (20:00 +0000)
committerBo Peng <bpeng@lyx.org>
Fri, 18 May 2007 20:00:19 +0000 (20:00 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18412 a592a061-630c-0410-9148-cb99ea01b6c8

src/insets/InsetNote.cpp
src/insets/InsetNote.h

index f99d51d02ad55413316cd3d0057e1d4c5baa5f0e..55fc6911d7c433cb279297c4c83f806e69602346 100644 (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);
 }
 
index e2d2ac31d3df9b784f29644fb8e3c0639652d45a..97cd5d4256a78f941c266b385302a7d38f2125b8 100644 (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;
        ///