X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2FInsetMath.cpp;h=8706001d61dcabde80630d6a3763c7275e3cc388;hb=a68e5b777487b495feeefa53700834ecec6ec196;hp=cbf33cdf8707bf76aa82d51131fa181fc3eb53e3;hpb=f643ae700700cbd9aa0b1aca8155c6d7f2aee34d;p=lyx.git diff --git a/src/mathed/InsetMath.cpp b/src/mathed/InsetMath.cpp index cbf33cdf87..8706001d61 100644 --- a/src/mathed/InsetMath.cpp +++ b/src/mathed/InsetMath.cpp @@ -58,46 +58,22 @@ MathClass InsetMath::mathClass() const } -bool InsetMath::addToMathRow(MathRow & mrow, MetricsInfo & mi) const -{ - MathRow::Element e(MathRow::INSET, mi); - e.inset = this; - e.mclass = mathClass(); - mrow.push_back(e); - return true; -} - -void InsetMath::metricsMarkers(MetricsInfo & mi, Dimension & dim, - int framesize) const -{ - if (!mi.base.macro_nesting) - Inset::metricsMarkers(dim, framesize); -} - - -void InsetMath::metricsMarkers2(MetricsInfo & mi, Dimension & dim, - int framesize) const -{ - if (!mi.base.macro_nesting) - Inset::metricsMarkers2(dim, framesize); -} - - -void InsetMath::drawMarkers(PainterInfo & pi, int x, int y) const +InsetMath::marker_type InsetMath::marker(BufferView const *) const { - if (!pi.base.macro_nesting) - Inset::drawMarkers(pi, x, y); + return nargs() > 0 ? MARKER : NO_MARKER; } -void InsetMath::drawMarkers2(PainterInfo & pi, int x, int y) const +bool InsetMath::addToMathRow(MathRow & mrow, MetricsInfo & mi) const { - if (!pi.base.macro_nesting) - Inset::drawMarkers2(pi, x, y); + MathRow::Element e(mi, MathRow::INSET, mathClass()); + e.inset = this; + e.marker = mi.base.macro_nesting ? NO_MARKER : marker(mi.base.bv); + mrow.push_back(e); + return true; } - void InsetMath::dump() const { lyxerr << "---------------------------------------------" << endl; @@ -134,7 +110,7 @@ void InsetMath::write(WriteStream & os) const } -int InsetMath::plaintext(odocstringstream &, +int InsetMath::plaintext(odocstringstream &, OutputParams const &, size_t) const { // all math plain text output shall take place in InsetMathHull