]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetfootlike.C
add parOwner to Inset, optimize LyXText::workWidth, fix memory corruption with lots...
[lyx.git] / src / insets / insetfootlike.C
index 0e5c7f6b0ac77bf45afaa6996d2c701ad2fff9fa..edfd20dafbfde25e8841302eeef8e640de810b2e 100644 (file)
@@ -29,12 +29,31 @@ InsetFootlike::InsetFootlike()
        font.decSize();
        font.setColor(LColor::collapsable);
        setLabelFont(font);
-       setAutoCollapse(false);
 }
 
 
-void InsetFootlike::Write(Buffer const * buf, std::ostream & os) const 
+InsetFootlike::InsetFootlike(InsetFootlike const & in, bool same_id)
+       : InsetCollapsable(in, same_id)
+{
+       LyXFont font(LyXFont::ALL_SANE);
+       font.decSize();
+       font.decSize();
+       font.setColor(LColor::collapsable);
+       setLabelFont(font);
+}
+
+
+void InsetFootlike::write(Buffer const * buf, std::ostream & os) const 
 {
        os << getInsetName() << "\n";
-       InsetCollapsable::Write(buf, os);
+       InsetCollapsable::write(buf, os);
+}
+
+
+bool InsetFootlike::insetAllowed(Inset::Code code) const
+{
+       if ((code == Inset::FOOT_CODE) || (code == Inset::MARGIN_CODE)
+           || (code ==Inset::FLOAT_CODE))
+               return false;
+       return InsetCollapsable::insetAllowed(code);
 }