]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetFootlike.cpp
Wrap rotated cells with linebreaks in varwidth
[lyx.git] / src / insets / InsetFootlike.cpp
index 4467081d7e24a239ff2f000fc0a6b7a1e549160a..739d89745e6673a5d52ee82f33b49a28ff994ab2 100644 (file)
 #include "Buffer.h"
 #include "BufferView.h"
 #include "BufferParams.h"
+#include "Font.h"
 #include "MetricsInfo.h"
 
+#include "support/lstrings.h"
+
 #include <iostream>
 
 using namespace std;
 
 namespace lyx {
 
+using support::token;
 
 InsetFootlike::InsetFootlike(Buffer * buf)
-       : InsetCollapsable(buf)
+       : InsetCollapsible(buf)
 {}
 
 
@@ -33,7 +37,7 @@ void InsetFootlike::metrics(MetricsInfo & mi, Dimension & dim) const
 {
        FontInfo tmpfont = mi.base.font;
        mi.base.font = mi.base.bv->buffer().params().getFont().fontInfo();
-       InsetCollapsable::metrics(mi, dim);
+       InsetCollapsible::metrics(mi, dim);
        mi.base.font = tmpfont;
 }
 
@@ -42,15 +46,16 @@ void InsetFootlike::draw(PainterInfo & pi, int x, int y) const
 {
        FontInfo tmpfont = pi.base.font;
        pi.base.font = pi.base.bv->buffer().params().getFont().fontInfo();
-       InsetCollapsable::draw(pi, x, y);
+       InsetCollapsible::draw(pi, x, y);
        pi.base.font = tmpfont;
 }
 
 
 void InsetFootlike::write(ostream & os) const
 {
-       os << to_utf8(name()) << "\n";
-       InsetCollapsable::write(os);
+       // The layoutName may contain a "InTitle" qualifier
+       os << to_utf8(token(layoutName(), char_type(':'), 0)) << "\n";
+       InsetCollapsible::write(os);
 }
 
 
@@ -58,7 +63,7 @@ bool InsetFootlike::insetAllowed(InsetCode code) const
 {
        if (code == FOOT_CODE || code == MARGIN_CODE || code == FLOAT_CODE)
                return false;
-       return InsetCollapsable::insetAllowed(code);
+       return InsetCollapsible::insetAllowed(code);
 }