X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2FInsetMathString.cpp;h=53aba589899135ca2131cb21841f310af8c56422;hb=3d4076b598deb18660e50ec9c327efc3b15f15d0;hp=5217566c219bcd4899cd0530be2c35618830f72d;hpb=51c380440b0b2d5f04158e67047727ba1f985dc4;p=lyx.git diff --git a/src/mathed/InsetMathString.cpp b/src/mathed/InsetMathString.cpp index 5217566c21..53aba58989 100644 --- a/src/mathed/InsetMathString.cpp +++ b/src/mathed/InsetMathString.cpp @@ -91,10 +91,10 @@ void InsetMathString::octave(OctaveStream & os) const } -void InsetMathString::mathmlize(MathStream & /*os*/) const +void InsetMathString::mathmlize(MathStream &) const { // useless, no doubt, but we should not be here - LASSERT(false, /* */); + LATTEST(false); } @@ -120,7 +120,7 @@ void InsetMathString::write(WriteStream & os) const docstring command(1, c); try { bool termination = false; - if (c < 0x80 || + if (isASCII(c) || Encodings::latexMathChar(c, mathmode, os.encoding(), command, termination)) { if (os.textMode()) { if (in_forced_mode) { @@ -129,12 +129,12 @@ void InsetMathString::write(WriteStream & os) const os.textMode(false); in_forced_mode = false; } - if (c >= 0x80 && os.textMode()) { + if (!isASCII(c) && os.textMode()) { os << "\\ensuremath{"; os.textMode(false); in_forced_mode = true; } - } else if (c < 0x80 && in_forced_mode) { + } else if (isASCII(c) && in_forced_mode) { // we were inside \ensuremath os << '}'; os.textMode(true);