]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_factory.C
forward search in math insets. ugly. seems to work. don't ask why.
[lyx.git] / src / mathed / math_factory.C
index 10f0082e764158594b56f65a7d7f48a95584d6d6..327624ec0d0f9b05241be1440296590af50ebc89 100644 (file)
 #include "math_spaceinset.h"
 #include "math_specialcharinset.h"
 #include "math_sqrtinset.h"
-#include "math_symbolinset.h"
 #include "math_stackrelinset.h"
+#include "math_symbolinset.h"
+#include "math_unknowninset.h"
 
 
 MathAtom createMathInset(latexkeys const * l)
 {
        switch (l->token) {
        case LM_TK_FUNCLIM:
-               return MathAtom(new MathFuncLimInset(l));
+               return MathAtom(new MathFuncLimInset(l->name));
        case LM_TK_SPECIAL:
                return MathAtom(new MathSpecialCharInset(l->id));
        case LM_TK_SYM:
@@ -65,8 +66,10 @@ MathAtom createMathInset(latexkeys const * l)
                return MathAtom(new MathDotsInset(l->name));
        case LM_TK_BOX:
                return MathAtom(new MathBoxInset(l->name));
+       case LM_TK_FUNC:
+               return MathAtom(new MathFuncInset(l->name));
        }
-       return MathAtom(new MathFuncInset(l->name));
+       return MathAtom(new MathUnknownInset(l->name));
 }
 
 
@@ -88,5 +91,5 @@ MathAtom createMathInset(string const & s)
                return MathAtom(new MathMacro(s));
 
        //cerr << "creating inset 2 with name: '" << s << "'\n";
-       return MathAtom(new MathFuncInset(s));
+       return MathAtom(new MathUnknownInset(s));
 }