]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetfootlike.C
ws changes only
[lyx.git] / src / insets / insetfootlike.C
index 8254da3008498ef59c304211b70a660fdd3a94bb..964e2d594bbb93f26d6ae28b3c53789d44672d74 100644 (file)
@@ -5,18 +5,17 @@
  *
  * \author Lars Gullik Bjønnes
  *
- * Full author contact details are available in file CREDITS
+ * Full author contact details are available in file CREDITS.
  */
 
 #include <config.h>
 
-
 #include "insetfootlike.h"
-#include "lyxfont.h"
-#include "buffer.h"
-#include "lyxtext.h"
-#include "support/LOstream.h"
 
+#include "buffer.h"
+#include "LColor.h"
+#include "metricsinfo.h"
+#include "paragraph.h"
 
 using std::ostream;
 
@@ -32,8 +31,8 @@ InsetFootlike::InsetFootlike(BufferParams const & bp)
 }
 
 
-InsetFootlike::InsetFootlike(InsetFootlike const & in, bool same_id)
-       : InsetCollapsable(in, same_id)
+InsetFootlike::InsetFootlike(InsetFootlike const & in)
+       : InsetCollapsable(in)
 {
        LyXFont font(LyXFont::ALL_SANE);
        font.decSize();
@@ -43,17 +42,26 @@ InsetFootlike::InsetFootlike(InsetFootlike const & in, bool same_id)
 }
 
 
-void InsetFootlike::write(Buffer const * buf, ostream & os) const
+void InsetFootlike::metrics(MetricsInfo & mi, Dimension & dim) const
+{
+       InsetCollapsable::metrics(mi, dim);
+       if (isOpen())
+               dim.wid = mi.base.textwidth;
+       dim_ = dim;
+}
+
+
+void InsetFootlike::write(Buffer const & buf, ostream & os) const
 {
        os << getInsetName() << "\n";
        InsetCollapsable::write(buf, os);
 }
 
 
-bool InsetFootlike::insetAllowed(Inset::Code code) const
+bool InsetFootlike::insetAllowed(InsetOld::Code code) const
 {
-       if ((code == Inset::FOOT_CODE) || (code == Inset::MARGIN_CODE)
-           || (code == Inset::FLOAT_CODE))
+       if (code == InsetOld::FOOT_CODE || code == InsetOld::MARGIN_CODE
+           || code == InsetOld::FLOAT_CODE)
                return false;
        return InsetCollapsable::insetAllowed(code);
 }