X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2FInsetFootlike.cpp;h=739d89745e6673a5d52ee82f33b49a28ff994ab2;hb=88e5e5fd345c280b0927ad84785657cbc9e55f77;hp=ce82e6461a2731a6236862621227936b326c00bd;hpb=a694476ac68fd56c23eace194e9e6ac5b2a5cac5;p=lyx.git diff --git a/src/insets/InsetFootlike.cpp b/src/insets/InsetFootlike.cpp index ce82e6461a..739d89745e 100644 --- a/src/insets/InsetFootlike.cpp +++ b/src/insets/InsetFootlike.cpp @@ -3,7 +3,7 @@ * This file is part of LyX, the document processor. * Licence details can be found in the file COPYING. * - * \author Lars Gullik Bjønnes + * \author Lars Gullik Bjønnes * * Full author contact details are available in file CREDITS. */ @@ -15,22 +15,21 @@ #include "Buffer.h" #include "BufferView.h" #include "BufferParams.h" +#include "Font.h" #include "MetricsInfo.h" +#include "support/lstrings.h" + #include using namespace std; namespace lyx { +using support::token; -InsetFootlike::InsetFootlike(Buffer const & buf) - : InsetCollapsable(buf) -{} - - -InsetFootlike::InsetFootlike(InsetFootlike const & in) - : InsetCollapsable(in) +InsetFootlike::InsetFootlike(Buffer * buf) + : InsetCollapsible(buf) {} @@ -38,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; } @@ -47,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); } @@ -63,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); }