]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetfoot.C
* In the process of fixing the math background color bug, this commit transfer backgr...
[lyx.git] / src / insets / insetfoot.C
index 0876d9b8d919207c84d2e24657d64f91678fcac7..9b698b2ff8b66cac521ba5ab1b95f94b795d38cd 100644 (file)
@@ -23,7 +23,8 @@
 
 #include "support/std_ostream.h"
 
-using lyx::docstring;
+
+namespace lyx {
 
 using std::string;
 using std::auto_ptr;
@@ -33,18 +34,16 @@ using std::ostream;
 InsetFoot::InsetFoot(BufferParams const & bp)
        : InsetFootlike(bp)
 {
-       // FIXME UNICODE
-       setLabel(lyx::to_utf8(_("foot")));
-       setInsetName("Foot");
+       setLabel(_("foot"));
+       setInsetName(from_ascii("Foot"));
 }
 
 
 InsetFoot::InsetFoot(InsetFoot const & in)
        : InsetFootlike(in)
 {
-       // FIXME UNICODE
-       setLabel(lyx::to_utf8(_("foot")));
-       setInsetName("Foot");
+       setLabel(_("foot"));
+       setInsetName(from_ascii("Foot"));
 }
 
 
@@ -60,8 +59,8 @@ docstring const InsetFoot::editMessage() const
 }
 
 
-int InsetFoot::latex(Buffer const & buf, ostream & os,
-                    OutputParams const & runparams_in) const
+int InsetFoot::latex(Buffer const & buf, odocstream & os,
+                     OutputParams const & runparams_in) const
 {
        OutputParams runparams = runparams_in;
        // footnotes in titling commands like \title have moving arguments
@@ -76,13 +75,25 @@ int InsetFoot::latex(Buffer const & buf, ostream & os,
 
        int const i = InsetText::latex(buf, os, runparams);
        os << "%\n}";
+       runparams_in.encoding = runparams.encoding;
 
        return i + 2;
 }
 
 
-int InsetFoot::docbook(Buffer const & buf, ostream & os,
-                      OutputParams const & runparams) const
+int InsetFoot::plaintext(Buffer const & buf, odocstream & os,
+                         OutputParams const & runparams) const
+{
+       os << '[' << _("footnote") << ":\n";
+       InsetText::plaintext(buf, os, runparams);
+       os << "\n]";
+
+       return PLAINTEXT_NEWLINE + 1; // one char on a separate line
+}
+
+
+int InsetFoot::docbook(Buffer const & buf, odocstream & os,
+                       OutputParams const & runparams) const
 {
        os << "<footnote>";
        int const i = InsetText::docbook(buf, os, runparams);
@@ -90,3 +101,6 @@ int InsetFoot::docbook(Buffer const & buf, ostream & os,
 
        return i;
 }
+
+
+} // namespace lyx