]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathExFunc.cpp
revert last patch. there's something wrong, possibly unrelated to this
[lyx.git] / src / mathed / InsetMathExFunc.cpp
index 1ab74b0eddc9b9ae591028618fdd8901d9a73787..9a871f49d40c4fcd86e9c8261a6db9eed63c4c71 100644 (file)
 #include <config.h>
 
 #include "InsetMathExFunc.h"
+
 #include "MathData.h"
 #include "MathStream.h"
-#include "MathStream.h"
 #include "MathSupport.h"
+#include "MetricsInfo.h"
 
+#include "support/docstream.h"
 
-namespace lyx {
+using namespace std;
 
-using std::string;
+namespace lyx {
 
 
 InsetMathExFunc::InsetMathExFunc(docstring const & name)
@@ -40,13 +42,9 @@ Inset * InsetMathExFunc::clone() const
 }
 
 
-bool InsetMathExFunc::metrics(MetricsInfo & mi, Dimension & dim) const
+void InsetMathExFunc::metrics(MetricsInfo & mi, Dimension & dim) const
 {
        mathed_string_dim(mi.base.font, name_, dim);
-       if (dim_ == dim)
-               return false;
-       dim_ = dim;
-       return true;
 }
 
 
@@ -126,7 +124,9 @@ void InsetMathExFunc::mathematica(MathematicaStream & os) const
 
 void InsetMathExFunc::mathmlize(MathStream & os) const
 {
-       os << MTag(name_.c_str()) << cell(0) << ETag(name_.c_str());
+       ++os.tab(); os.cr(); os.os() << '<' << name_ << '>';
+       os << cell(0);
+       os.cr(); --os.tab(); os.os() << "</" << name_ << '>';
 }