]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_exintinset.C
try to fix rounding errors
[lyx.git] / src / mathed / math_exintinset.C
index ba21ff6dca3667e069c4476981ad6eaa0783ebda..e26a74e6b69890d8e0a40749839bafab48e96e19 100644 (file)
@@ -7,6 +7,8 @@
 #include "math_symbolinset.h"
 #include "debug.h"
 
+#include <boost/scoped_ptr.hpp>
+
 using std::endl;
 
 
@@ -42,19 +44,19 @@ bool MathExIntInset::hasScripts() const
 
 void MathExIntInset::normalize(NormalStream & os) const
 {
-       os << '[' << symbol_ << ' ' << cell(0) << ' ' << cell(1) << ' ' 
+       os << '[' << symbol_ << ' ' << cell(0) << ' ' << cell(1) << ' '
           << cell(2) << ' ' << cell(3) << ']';
 }
 
 
-void MathExIntInset::metrics(MathMetricsInfo const &) const
+void MathExIntInset::metrics(MathMetricsInfo &) const
 {
        lyxerr << "should not happen" << endl;
 }
 
 
-void MathExIntInset::draw(Painter &, int, int) const
-{  
+void MathExIntInset::draw(MathPainterInfo &, int, int) const
+{
        lyxerr << "should not happen" << endl;
 }
 
@@ -64,7 +66,7 @@ void MathExIntInset::maplize(MapleStream & os) const
        os << symbol_ << '(';
        if (cell(0).size())
                os << cell(0);
-       else 
+       else
                os << '1';
        os << ',' << cell(1);
        if (hasScripts())
@@ -75,12 +77,11 @@ void MathExIntInset::maplize(MapleStream & os) const
 
 void MathExIntInset::mathmlize(MathMLStream & os) const
 {
-       MathSymbolInset * sym = new MathSymbolInset(symbol_);
+       boost::scoped_ptr<MathSymbolInset> sym(new MathSymbolInset(symbol_));
        //if (hasScripts())
        //      mathmlize(sym, os);
-       //else 
+       //else
                sym->mathmlize(os);
-       delete sym;
        os << cell(0) << "<mo> &InvisibleTimes; </mo>"
           << MTag("mrow") << "<mo> &DifferentialD; </mo>"
           << cell(1) << ETag("mrow");
@@ -91,4 +92,3 @@ void MathExIntInset::write(WriteStream &) const
 {
        lyxerr << "should not happen" << endl;
 }
-