]> git.lyx.org Git - features.git/blobdiff - src/mathed/MathMacroTemplate.cpp
Give inset codes to all the math insets, so we get more information when
[features.git] / src / mathed / MathMacroTemplate.cpp
index 6765f01a99783b8980d014da7c4de850785ee52d..3014cc4ee7af923a4dadb6e6955f6f0c0db1f53b 100644 (file)
@@ -635,7 +635,7 @@ void MathMacroTemplate::removeArguments(Cursor & cur, int from, int to)
        for (DocIterator it = doc_iterator_begin(&buffer(), this); it; it.forwardChar()) {
                if (!it.nextInset())
                        continue;
-               if (it.nextInset()->lyxCode() != MATHMACROARG_CODE)
+               if (it.nextInset()->lyxCode() != MATH_MACROARG_CODE)
                        continue;
                MathMacroArgument * arg = static_cast<MathMacroArgument*>(it.nextInset());
                int n = arg->number() - 1;
@@ -657,7 +657,7 @@ void MathMacroTemplate::shiftArguments(size_t from, int by)
        for (DocIterator it = doc_iterator_begin(&buffer(), this); it; it.forwardChar()) {
                if (!it.nextInset())
                        continue;
-               if (it.nextInset()->lyxCode() != MATHMACROARG_CODE)
+               if (it.nextInset()->lyxCode() != MATH_MACROARG_CODE)
                        continue;
                MathMacroArgument * arg = static_cast<MathMacroArgument*>(it.nextInset());
                if (arg->number() >= int(from) + 1)
@@ -676,7 +676,7 @@ int MathMacroTemplate::maxArgumentInDefinition() const
        for (; it; it.forwardChar()) {
                if (!it.nextInset())
                        continue;
-               if (it.nextInset()->lyxCode() != MATHMACROARG_CODE)
+               if (it.nextInset()->lyxCode() != MATH_MACROARG_CODE)
                        continue;
                MathMacroArgument * arg = static_cast<MathMacroArgument*>(it.nextInset());
                maxArg = std::max(int(arg->number()), maxArg);
@@ -696,7 +696,7 @@ void MathMacroTemplate::insertMissingArguments(int maxArg)
        for (; it && it[0].idx() == idx; it.forwardChar()) {
                if (!it.nextInset())
                        continue;
-               if (it.nextInset()->lyxCode() != MATHMACROARG_CODE)
+               if (it.nextInset()->lyxCode() != MATH_MACROARG_CODE)
                        continue;
                MathMacroArgument * arg = static_cast<MathMacroArgument*>(it.nextInset());
                found[arg->number() - 1] = true;