]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetenv.C
* src/LyXAction.C: mark goto-clear-bookmark as working without buffer
[lyx.git] / src / insets / insetenv.C
index 58fd9b333f08f22a4f5c7b0db3c8947d8c6e6a6b..fd2d2cca4fecf2f374c78977f9afed1094a5f72c 100644 (file)
@@ -18,8 +18,8 @@
 #include "output_latex.h"
 #include "texrow.h"
 
-#include "support/std_ostream.h"
 
+namespace lyx {
 
 using std::string;
 using std::auto_ptr;
@@ -30,7 +30,7 @@ InsetEnvironment::InsetEnvironment
                (BufferParams const & bp, string const & name)
        : InsetText(bp), layout_(bp.getLyXTextClass()[name])
 {
-       setInsetName(name);
+       setInsetName(from_utf8(name));
        setAutoBreakRows(true);
        setDrawFrame(true);
 }
@@ -49,7 +49,7 @@ auto_ptr<InsetBase> InsetEnvironment::doClone() const
 
 void InsetEnvironment::write(Buffer const & buf, ostream & os) const
 {
-       os << "Environment " << getInsetName() << "\n";
+       os << "Environment " << to_utf8(getInsetName()) << "\n";
        InsetText::write(buf, os);
 }
 
@@ -60,21 +60,22 @@ void InsetEnvironment::read(Buffer const & buf, LyXLex & lex)
 }
 
 
-string const InsetEnvironment::editMessage() const
+docstring const InsetEnvironment::editMessage() const
 {
-       // FIXME UNICODE
-       return lyx::to_utf8(_("Opened Environment Inset: ")) + getInsetName();
+       return _("Opened Environment Inset: ") + getInsetName();
 }
 
 
-int InsetEnvironment::latex(Buffer const & buf, ostream & os,
+int InsetEnvironment::latex(Buffer const & buf, odocstream & os,
                            OutputParams const & runparams) const
 {
-       os << layout_->latexheader;
+       // FIXME UNICODE
+       os << from_utf8(layout_->latexheader);
        TexRow texrow;
        latexParagraphs(buf, paragraphs(), os, texrow, runparams,
                        layout_->latexparagraph);
-       os << layout_->latexfooter;
+       // FIXME UNICODE
+       os << from_utf8(layout_->latexfooter);
        return texrow.rows();
 }
 
@@ -83,3 +84,6 @@ LyXLayout_ptr const & InsetEnvironment::layout() const
 {
        return layout_;
 }
+
+
+} // namespace lyx