#include "MathStream.h"
#include "MathStream.h"
#include "InsetMathSymbol.h"
-#include "debug.h"
+#include "support/debug.h"
-#include <boost/scoped_ptr.hpp>
+#include "support/docstring.h"
namespace lyx {
-
-using std::string;
-using std::auto_ptr;
-using std::endl;
-
-
InsetMathExInt::InsetMathExInt(docstring const & name)
: InsetMathNest(4), symbol_(name)
{}
// 3 - upper
-auto_ptr<InsetBase> InsetMathExInt::doClone() const
+Inset * InsetMathExInt::clone() const
{
- return auto_ptr<InsetBase>(new InsetMathExInt(*this));
+ return new InsetMathExInt(*this);
}
}
-bool InsetMathExInt::metrics(MetricsInfo &, Dimension &) const
+void InsetMathExInt::metrics(MetricsInfo &, Dimension &) const
{
- lyxerr << "should not happen" << endl;
- return true;
+ LYXERR0("should not happen");
}
void InsetMathExInt::draw(PainterInfo &, int, int) const
{
- lyxerr << "should not happen" << endl;
+ LYXERR0("should not happen");
}
void InsetMathExInt::maxima(MaximaStream & os) const
{
- if ( symbol_ == "int" )
+ if (symbol_ == "int")
os << "integrate(";
else
os << symbol_ << '(';
void InsetMathExInt::mathematica(MathematicaStream & os) const
{
- if ( symbol_ == "int" )
+ if (symbol_ == "int")
os << "Integrate[";
else if (symbol_ == "sum")
os << "Sum[";
void InsetMathExInt::mathmlize(MathStream & os) const
{
- boost::scoped_ptr<InsetMathSymbol> sym(new InsetMathSymbol(symbol_));
+ InsetMathSymbol sym(symbol_);
//if (hasScripts())
// mathmlize(sym, os);
//else
- sym->mathmlize(os);
+ sym.mathmlize(os);
os << cell(0) << "<mo> ⁢ </mo>"
<< MTag("mrow") << "<mo> ⅆ </mo>"
<< cell(1) << ETag("mrow");
void InsetMathExInt::write(WriteStream &) const
{
- lyxerr << "should not happen" << endl;
+ LYXERR0("should not happen");
}