X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2FMathSupport.cpp;h=6a815ed8985e6b81605b4f201c6ecfffb865fab0;hb=d243e53f54e861c90ce7135f3d1a8d68d6202555;hp=0a87fd69bae3c90f67a8a812eba790a2a3831ef6;hpb=01a6d4252b94c3b0a38faf32da1eea9b17cbf3c5;p=lyx.git diff --git a/src/mathed/MathSupport.cpp b/src/mathed/MathSupport.cpp index 0a87fd69ba..6a815ed898 100644 --- a/src/mathed/MathSupport.cpp +++ b/src/mathed/MathSupport.cpp @@ -13,7 +13,8 @@ #include "MathSupport.h" -#include "InsetMath.h" +#include "InsetMathFont.h" +#include "InsetMathSymbol.h" #include "MathData.h" #include "MathParser.h" #include "MathStream.h" @@ -736,6 +737,27 @@ void augmentFont(FontInfo & font, docstring const & name) } +bool isAlphaSymbol(MathAtom const & at) +{ + if (at->asCharInset() || + (at->asSymbolInset() && + at->asSymbolInset()->isOrdAlpha())) + return true; + + if (at->asFontInset()) { + MathData const & ar = at->asFontInset()->cell(0); + for (size_t i = 0; i < ar.size(); ++i) { + if (!(ar[i]->asCharInset() || + (ar[i]->asSymbolInset() && + ar[i]->asSymbolInset()->isOrdAlpha()))) + return false; + } + return true; + } + return false; +} + + docstring asString(MathData const & ar) { odocstringstream os;