]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathBrace.cpp
typo
[lyx.git] / src / mathed / InsetMathBrace.cpp
index 4bf24dfb81e7ad3566e25f339f55da3a57eb2e3a..b0ce242f07b82db4af4e0005d2327d10ae03582e 100644 (file)
@@ -13,7 +13,6 @@
 #include "InsetMathBrace.h"
 
 #include "MathData.h"
-#include "MathExtern.h"
 #include "MathStream.h"
 #include "MathSupport.h"
 #include "MetricsInfo.h"
@@ -22,6 +21,7 @@
 #include "frontends/Painter.h"
 
 #include <ostream>
+#include <algorithm>
 
 using namespace std;
 
@@ -49,17 +49,19 @@ void InsetMathBrace::metrics(MetricsInfo & mi, Dimension & dim) const
 {
        Dimension dim0;
        cell(0).metrics(mi, dim0);
-       Dimension t = theFontMetrics(mi.base.font).dimension('{');
+       FontInfo font = mi.base.font;
+       augmentFont(font, "mathnormal");
+       Dimension t = theFontMetrics(font).dimension('{');
        dim.asc = max(dim0.asc, t.asc);
        dim.des = max(dim0.des, t.des);
        dim.wid = dim0.width() + 2 * t.wid;
-       metricsMarkers(dim);
 }
 
 
 void InsetMathBrace::draw(PainterInfo & pi, int x, int y) const
 {
        FontInfo font = pi.base.font;
+       augmentFont(font, "mathnormal");
        font.setShape(UP_SHAPE);
        font.setColor(Color_latex);
        Dimension t = theFontMetrics(font).dimension('{');
@@ -67,11 +69,10 @@ void InsetMathBrace::draw(PainterInfo & pi, int x, int y) const
        cell(0).draw(pi, x + t.wid, y);
        Dimension const & dim0 = cell(0).dimension(*pi.base.bv);
        pi.pain.text(x + t.wid + dim0.width(), y, '}', font);
-       drawMarkers(pi, x, y);
 }
 
 
-void InsetMathBrace::write(WriteStream & os) const
+void InsetMathBrace::write(TeXMathStream & os) const
 {
        os << '{' << cell(0) << '}';
 }
@@ -95,12 +96,15 @@ void InsetMathBrace::octave(OctaveStream & os) const
 }
 
 
-docstring InsetMathBrace::mathmlize(MathStream & os) const
+void InsetMathBrace::mathmlize(MathMLStream & ms) const
+{
+       ms << MTag("mrow") << cell(0) << ETag("mrow");
+}
+
+
+void InsetMathBrace::htmlize(HtmlStream & os) const
 {
-       os << MTag("mrow");
-       docstring const rv = lyx::mathmlize(cell(0), os);
-       os << ETag("mrow");
-       return rv;
+       os << cell(0);
 }