X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2FInsetMath.cpp;h=0d21b871d689f86f151ad2d744445c92cba3b5f5;hb=d9082639080b9de993742bd352f92e5183058cf5;hp=33a9a4e6b4a7f20e3e94b55a572450998ba55ca7;hpb=524073d09f89ea8484db5bc20d78e7cef0deda89;p=lyx.git diff --git a/src/mathed/InsetMath.cpp b/src/mathed/InsetMath.cpp index 33a9a4e6b4..0d21b871d6 100644 --- a/src/mathed/InsetMath.cpp +++ b/src/mathed/InsetMath.cpp @@ -30,21 +30,21 @@ using namespace std; namespace lyx { -HullType hullType(docstring const & s) -{ - if (s == "none") return hullNone; - if (s == "simple") return hullSimple; - if (s == "equation") return hullEquation; - if (s == "eqnarray") return hullEqnArray; - if (s == "align") return hullAlign; - if (s == "alignat") return hullAlignAt; - if (s == "xalignat") return hullXAlignAt; - if (s == "xxalignat") return hullXXAlignAt; - if (s == "multline") return hullMultline; - if (s == "gather") return hullGather; - if (s == "flalign") return hullFlAlign; - if (s == "regexp") return hullRegexp; - lyxerr << "unknown hull type '" << to_utf8(s) << "'" << endl; +HullType hullType(docstring const & name) +{ + if (name == "none") return hullNone; + if (name == "simple") return hullSimple; + if (name == "equation") return hullEquation; + if (name == "eqnarray") return hullEqnArray; + if (name == "align") return hullAlign; + if (name == "alignat") return hullAlignAt; + if (name == "xalignat") return hullXAlignAt; + if (name == "xxalignat") return hullXXAlignAt; + if (name == "multline") return hullMultline; + if (name == "gather") return hullGather; + if (name == "flalign") return hullFlAlign; + if (name == "regexp") return hullRegexp; + lyxerr << "unknown hull type '" << to_utf8(name) << "'" << endl; return hullUnknown; } @@ -94,9 +94,9 @@ MathData const & InsetMath::cell(idx_type) const } -InsetMath::marker_type InsetMath::marker(BufferView const *) const +marker_type InsetMath::marker(BufferView const *) const { - return nargs() > 0 ? MARKER : NO_MARKER; + return nargs() > 0 ? marker_type::MARKER : marker_type::NO_MARKER; } @@ -104,14 +104,14 @@ bool InsetMath::addToMathRow(MathRow & mrow, MetricsInfo & mi) const { MathRow::Element e(mi, MathRow::INSET, mathClass()); e.inset = this; - e.marker = mi.base.macro_nesting ? NO_MARKER : marker(mi.base.bv); + e.marker = mi.base.macro_nesting ? marker_type::NO_MARKER : marker(mi.base.bv); mrow.push_back(e); return true; } /// write LaTeX and LyX code -void InsetMath::writeLimits(WriteStream & os) const +void InsetMath::writeLimits(TeXMathStream & os) const { if (limits() == LIMITS) { os << "\\limits"; @@ -128,7 +128,7 @@ void InsetMath::dump() const lyxerr << "---------------------------------------------" << endl; odocstringstream os; otexrowstream ots(os); - WriteStream wi(ots, false, true, WriteStream::wsDefault); + TeXMathStream wi(ots, false, true, TeXMathStream::wsDefault); write(wi); lyxerr << to_utf8(os.str()); lyxerr << "\n---------------------------------------------" << endl; @@ -147,7 +147,7 @@ void InsetMath::drawT(TextPainter &, int, int) const } -void InsetMath::write(WriteStream & os) const +void InsetMath::write(TeXMathStream & os) const { MathEnsurer ensurer(os); docstring const s = name(); @@ -202,7 +202,7 @@ void InsetMath::mathematica(MathematicaStream & os) const } -void InsetMath::mathmlize(MathStream & ms) const +void InsetMath::mathmlize(MathMLStream & ms) const { ms << ""; ms << MTag("mi"); @@ -232,7 +232,7 @@ ostream & operator<<(ostream & os, MathAtom const & at) { odocstringstream oss; otexrowstream ots(oss); - WriteStream wi(ots, false, false, WriteStream::wsDefault); + TeXMathStream wi(ots, false, false, TeXMathStream::wsDefault); at->write(wi); return os << to_utf8(oss.str()); } @@ -241,7 +241,7 @@ ostream & operator<<(ostream & os, MathAtom const & at) odocstream & operator<<(odocstream & os, MathAtom const & at) { otexrowstream ots(os); - WriteStream wi(ots, false, false, WriteStream::wsDefault); + TeXMathStream wi(ots, false, false, TeXMathStream::wsDefault); at->write(wi); return os; }