]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/MathFactory.cpp
* src/frontends/controllers/Dialog.{cpp,h}:
[lyx.git] / src / mathed / MathFactory.cpp
index ad7b86d31cd9c2081bfaa733d23a208527252017..85d0b3f60b7aed36852229508541c0856afdb675 100644 (file)
@@ -50,7 +50,7 @@
 #include "InsetMathXArrow.h"
 #include "InsetMathXYMatrix.h"
 #include "MathMacroArgument.h"
-#include "MathMacroTable.h"
+#include "MacroTable.h"
 #include "MathParser.h"
 #include "MathSupport.h"
 
@@ -87,7 +87,7 @@ WordList theWordList;
 
 bool math_font_available(docstring & name)
 {
-       LyXFont f;
+       Font f;
        augmentFont(f, name);
 
        // Do we have the font proper?
@@ -175,11 +175,12 @@ void initSymbols()
                        // create fallbacks if necessary
 
                        // store requirements as long as we can
-                       if (tmp.requires.empty() &&
-                           (tmp.inset == "msa" || tmp.inset == "msb"))
-                               tmp.requires = from_ascii("amssymb");
-                       else if (tmp.inset == "wasy")
-                               tmp.requires = from_ascii("wasysym");
+                       if (tmp.requires.empty()) {
+                               if (tmp.inset == "msa" || tmp.inset == "msb")
+                                       tmp.requires = from_ascii("amssymb");
+                               else if (tmp.inset == "wasy")
+                                       tmp.requires = from_ascii("wasysym");
+                       }
 
                        // symbol font is not available sometimes
                        docstring symbol_font = from_ascii("lyxsymbol");
@@ -265,7 +266,7 @@ MathAtom createInsetMath(docstring const & s)
                docstring const & inset = l->inset;
                //lyxerr << " found inset: '" << inset << '\'' << endl;
                if (inset == "ref")
-                       return MathAtom(new RefInset(l->name));
+                       return MathAtom(new InsetMathRef(l->name));
                if (inset == "overset")
                        return MathAtom(new InsetMathOverset);
                if (inset == "underset")
@@ -318,7 +319,7 @@ MathAtom createInsetMath(docstring const & s)
                return MathAtom(new InsetMathKern);
        if (s.substr(0, 8) == "xymatrix") {
                char spacing_code = '\0';
-               LyXLength spacing;
+               Length spacing;
                size_t const len = s.length();
                size_t i = 8;
                if (i < len && s[i] == '@') {
@@ -338,7 +339,7 @@ MathAtom createInsetMath(docstring const & s)
                        }
                        if (i < len && s[i] == '=') {
                                ++i;
-                               spacing = LyXLength(to_ascii(s.substr(i)));
+                               spacing = Length(to_ascii(s.substr(i)));
                        }
                }
                return MathAtom(new InsetMathXYMatrix(spacing, spacing_code));