]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathHull.cpp
Preserve \inputencoding value when switching to non-TeX fonts.
[lyx.git] / src / mathed / InsetMathHull.cpp
index 61d078abe0d77c51588cd64ff70e3080f5f1459a..04b47d5d4a822d14af7786bae8a1f1b9cd267f35 100644 (file)
@@ -198,7 +198,7 @@ docstring hullName(HullType type)
 static InsetLabel * dummy_pointer = 0;
 
 InsetMathHull::InsetMathHull(Buffer * buf)
-       : InsetMathGrid(buf, 1, 1), type_(hullNone), numbered_(1, NUMBER),
+       : InsetMathGrid(buf, 1, 1), type_(hullNone), numbered_(1, NONUMBER),
          numbers_(1, empty_docstring()), label_(1, dummy_pointer),
          preview_(new RenderPreview(this))
 {
@@ -430,7 +430,7 @@ InsetMath::mode_type InsetMathHull::currentMode() const
 // alignment is not implemented in the LyXHTML output.
 char InsetMathHull::defaultColAlign(col_type col)
 {
-       return colAlign(type_, col);
+       return colAlign(type_, col, buffer().params());
 }
 
 
@@ -452,7 +452,7 @@ char InsetMathHull::displayColAlign(idx_type idx) const
        case hullXAlignAt:
        case hullXXAlignAt:
        case hullFlAlign:
-               return colAlign(type_, col(idx));
+               return colAlign(type_, col(idx), buffer().params());
        default:
                break;
        }
@@ -549,8 +549,8 @@ void InsetMathHull::metrics(MetricsInfo & mi, Dimension & dim) const
        }
 
        Changer dummy1 = mi.base.changeFontSet(standardFont());
-       Changer dummy2 = mi.base.font.changeStyle(display() ? LM_ST_DISPLAY
-                                                           : LM_ST_TEXT);
+       Changer dummy2 = mi.base.font.changeStyle(display() ? DISPLAY_STYLE
+                                                           : TEXT_STYLE);
 
        // let the cells adjust themselves
        InsetMathGrid::metrics(mi, dim);
@@ -653,8 +653,8 @@ void InsetMathHull::draw(PainterInfo & pi, int x, int y) const
        Changer dummy0 = really_change_color ? pi.base.font.changeColor(color)
                : Changer();
        Changer dummy1 = pi.base.changeFontSet(standardFont());
-       Changer dummy2 = pi.base.font.changeStyle(display() ? LM_ST_DISPLAY
-                                                           : LM_ST_TEXT);
+       Changer dummy2 = pi.base.font.changeStyle(display() ? DISPLAY_STYLE
+                                                           : TEXT_STYLE);
 
        int xmath = x;
        BufferParams::MathNumber const math_number = buffer().params().getMathNumber();