+#ifdef __GNUG__
+#pragma implementation
+#endif
+
#include <config.h>
#include "math_exintinset.h"
#include <boost/scoped_ptr.hpp>
-using std::endl;
-
MathExIntInset::MathExIntInset(string const & name)
: MathNestInset(4), symbol_(name)
void MathExIntInset::metrics(MathMetricsInfo &) const
{
- lyxerr << "should not happen" << endl;
+ lyxerr << "should not happen\n";
}
void MathExIntInset::draw(MathPainterInfo &, int, int) const
{
- lyxerr << "should not happen" << endl;
+ lyxerr << "should not happen\n";
}
os << ')';
}
+
+void MathExIntInset::maximize(MaximaStream & os) const
+{
+ if ( symbol_ == "int" )
+ os << "integrate(";
+ else
+ os << symbol_ << '(';
+
+ if (cell(0).size())
+ os << cell(0) << ',';
+ else
+ os << '1' << ',';
+ if (hasScripts())
+ os << cell(1) << ',' << cell(2) << ',' << cell(3) << ')';
+ else
+ os << cell(1) << ')';
+}
+
void MathExIntInset::mathematicize(MathematicaStream & os) const
{
- if ( symbol_ == "int" )
+ if ( symbol_ == "int" )
os << "Integrate[";
- else
- if (symbol_ == "sum")
- os << "Sum[";
- else
- os << symbol_ << '[';
-
+ else if (symbol_ == "sum")
+ os << "Sum[";
+ else
+ os << symbol_ << '[';
+
if (cell(0).size())
os << cell(0) << ',';
else
os << '1' << ',';
if (hasScripts())
os << '{' << cell(1) << ',' << cell(2) << ',' << cell(3) << "}]";
- else
+ else
os << cell(1) << ']';
}
void MathExIntInset::write(WriteStream &) const
{
- lyxerr << "should not happen" << endl;
+ lyxerr << "should not happen\n";
}