]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetfoot.C
fix typo that put too many include paths for most people
[lyx.git] / src / insets / insetfoot.C
index 9f65184713e2722bbc96dd367731234d9442b5a7..35e441c2793627084387fff3502b78431c52d5d7 100644 (file)
@@ -1,8 +1,8 @@
 /* This file is part of
  * ======================================================
- * 
+ *
  *           LyX, The Document Processor
- *      
+ *
  *          Copyright 1998 The LyX Team.
  *
  * ======================================================
 #include "support/LOstream.h"
 #include "debug.h"
 
+
 using std::ostream;
 
 
-InsetFoot::InsetFoot()
-       : InsetFootlike()
+InsetFoot::InsetFoot(BufferParams const & bp)
+       : InsetFootlike(bp)
 {
        setLabel(_("foot"));
        setInsetName("Foot");
 }
 
 
-Inset * InsetFoot::Clone(Buffer const &) const
+InsetFoot::InsetFoot(InsetFoot const & in, bool same_id)
+       : InsetFootlike(in, same_id)
 {
-       InsetFoot * result = new InsetFoot;
-       result->inset.init(&inset);
+       setLabel(_("foot"));
+       setInsetName("Foot");
+}
 
-       result->collapsed = collapsed;
-       return result;
+
+Inset * InsetFoot::clone(Buffer const &, bool same_id) const
+{
+       return new InsetFoot(*const_cast<InsetFoot *>(this), same_id);
 }
 
 
-string const InsetFoot::EditMessage() const
+string const InsetFoot::editMessage() const
 {
        return _("Opened Footnote Inset");
 }
 
 
-int InsetFoot::Latex(Buffer const * buf,
+int InsetFoot::latex(Buffer const * buf,
                     ostream & os, bool fragile, bool fp) const
 {
-       os << "\\footnote{%\n";
-       
-       int const i = inset.Latex(buf, os, fragile, fp);
-       os << "}%\n";
-       
-       return i + 2;
-}
+       os << "%\n\\footnote{";
 
+       int const i = inset.latex(buf, os, fragile, fp);
+       os << "%\n}";
 
-bool InsetFoot::InsertInsetAllowed(Inset * in) const
-{
-       if ((in->LyxCode() == Inset::FOOT_CODE) ||
-               (in->LyxCode() == Inset::MARGIN_CODE)) {
-               return false;
-       }
-       return true;
+       return i + 2;
 }