X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2FInsetMathDelim.cpp;h=9a1ca07f864bc1dd2bdb6f43074475ab668581ae;hb=c1173eb11c5f218cd459924eb44276445c499069;hp=45dd1ffcf39389c26c97f3089a783e6886bb0d42;hpb=f319fdbc2a4c8305d60f176566b818240066cfa9;p=lyx.git diff --git a/src/mathed/InsetMathDelim.cpp b/src/mathed/InsetMathDelim.cpp index 45dd1ffcf3..9a1ca07f86 100644 --- a/src/mathed/InsetMathDelim.cpp +++ b/src/mathed/InsetMathDelim.cpp @@ -12,13 +12,17 @@ #include #include "InsetMathDelim.h" + #include "MathData.h" #include "MathStream.h" -#include "MathStream.h" #include "MathSupport.h" +#include "MetricsInfo.h" + +#include "support/docstring.h" #include "frontends/FontMetrics.h" +using namespace std; namespace lyx { @@ -55,6 +59,7 @@ Inset * InsetMathDelim::clone() const void InsetMathDelim::write(WriteStream & os) const { + MathEnsurer ensurer(os); os << "\\left" << convertDelimToLatexName(left_) << cell(0) << "\\right" << convertDelimToLatexName(right_); } @@ -69,7 +74,6 @@ void InsetMathDelim::normalize(NormalStream & os) const void InsetMathDelim::metrics(MetricsInfo & mi, Dimension & dim) const { - using std::max; Dimension dim0; cell(0).metrics(mi, dim0); Dimension t = theFontMetrics(mi.base.font).dimension('I'); @@ -84,8 +88,6 @@ void InsetMathDelim::metrics(MetricsInfo & mi, Dimension & dim) const dim.wid = dim0.width() + 2 * dw_ + 8; dim.asc = max(a0, d0) + h0; dim.des = max(a0, d0) - h0; - // Cache the inset dimension. - setDimCache(mi, dim); }