X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2FInsetEnvironment.cpp;h=73048ab52e87a8b9bb257c337e12733ed6b131c4;hb=2c357c1d23b7b83839a9beb8225d4f1ae4f793b4;hp=e7973d0bb76473266eda252738fac0b1e74d8336;hpb=897436efbb9bd641b61467d185a2dfae9839e575;p=lyx.git diff --git a/src/insets/InsetEnvironment.cpp b/src/insets/InsetEnvironment.cpp index e7973d0bb7..73048ab52e 100644 --- a/src/insets/InsetEnvironment.cpp +++ b/src/insets/InsetEnvironment.cpp @@ -13,23 +13,21 @@ #include "InsetEnvironment.h" #include "BufferParams.h" -#include "gettext.h" -#include "Paragraph.h" +#include "support/gettext.h" +#include "Layout.h" #include "OutputParams.h" #include "output_latex.h" #include "TexRow.h" +#include "TextClass.h" +using namespace std; namespace lyx { -using std::string; -using std::auto_ptr; -using std::ostream; - InsetEnvironment::InsetEnvironment - (BufferParams const & bp, string const & name) - : InsetText(bp), layout_(bp.getTextClass()[name]), name_(from_utf8(name)) + (BufferParams const & bp, docstring const & name) + : InsetText(bp), layout_(bp.getTextClass()[name]), name_(name) { setAutoBreakRows(true); setDrawFrame(true); @@ -41,9 +39,9 @@ InsetEnvironment::InsetEnvironment(InsetEnvironment const & in) {} -auto_ptr InsetEnvironment::doClone() const +Inset * InsetEnvironment::clone() const { - return auto_ptr(new InsetEnvironment(*this)); + return new InsetEnvironment(*this); } @@ -72,7 +70,7 @@ int InsetEnvironment::latex(Buffer const & buf, odocstream & os, // FIXME UNICODE os << from_utf8(layout_->latexheader); TexRow texrow; - latexParagraphs(buf, paragraphs(), os, texrow, runparams, + latexParagraphs(buf, text_, os, texrow, runparams, layout_->latexparagraph); // FIXME UNICODE os << from_utf8(layout_->latexfooter); @@ -91,7 +89,7 @@ int InsetEnvironment::plaintext(Buffer const & buf, odocstream & os, } -Layout_ptr const & InsetEnvironment::layout() const +LayoutPtr const & InsetEnvironment::layout() const { return layout_; }