]> git.lyx.org Git - features.git/blobdiff - src/mathed/math_symbolinset.C
- remove MathStyles cache from those insets that don't need it
[features.git] / src / mathed / math_symbolinset.C
index f9170c1b2defc55b3b856a4e43f70e7211d108aa..24e3e9a923735e963b75102561e104031a286044 100644 (file)
@@ -58,12 +58,12 @@ MathTextCodes MathSymbolInset::code2() const
 }
 
 
-void MathSymbolInset::metrics(MathMetricsInfo const & st) const
+void MathSymbolInset::metrics(MathMetricsInfo const & mi) const
 {
-       size_ = st;
+       mi_ = mi;
        MathTextCodes c = code();
        if (sym_->latex_font_id > 0 && math_font_available(c)) {
-               mathed_char_dim(c, size_, sym_->latex_font_id, ascent_, descent_, width_);
+               mathed_char_dim(c, mi_, sym_->latex_font_id, ascent_, descent_, width_);
                if (c == LM_TC_CMEX) {
                        h_ = 4 * descent_ / 5;
                        ascent_  += h_;
@@ -73,9 +73,9 @@ void MathSymbolInset::metrics(MathMetricsInfo const & st) const
        }
 
        if (sym_->id > 0 && sym_->id < 255 && math_font_available(LM_TC_SYMB))
-               mathed_char_dim(code2(), size_, sym_->id, ascent_, descent_, width_);
+               mathed_char_dim(code2(), mi_, sym_->id, ascent_, descent_, width_);
        else
-               mathed_string_dim(LM_TC_TEX, size_, sym_->name, ascent_, descent_, width_);
+               mathed_string_dim(LM_TC_TEX, mi_, sym_->name, ascent_, descent_, width_);
 }
 
 
@@ -85,11 +85,11 @@ void MathSymbolInset::draw(Painter & pain, int x, int y) const
        yo(y);
        MathTextCodes Code = code();
        if (sym_->latex_font_id > 0 && math_font_available(Code))
-               drawChar(pain, Code, size_, x, y - h_, sym_->latex_font_id);
+               drawChar(pain, Code, mi_, x, y - h_, sym_->latex_font_id);
        else if (sym_->id > 0 && sym_->id < 255 && math_font_available(LM_TC_SYMB))
-               drawChar(pain, code2(), size_, x, y, sym_->id);
+               drawChar(pain, code2(), mi_, x, y, sym_->id);
        else
-               drawStr(pain, LM_TC_TEX, size_, x, y, sym_->name);
+               drawStr(pain, LM_TC_TEX, mi_, x, y, sym_->name);
 }
 
 
@@ -101,7 +101,7 @@ bool MathSymbolInset::isRelOp() const
 
 bool MathSymbolInset::isScriptable() const
 {
-       return size_.style == LM_ST_DISPLAY && sym_->token == LM_TK_CMEX;
+       return mi_.style == LM_ST_DISPLAY && sym_->token == LM_TK_CMEX;
 }