]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_macroarg.C
split inset -> inset + updatableinset
[lyx.git] / src / mathed / math_macroarg.C
index 0430a41d3d077481c1316b37a6415d5fd272efd2..09b28d1a67ad26c2198e7bf042d0bc96eb1bde03 100644 (file)
@@ -1,6 +1,3 @@
-#ifdef __GNUG__
-#pragma implementation
-#endif
 
 #include "math_macroarg.h"
 #include "math_macro.h"
@@ -39,21 +36,17 @@ void MathMacroArgument::write(WriteStream & os) const
 
 void MathMacroArgument::metrics(MathMetricsInfo & mi) const
 {
-       if (expanded_) {
-               xcell(0).metrics(mi);
-               width_   = xcell(0).width();
-               ascent_  = xcell(0).ascent();
-               descent_ = xcell(0).descent();
-       } else {
-               mathed_string_dim(mi.base.font, str_, ascent_, descent_, width_);
-       }
+       if (expanded_)
+               dim_ = cell(0).metrics(mi);
+       else
+               mathed_string_dim(mi.base.font, str_, dim_);
 }
 
 
 void MathMacroArgument::draw(MathPainterInfo & pi, int x, int y) const
 {
        if (expanded_)
-               xcell(0).draw(pi, x, y);
+               cell(0).draw(pi, x, y);
        else
                drawStrRed(pi, x, y, str_);
 }