X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2Finsetfoot.C;h=50f6af9a849ed9d3a094ead3b62193f8bab41b26;hb=3c8aba3b556871fb1100a2f98cd93d5d4e3f70c9;hp=ed2fb66624d185d1956d5e0fe38848fd1ca7a9ef;hpb=d0950acedaa91320340af398bb06d790486a2207;p=lyx.git diff --git a/src/insets/insetfoot.C b/src/insets/insetfoot.C index ed2fb66624..50f6af9a84 100644 --- a/src/insets/insetfoot.C +++ b/src/insets/insetfoot.C @@ -17,11 +17,11 @@ #include "gettext.h" #include "lyxfont.h" #include "BufferView.h" -#include "lyxscreen.h" #include "Painter.h" #include "support/LOstream.h" using std::ostream; +using std::endl; InsetFoot::InsetFoot(Buffer * bf) : InsetCollapsable(bf) @@ -33,6 +33,7 @@ InsetFoot::InsetFoot(Buffer * bf) font.setColor(LColor::footnote); setLabelFont(font); setAutoCollapse(false); + setInsetName("Foot"); } @@ -54,41 +55,12 @@ char const * InsetFoot::EditMessage() const int InsetFoot::Latex(ostream & os, bool fragile, bool fp) const { - if (fragile) - os << "\\footnote{"; // was footnotemark but that won't work - else - os << "\\footnote{"; - - int i = InsetText::Latex(os, fragile, fp); - os << "}"; - - return i; -} - - -void InsetFoot::Write(ostream & os) const -{ - os << "Foot\n" - << "\ncollapsed "; - if (display()) - os << "false\n"; - else - os << "true\n"; - WriteParagraphData(os); -} - - -void InsetFoot::Read(LyXLex & lex) -{ - if (lex.IsOK()) { - lex.next(); - string token = lex.GetString(); - if (token == "collapsed") { - lex.next(); - collapsed = lex.GetBool(); - } - } - InsetText::Read(lex); + os << "\\footnote{%" << endl; + + int i = InsetText::Latex(os, fragile, fp); + os << "}%" << endl; + + return i + 2; }