#include "InsetEnvironment.h"
+#include "Buffer.h"
#include "BufferParams.h"
-#include "support/gettext.h"
#include "Layout.h"
#include "OutputParams.h"
#include "output_latex.h"
#include "TexRow.h"
#include "TextClass.h"
+#include "support/gettext.h"
+
using namespace std;
namespace lyx {
-InsetEnvironment::InsetEnvironment
- (BufferParams const & bp, docstring const & name)
- : InsetText(bp), layout_(bp.textClass()[name]), name_(name)
+InsetEnvironment::InsetEnvironment(Buffer const & buf, docstring const & name)
+ : InsetText(buf), layout_(buf.params().documentClass()[name]), name_(name)
{
setAutoBreakRows(true);
setDrawFrame(true);
}
-InsetEnvironment::InsetEnvironment(InsetEnvironment const & in)
- : InsetText(in), layout_(in.layout_)
-{}
-
-
-Inset * InsetEnvironment::clone() const
-{
- return new InsetEnvironment(*this);
-}
-
-
void InsetEnvironment::write(ostream & os) const
{
os << "Environment " << to_utf8(name()) << "\n";
OutputParams const & runparams) const
{
// FIXME UNICODE
- os << from_utf8(layout_->latexheader);
+ os << from_utf8(layout_.latexheader);
TexRow texrow;
latexParagraphs(buffer(), text_, os, texrow, runparams,
- layout_->latexparagraph);
+ layout_.latexparagraph);
// FIXME UNICODE
- os << from_utf8(layout_->latexfooter);
+ os << from_utf8(layout_.latexfooter);
return texrow.rows();
}
}
-LayoutPtr const & InsetEnvironment::layout() const
+Layout const & InsetEnvironment::layout() const
{
return layout_;
}