#include <config.h>
+#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"
int InsetMathSideset::dyb(BufferView const & bv) const
{
int nd = ndes(bv);
- int des = 0;
- if (scriptl_ && scriptr_)
- des = max(bl().dimension(bv).ascent(), br().dimension(bv).ascent());
- else if (scriptl_)
- des = bl().dimension(bv).ascent();
- else if (scriptr_)
- des = br().dimension(bv).ascent();
int na = nasc(bv);
- des = dybt(bv, na, nd, false);
+ int des = dybt(bv, na, nd, false);
return des;
}
int InsetMathSideset::dyt(BufferView const & bv) const
{
int na = nasc(bv);
- int asc = 0;
- if (scriptl_ && scriptr_)
- asc = max(tl().dimension(bv).descent(), tr().dimension(bv).descent());
- else if (scriptl_)
- asc = tl().dimension(bv).descent();
- else if (scriptr_)
- asc = tr().dimension(bv).descent();
int nd = ndes(bv);
- asc = dybt(bv, na, nd, true);
+ int asc = dybt(bv, na, nd, true);
return asc;
}
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);
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));