#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;
using std::ostream;
(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);
}
{}
-auto_ptr<InsetBase> InsetEnvironment::clone() const
+auto_ptr<InsetBase> InsetEnvironment::doClone() const
{
return auto_ptr<InsetBase>(new InsetEnvironment(*this));
}
void InsetEnvironment::write(Buffer const & buf, ostream & os) const
{
- os << "Environment " << getInsetName() << "\n";
+ os << "Environment " << to_utf8(getInsetName()) << "\n";
InsetText::write(buf, os);
}
}
-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();
}
{
return layout_;
}
+
+
+} // namespace lyx