* Licence details can be found in the file COPYING.
*
* \author Alejandro Aguilar Sierra
- * \author André Pönitz
+ * \author André Pönitz
*
* Full author contact details are available in file CREDITS.
*/
#include <sstream>
using namespace std;
+using namespace lyx::support;
namespace lyx {
-using support::bformat;
-
InsetFormulaMacro::InsetFormulaMacro()
- : InsetMathNest(2), name_("unknownA")
+ : InsetMathNest(2), name_(from_ascii("unknownA"))
{}
InsetFormulaMacro::InsetFormulaMacro(string const & s)
: InsetMathNest(2), name_("unknownB")
{
- std::istringstream is(s);
+ istringstream is(s);
read(is);
}
}
-void InsetFormulaMacro::write(Buffer const &, ostream & os) const
+void InsetFormulaMacro::write(ostream & os) const
{
os << "FormulaMacro\n";
- WriteStream wi(os, false, false);
+ WriteStream wi(os, false, false, WriteStream::wsDefault);
tmpl()->write(wi);
}
-int InsetFormulaMacro::latex(Buffer const &, odocstream & os,
+int InsetFormulaMacro::latex(odocstream & os,
OutputParams const & runparams) const
{
//lyxerr << "InsetFormulaMacro::latex" << endl;
- WriteStream wi(os, runparams.moving_arg, true);
+ WriteStream wi(os, runparams.moving_arg, true,
+ runparams.dryrun ? WriteStream::wsDryrun: WriteStream::wsDefault,
+ runparams.encoding);
tmpl()->write(wi);
return 2;
}
-int InsetFormulaMacro::plaintext(Buffer const &, odocstream & os,
- OutputParams const &) const
+int InsetFormulaMacro::plaintext(odocstream & os, OutputParams const & runparams) const
{
odocstringstream oss;
- WriteStream wi(oss, false, true);
+ WriteStream wi(oss, false, true, WriteStream::wsDefault, runparams.encoding);
tmpl()->write(wi);
docstring const str = oss.str();
}
-int InsetFormulaMacro::docbook(Buffer const & buf, ostream & os,
+int InsetFormulaMacro::docbook(ostream & os,
OutputParams const & runparams) const
{
- return plaintext(buf, os, runparams);
+ return plaintext(os, runparams);
}
-void InsetFormulaMacro::read(Buffer const &, Lexer & lex)
+void InsetFormulaMacro::read(Lexer & lex)
{
read(lex.getStream());
}
-void InsetFormulaMacro::read(std::istream & is)
+void InsetFormulaMacro::read(istream & is)
{
auto_ptr<MathMacroTemplate> p(new MathMacroTemplate(is));
name_ = p->name();