X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2Finsetenv.C;h=fd2d2cca4fecf2f374c78977f9afed1094a5f72c;hb=e28331ed63062dea10d0a21b9ec12034b4b17b9a;hp=86bfc50a773cb35d73e83199c4992a0ec7d61615;hpb=b881ed2d5a4d26b062556d6d417c8f4624741878;p=lyx.git diff --git a/src/insets/insetenv.C b/src/insets/insetenv.C index 86bfc50a77..fd2d2cca4f 100644 --- a/src/insets/insetenv.C +++ b/src/insets/insetenv.C @@ -11,27 +11,28 @@ #include #include "insetenv.h" -#include "gettext.h" -#include "lyxtextclass.h" -#include "paragraph_funcs.h" -#include "lyxlayout.h" + #include "bufferparams.h" -#include "support/LOstream.h" -#include "debug.h" +#include "gettext.h" +#include "paragraph.h" +#include "output_latex.h" +#include "texrow.h" -using std::ostream; -using std::endl; +namespace lyx { + +using std::string; using std::auto_ptr; +using std::ostream; InsetEnvironment::InsetEnvironment (BufferParams const & bp, string const & name) : InsetText(bp), layout_(bp.getLyXTextClass()[name]) { - setInsetName(name); - autoBreakRows = true; - drawFrame_ = ALWAYS; + setInsetName(from_utf8(name)); + setAutoBreakRows(true); + setDrawFrame(true); } @@ -40,7 +41,7 @@ InsetEnvironment::InsetEnvironment(InsetEnvironment const & in) {} -auto_ptr InsetEnvironment::clone() const +auto_ptr InsetEnvironment::doClone() const { return auto_ptr(new InsetEnvironment(*this)); } @@ -48,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); } @@ -59,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(); } @@ -81,3 +84,6 @@ LyXLayout_ptr const & InsetEnvironment::layout() const { return layout_; } + + +} // namespace lyx