]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathDelim.cpp
Fix bug 5802 (http://bugzilla.lyx.org/show_bug.cgi?id=5802)
[lyx.git] / src / mathed / InsetMathDelim.cpp
index 3580ed683e9e6da94e3c8e97e28cdd695119c0c4..95a172ea64afff055fcef0c0c1463e230f9c4ac5 100644 (file)
@@ -4,7 +4,7 @@
  * Licence details can be found in the file COPYING.
  *
  * \author Alejandro Aguilar Sierra
- * \author André Pönitz
+ * \author André Pönitz
  *
  * Full author contact details are available in file CREDITS.
  */
 #include "MathSupport.h"
 #include "MetricsInfo.h"
 
+#include "support/docstring.h"
+
 #include "frontends/FontMetrics.h"
 
+using namespace std;
 
 namespace lyx {
 
@@ -56,6 +59,7 @@ Inset * InsetMathDelim::clone() const
 
 void InsetMathDelim::write(WriteStream & os) const
 {
+       MathEnsurer ensurer(os);
        os << "\\left" << convertDelimToLatexName(left_) << cell(0)
           << "\\right" << convertDelimToLatexName(right_);
 }
@@ -70,7 +74,6 @@ void InsetMathDelim::normalize(NormalStream & os) const
 
 void InsetMathDelim::metrics(MetricsInfo & mi, Dimension & dim) const
 {
-       using std::max;
        Dimension dim0;
        cell(0).metrics(mi, dim0);
        Dimension t = theFontMetrics(mi.base.font).dimension('I');
@@ -85,8 +88,6 @@ void InsetMathDelim::metrics(MetricsInfo & mi, Dimension & dim) const
        dim.wid = dim0.width() + 2 * dw_ + 8;
        dim.asc = max(a0, d0) + h0;
        dim.des = max(a0, d0) - h0;
-       // Cache the inset dimension. 
-       setDimCache(mi, dim);
 }