]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathBrace.cpp
Small improvement for bug #7509 as suggested by JMarc
[lyx.git] / src / mathed / InsetMathBrace.cpp
index 0992f245f502b2115f39d08018fae1b375372d70..14279c1d5100c077634702e83a9137de9eaad9f0 100644 (file)
@@ -3,7 +3,7 @@
  * This file is part of LyX, the document processor.
  * Licence details can be found in the file COPYING.
  *
- * \author André Pönitz
+ * \author André Pönitz
  *
  * Full author contact details are available in file CREDITS.
  */
 #include "frontends/FontMetrics.h"
 #include "frontends/Painter.h"
 
+#include <ostream>
+
 using namespace std;
 
 namespace lyx {
 
-InsetMathBrace::InsetMathBrace()
-       : InsetMathNest(1)
+InsetMathBrace::InsetMathBrace(Buffer * buf)
+       : InsetMathNest(buf, 1)
 {}
 
 
 InsetMathBrace::InsetMathBrace(MathData const & ar)
-       : InsetMathNest(1)
+       : InsetMathNest(const_cast<Buffer *>(ar.buffer()), 1)
 {
        cell(0) = ar;
 }
@@ -57,6 +59,7 @@ void InsetMathBrace::metrics(MetricsInfo & mi, Dimension & dim) const
 void InsetMathBrace::draw(PainterInfo & pi, int x, int y) const
 {
        FontInfo font = pi.base.font;
+       font.setShape(UP_SHAPE);
        font.setColor(Color_latex);
        Dimension t = theFontMetrics(font).dimension('{');
        pi.pain.text(x, y, '{', font);
@@ -97,6 +100,12 @@ void InsetMathBrace::mathmlize(MathStream & os) const
 }
 
 
+void InsetMathBrace::htmlize(HtmlStream & os) const
+{
+       os << cell(0);
+}
+
+
 void InsetMathBrace::mathematica(MathematicaStream & os) const
 {
        os << cell(0);