]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathExFunc.cpp
Paint \dot & \ddot more like a dot
[lyx.git] / src / mathed / InsetMathExFunc.cpp
index 360f1c17ef82299412212991b192fde51b754992..e4e1f10c2e2b8daa099bcb490185c58828f1a798 100644 (file)
@@ -3,7 +3,7 @@
  * This file is part of LyX, the document processor.
  * Licence details can be found in the file COPYING.
  *
- * \author André Pönitz
+ * \author André Pönitz
  *
  * Full author contact details are available in file CREDITS.
  */
 
 #include "support/docstream.h"
 
+using namespace std;
 
 namespace lyx {
 
-using std::string;
 
-
-InsetMathExFunc::InsetMathExFunc(docstring const & name)
-       : InsetMathNest(1), name_(name)
+InsetMathExFunc::InsetMathExFunc(Buffer * buf, docstring const & name)
+       : InsetMathNest(buf, 1), name_(name)
 {}
 
 
-InsetMathExFunc::InsetMathExFunc(docstring const & name, MathData const & ar)
-       : InsetMathNest(1), name_(name)
+InsetMathExFunc::InsetMathExFunc(Buffer * buf, docstring const & name, MathData const & ar)
+       : InsetMathNest(buf, 1), name_(name)
 {
        cell(0) = ar;
 }
@@ -45,9 +44,7 @@ Inset * InsetMathExFunc::clone() const
 
 void InsetMathExFunc::metrics(MetricsInfo & mi, Dimension & dim) const
 {
-       mathed_string_dim(mi.base.font, name_, dim);
-       // Cache the inset dimension. 
-       setDimCache(mi, dim);
+       metricsStrRedBlack(mi, dim, name_);
 }
 
 
@@ -127,9 +124,14 @@ void InsetMathExFunc::mathematica(MathematicaStream & os) const
 
 void InsetMathExFunc::mathmlize(MathStream & os) const
 {
-       ++os.tab(); os.cr(); os.os() << '<' << name_ << '>';
+       os << "<mi>" << name_ << "</mi><mo>&af;</mo>";
        os << cell(0);
-       os.cr(); --os.tab(); os.os() << "</" << name_ << '>';
+}
+
+
+void InsetMathExFunc::htmlize(HtmlStream & os) const
+{
+       os << name_ << cell(0);
 }