]> 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 03f3fae71440ce1b2c7a1dafdc52b847baaa4d43..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");
+       setLabel(_("foot"));
+       setInsetName("Foot");
 }
 
 
-Inset * InsetFoot::Clone() const
+InsetFoot::InsetFoot(InsetFoot const & in, bool same_id)
+       : InsetFootlike(in, same_id)
 {
-    InsetFoot * result = new InsetFoot;
-    result->inset->init(inset);
-
-    result->collapsed = collapsed;
-    return result;
+       setLabel(_("foot"));
+       setInsetName("Foot");
 }
 
 
-string const InsetFoot::EditMessage() const
+Inset * InsetFoot::clone(Buffer const &, bool same_id) const
 {
-    return _("Opened Footnote Inset");
+       return new InsetFoot(*const_cast<InsetFoot *>(this), same_id);
 }
 
 
-int InsetFoot::Latex(Buffer const * buf,
-                    ostream & os, bool fragile, bool fp) const
+string const InsetFoot::editMessage() const
 {
-    os << "\\footnote{%\n";
-    
-    int i = inset->Latex(buf, os, fragile, fp);
-    os << "}%\n";
-    
-    return i + 2;
+       return _("Opened Footnote Inset");
 }
 
 
-bool InsetFoot::InsertInsetAllowed(Inset * in) const
+int InsetFoot::latex(Buffer const * buf,
+                    ostream & os, bool fragile, bool fp) const
 {
-    if ((in->LyxCode() == Inset::FOOT_CODE) ||
-       (in->LyxCode() == Inset::MARGIN_CODE)) {
-       return false;
-    }
-    return true;
+       os << "%\n\\footnote{";
+
+       int const i = inset.latex(buf, os, fragile, fp);
+       os << "%\n}";
+
+       return i + 2;
 }