X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2Finsetenv.C;h=fd2d2cca4fecf2f374c78977f9afed1094a5f72c;hb=e28331ed63062dea10d0a21b9ec12034b4b17b9a;hp=88f414efe8c19febcbc448d6a029ca31bae927ec;hpb=44cd0fc9a1687cc63911c7f98d978594458e7813;p=lyx.git diff --git a/src/insets/insetenv.C b/src/insets/insetenv.C index 88f414efe8..fd2d2cca4f 100644 --- a/src/insets/insetenv.C +++ b/src/insets/insetenv.C @@ -15,11 +15,11 @@ #include "bufferparams.h" #include "gettext.h" #include "paragraph.h" -#include "paragraph_funcs.h" +#include "output_latex.h" #include "texrow.h" -#include "support/std_ostream.h" +namespace lyx { using std::string; using std::auto_ptr; @@ -30,9 +30,9 @@ InsetEnvironment::InsetEnvironment (BufferParams const & bp, string const & name) : InsetText(bp), layout_(bp.getLyXTextClass()[name]) { - setInsetName(name); + setInsetName(from_utf8(name)); setAutoBreakRows(true); - setDrawFrame(ALWAYS); + setDrawFrame(true); } @@ -41,7 +41,7 @@ InsetEnvironment::InsetEnvironment(InsetEnvironment const & in) {} -auto_ptr InsetEnvironment::clone() const +auto_ptr InsetEnvironment::doClone() const { return auto_ptr(new InsetEnvironment(*this)); } @@ -49,7 +49,7 @@ auto_ptr InsetEnvironment::clone() 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,20 +60,22 @@ void InsetEnvironment::read(Buffer const & buf, LyXLex & lex) } -string const InsetEnvironment::editMessage() const +docstring const InsetEnvironment::editMessage() const { return _("Opened Environment Inset: ") + getInsetName(); } -int InsetEnvironment::latex(Buffer const & buf, ostream & os, - LatexRunParams const & runparams) const +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, + latexParagraphs(buf, paragraphs(), os, texrow, runparams, layout_->latexparagraph); - os << layout_->latexfooter; + // FIXME UNICODE + os << from_utf8(layout_->latexfooter); return texrow.rows(); } @@ -82,3 +84,6 @@ LyXLayout_ptr const & InsetEnvironment::layout() const { return layout_; } + + +} // namespace lyx