X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2FMacroTable.cpp;h=d23855c511f5bd3fadd26661f81fc2d0b97a9abf;hb=5fdc577badb1cb133d6a0dc7d831bb1f82576adb;hp=7a75a4f2b3932079627bd6967ce4ecf73e5bbd00;hpb=b0e387e013b7f247074e82fd466d533cdc6dcd56;p=lyx.git diff --git a/src/mathed/MacroTable.cpp b/src/mathed/MacroTable.cpp index 7a75a4f2b3..d23855c511 100644 --- a/src/mathed/MacroTable.cpp +++ b/src/mathed/MacroTable.cpp @@ -71,7 +71,7 @@ bool MacroData::expand(vector const & args, MathData & to) const InsetMathSqrt inset(const_cast(buffer_)); docstring const & definition(display_.empty() ? definition_ : display_); - asArray(definition, inset.cell(0)); + asArray(definition, inset.cell(0), Parse::QUIET); //lyxerr << "MathData::expand: args: " << args << endl; //LYXERR0("MathData::expand: ar: " << inset.cell(0)); for (DocIterator it = doc_iterator_begin(buffer_, &inset); it; it.forwardChar()) { @@ -200,7 +200,8 @@ int MacroData::write(odocstream & os, bool overwriteRedefinition) const // output template MathMacroTemplate const & tmpl = static_cast(*inset); - WriteStream wi(os, false, true, WriteStream::wsDefault); + otexrowstream ots(os); + WriteStream wi(ots, false, true, WriteStream::wsDefault); return tmpl.write(wi, overwriteRedefinition); } @@ -243,7 +244,8 @@ MacroTable::iterator MacroTable::insert(Buffer * buf, docstring const & def) { //lyxerr << "MacroTable::insert, def: " << to_utf8(def) << endl; - MathMacroTemplate mac(buf, def); + MathMacroTemplate mac(buf); + mac.fromString(def); MacroData data(buf, mac); return insert(mac.name(), data); }