X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2FInsetMathSideset.cpp;h=cdc5637282e0d817d49530defbdb5bb87b0e7dbb;hb=ebe6612e2661f49dcfae6103f056c27afd47751f;hp=6ed74e86c8528941fd11480e75fe899ce6628d03;hpb=d4a79d81d2af00198109bca447713f7eb21cd58a;p=lyx.git diff --git a/src/mathed/InsetMathSideset.cpp b/src/mathed/InsetMathSideset.cpp index 6ed74e86c8..cdc5637282 100644 --- a/src/mathed/InsetMathSideset.cpp +++ b/src/mathed/InsetMathSideset.cpp @@ -11,20 +11,22 @@ #include +#include "InsetMathSideset.h" + +#include "InsetMathSymbol.h" +#include "MathData.h" +#include "MathStream.h" +#include "MathSupport.h" + #include "BufferView.h" #include "Cursor.h" #include "DispatchResult.h" #include "FuncRequest.h" #include "FuncStatus.h" -#include "InsetMathSideset.h" -#include "InsetMathSymbol.h" #include "LaTeXFeatures.h" -#include "MathData.h" -#include "MathStream.h" -#include "MathSupport.h" +#include "MetricsInfo.h" #include "support/debug.h" - #include "support/lassert.h" @@ -34,7 +36,7 @@ using namespace std; namespace { /// x spacing between the nucleus and the scripts int const dx = 2; -} +} // namespace namespace lyx { @@ -183,6 +185,7 @@ int InsetMathSideset::nker(BufferView const * bv) const void InsetMathSideset::metrics(MetricsInfo & mi, Dimension & dim) const { + Changer dummy2 = mi.base.changeEnsureMath(); Dimension dimn; Dimension dimbl; Dimension dimtl; @@ -197,7 +200,7 @@ void InsetMathSideset::metrics(MetricsInfo & mi, Dimension & dim) const br().metrics(mi, dimbr); dimtr = dimbr; } - ScriptChanger dummy(mi.base); + Changer dummy = mi.base.changeScript(); if (scriptl_) { bl().metrics(mi, dimbl); tl().metrics(mi, dimtl); @@ -219,19 +222,19 @@ void InsetMathSideset::metrics(MetricsInfo & mi, Dimension & dim) const int nd = ndes(bv); int des = dyb(bv) + max(dimbl.descent(), dimbr.descent()); dim.des = max(nd, des); - metricsMarkers(dim); } void InsetMathSideset::draw(PainterInfo & pi, int x, int y) const { + Changer dummy2 = pi.base.changeEnsureMath(); BufferView & bv = *pi.base.bv; nuc().draw(pi, x + dxn(bv), y); if (!scriptl_) bl().draw(pi, x , y); if (!scriptr_) br().draw(pi, x + dxr(bv), y); - ScriptChanger dummy(pi.base); + Changer dummy = pi.base.changeScript(); if (scriptl_) { bl().draw(pi, x , y + dyb(bv)); tl().draw(pi, x , y - dyt(bv)); @@ -240,7 +243,6 @@ void InsetMathSideset::draw(PainterInfo & pi, int x, int y) const br().draw(pi, x + dxr(bv), y + dyb(bv)); tr().draw(pi, x + dxr(bv), y - dyt(bv)); } - drawMarkers(pi, x, y); }