X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2FMacroTable.cpp;h=d279bdb84490c0c0efe4214905f117316babb610;hb=ebe6612e2661f49dcfae6103f056c27afd47751f;hp=2899e40c2e7e75b76d55d5ef040ecd83a6b9fab5;hpb=66aa52ff20c6e96d679d917bb3d98ff29117ad15;p=lyx.git diff --git a/src/mathed/MacroTable.cpp b/src/mathed/MacroTable.cpp index 2899e40c2e..d279bdb844 100644 --- a/src/mathed/MacroTable.cpp +++ b/src/mathed/MacroTable.cpp @@ -12,8 +12,8 @@ #include "InsetMathSqrt.h" #include "MacroTable.h" -#include "MathMacroTemplate.h" -#include "MathMacroArgument.h" +#include "InsetMathMacroTemplate.h" +#include "InsetMathMacroArgument.h" #include "MathParser.h" #include "MathStream.h" #include "MathSupport.h" @@ -55,7 +55,7 @@ MacroData::MacroData(Buffer * buf, DocIterator const & pos) } -MacroData::MacroData(Buffer * buf, MathMacroTemplate const & macro) +MacroData::MacroData(Buffer * buf, InsetMathMacroTemplate const & macro) : buffer_(buf), queried_(false), numargs_(0), sym_(0), optionals_(0), lockCount_(0), redefinition_(false), type_(MacroTypeNewcommand) { @@ -81,7 +81,7 @@ bool MacroData::expand(vector const & args, MathData & to) const continue; //it.cell().erase(it.pos()); //it.cell().insert(it.pos(), it.nextInset()->asInsetMath() - size_t n = static_cast(it.nextInset())->number(); + size_t n = static_cast(it.nextInset())->number(); if (n <= args.size()) { it.cell().erase(it.pos()); it.cell().insert(it.pos(), args[n - 1]); @@ -147,7 +147,7 @@ void MacroData::unlock() const } -void MacroData::queryData(MathMacroTemplate const & macro) const +void MacroData::queryData(InsetMathMacroTemplate const & macro) const { if (queried_) return; @@ -182,7 +182,7 @@ void MacroData::updateData() const } // query the data from the macro template - queryData(static_cast(*inset)); + queryData(static_cast(*inset)); } @@ -198,8 +198,8 @@ int MacroData::write(odocstream & os, bool overwriteRedefinition) const } // output template - MathMacroTemplate const & tmpl = - static_cast(*inset); + InsetMathMacroTemplate const & tmpl = + static_cast(*inset); otexrowstream ots(os); WriteStream wi(ots, false, true, WriteStream::wsDefault); return tmpl.write(wi, overwriteRedefinition); @@ -244,7 +244,7 @@ MacroTable::iterator MacroTable::insert(Buffer * buf, docstring const & def) { //lyxerr << "MacroTable::insert, def: " << to_utf8(def) << endl; - MathMacroTemplate mac(buf); + InsetMathMacroTemplate mac(buf); mac.fromString(def); MacroData data(buf, mac); return insert(mac.name(), data);