X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2FMathFactory.cpp;h=bf468e8616b792dd665ccff1829874ab972825a9;hb=d243e53f54e861c90ce7135f3d1a8d68d6202555;hp=5266edae67e08d526c4ae91143a81e9811a784a4;hpb=56ece75ad9becba27ff1eaa12a0b8e3c68bb317b;p=lyx.git diff --git a/src/mathed/MathFactory.cpp b/src/mathed/MathFactory.cpp index 5266edae67..bf468e8616 100644 --- a/src/mathed/MathFactory.cpp +++ b/src/mathed/MathFactory.cpp @@ -32,6 +32,7 @@ #include "InsetMathPhantom.h" #include "InsetMathRef.h" #include "InsetMathRoot.h" +#include "InsetMathSideset.h" #include "InsetMathSize.h" #include "InsetMathSpace.h" #include "InsetMathSpecialChar.h" @@ -62,6 +63,7 @@ #include "support/FileName.h" #include "support/filetools.h" // LibFileSearch #include "support/lstrings.h" +#include "support/textutils.h" #include "frontends/FontLoader.h" @@ -534,6 +536,15 @@ MathAtom createInsetMath(docstring const & s, Buffer * buf) return MathAtom(new InsetMathPhantom(buf, InsetMathPhantom::mathrlap)); if (s == "ensuremath") return MathAtom(new InsetMathEnsureMath(buf)); + if (s == "sideset") + return MathAtom(new InsetMathSideset(buf, true, true)); + // The following 3 string values are only for math toolbar use, no LaTeX names + if (s == "sidesetr") + return MathAtom(new InsetMathSideset(buf, false, true)); + if (s == "sidesetl") + return MathAtom(new InsetMathSideset(buf, true, false)); + if (s == "sidesetn") + return MathAtom(new InsetMathSideset(buf, false, false)); if (isSpecialChar(s)) return MathAtom(new InsetMathSpecialChar(s)); if (s == " ") @@ -588,7 +599,7 @@ bool createInsetMath_fromDialogStr(docstring const & str, MathData & ar) bool isAsciiOrMathAlpha(char_type c) { - return c < 0x80 || Encodings::isMathAlpha(c); + return isASCII(c) || Encodings::isMathAlpha(c); }