]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/MathMacroTemplate.cpp
* src/mathed/InsetMathHull.cpp:
[lyx.git] / src / mathed / MathMacroTemplate.cpp
index 989a5f5e3e1691f11ce5e468a9ee11dfefcc772f..11b9ae90c6e096f20cf30691bc403e745bae272b 100644 (file)
@@ -1117,7 +1117,7 @@ void MathMacroTemplate::read(Lexer & lex)
 void MathMacroTemplate::write(ostream & os) const
 {
        odocstringstream oss;
-       WriteStream wi(oss, false, false);
+       WriteStream wi(oss, false, false, false);
        oss << "FormulaMacro\n";
        write(wi);
        os << to_utf8(oss.str());
@@ -1141,7 +1141,7 @@ void MathMacroTemplate::write(WriteStream & os, bool overwriteRedefinition) cons
                        else
                                os << "\\newcommandx";
 
-                       os << "\\" << name().c_str()
+                       os << "\\" << name()
                           << "[" << numargs_ << "]"
                           << "[usedefault, addprefix=\\global";
                        for (int i = 0; i < optionals_; ++i) {
@@ -1158,7 +1158,7 @@ void MathMacroTemplate::write(WriteStream & os, bool overwriteRedefinition) cons
                } else {
                        // macros without optionals use standard _global_ \def macros:
                        // \global\def\foo#1#2{#1,#2}
-                       os << "\\global\\def\\" << name().c_str();
+                       os << "\\global\\def\\" << name();
                        docstring param = from_ascii("#0");
                        for (int i = 1; i <= numargs_; ++i) { 
                                param[1] = '0' + i;
@@ -1173,7 +1173,7 @@ void MathMacroTemplate::write(WriteStream & os, bool overwriteRedefinition) cons
                        os << "\\renewcommand";
                else
                        os << "\\newcommand";
-               os << "{\\" << name().c_str() << '}';
+               os << "{\\" << name() << '}';
                if (numargs_ > 0)
                        os << '[' << numargs_ << ']';