#include <config.h>
-#include "InsetMathSqrt.h"
#include "MacroTable.h"
+
+#include "InsetMathSqrt.h"
#include "InsetMathMacroTemplate.h"
#include "InsetMathMacroArgument.h"
#include "MathParser.h"
#include "InsetMathNest.h"
#include "Buffer.h"
-#include "DocIterator.h"
#include "InsetList.h"
#include "Text.h"
}
-bool MacroData::expand(vector<MathData> const & args, MathData & to) const
+bool MacroData::expand(vector<MathData> const & from, MathData & to) const
{
updateData();
//it.cell().erase(it.pos());
//it.cell().insert(it.pos(), it.nextInset()->asInsetMath()
size_t n = static_cast<InsetMathMacroArgument*>(it.nextInset())->number();
- if (n <= args.size()) {
+ if (n <= from.size()) {
it.cell().erase(it.pos());
- it.cell().insert(it.pos(), args[n - 1]);
+ it.cell().insert(it.pos(), from[n - 1]);
}
}
//LYXERR0("MathData::expand: res: " << inset.cell(0));
}
+docstring const MacroData::htmlname() const
+{
+ if (sym_)
+ return sym_->htmlname;
+ return docstring();
+}
+
+
docstring const MacroData::xmlname() const
{
if (sym_)
MacroTable::iterator
-MacroTable::insert(Buffer * buf, docstring const & def)
+MacroTable::insert(Buffer * buf, docstring const & definition)
{
//lyxerr << "MacroTable::insert, def: " << to_utf8(def) << endl;
InsetMathMacroTemplate mac(buf);
- mac.fromString(def);
+ mac.fromString(definition);
MacroData data(buf, mac);
return insert(mac.name(), data);
}