]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetFormulaMacro.cpp
Fix bug 5802 (http://bugzilla.lyx.org/show_bug.cgi?id=5802)
[lyx.git] / src / mathed / InsetFormulaMacro.cpp
index 0f09fa7c9e1f6d81d9a51a63b1bb3d22439499f3..1d80cbedbc90382ac4c3b94f585001c816f30ed7 100644 (file)
@@ -4,7 +4,7 @@
  * 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.
  */
@@ -36,7 +36,7 @@ namespace lyx {
 
 
 InsetFormulaMacro::InsetFormulaMacro()
-       : InsetMathNest(2), name_("unknownA")
+       : InsetMathNest(2), name_(from_ascii("unknownA"))
 {}
 
 
@@ -74,16 +74,17 @@ int InsetFormulaMacro::latex(odocstream & os,
                             OutputParams const & runparams) const
 {
        //lyxerr << "InsetFormulaMacro::latex" << endl;
-       WriteStream wi(os, runparams.moving_arg, true, runparams.dryrun);
+       WriteStream wi(os, runparams.moving_arg, true, runparams.dryrun,
+                       runparams.encoding);
        tmpl()->write(wi);
        return 2;
 }
 
 
-int InsetFormulaMacro::plaintext(odocstream & os, OutputParams const &) const
+int InsetFormulaMacro::plaintext(odocstream & os, OutputParams const & runparams) const
 {
        odocstringstream oss;
-       WriteStream wi(oss, false, true, false);
+       WriteStream wi(oss, false, true, false, runparams.encoding);
        tmpl()->write(wi);
 
        docstring const str = oss.str();