]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathSpecialChar.cpp
Add \makeat switches to babel settings if necessary.
[lyx.git] / src / mathed / InsetMathSpecialChar.cpp
index b32c2e2302785ef4933ea05869292970d8e1e3bc..94d0514b9e9f9d5d1feae13c20be23434b772cd7 100644 (file)
@@ -55,11 +55,7 @@ Inset * InsetMathSpecialChar::clone() const
 
 void InsetMathSpecialChar::metrics(MetricsInfo & mi, Dimension & dim) const
 {
-       if (char_ == ' ') {
-               dim.asc = 4;
-               dim.des = 0;
-               dim.wid = 10;
-       } else if (mi.base.fontname == "mathnormal") {
+       if (mi.base.fontname == "mathnormal") {
                ShapeChanger dummy(mi.base.font, UP_SHAPE);
                dim = theFontMetrics(mi.base.font).dimension(char_);
        } else {
@@ -72,18 +68,7 @@ void InsetMathSpecialChar::metrics(MetricsInfo & mi, Dimension & dim) const
 
 void InsetMathSpecialChar::draw(PainterInfo & pi, int x, int y) const
 {
-       if (char_ == ' ') {
-               int xp[4];
-               int yp[4];
-               int w = 10;
-
-               xp[0] = ++x;        yp[0] = y - 3;
-               xp[1] = x;          yp[1] = y;
-               xp[2] = x + w - 2;  yp[2] = y;
-               xp[3] = x + w - 2;  yp[3] = y - 3;
-
-               pi.pain.lines(xp, yp, 4, Color_special);
-       } else if (pi.base.fontname == "mathnormal") {
+       if (pi.base.fontname == "mathnormal") {
                ShapeChanger dummy(pi.base.font, UP_SHAPE);
                pi.draw(x, y, char_);
        } else {
@@ -147,7 +132,20 @@ void InsetMathSpecialChar::octave(OctaveStream & os) const
 }
 
 
-docstring InsetMathSpecialChar::mathmlize(MathStream & ms) const
+void InsetMathSpecialChar::mathmlize(MathStream & ms) const
+{
+       switch (char_) {
+       case '&':
+               ms << "&amp;";
+               break;
+       default:
+               ms.os().put(char_);
+               break;
+       }
+}
+
+
+void InsetMathSpecialChar::htmlize(HtmlStream & ms) const
 {
        switch (char_) {
        case '&':
@@ -157,7 +155,6 @@ docstring InsetMathSpecialChar::mathmlize(MathStream & ms) const
                ms.os().put(char_);
                break;
        }
-       return docstring();
 }