]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_exfuncinset.C
Andreas' patch to prevent crash on click on previewd inset
[lyx.git] / src / mathed / math_exfuncinset.C
index 7e8e70eed36d7c65e8ff358e32919904582ec68a..1655e7fd958052f7fab5ed9d3b8dcc607e88a0ff 100644 (file)
@@ -1,10 +1,24 @@
+/**
+ * \file math_exfuncinset.C
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
+ *
+ * \author André Pönitz
+ *
+ * Full author contact details are available in file CREDITS.
+ */
 
 #include <config.h>
 
 #include "math_exfuncinset.h"
-#include "math_support.h"
+#include "math_data.h"
 #include "math_mathmlstream.h"
 #include "math_streamstr.h"
+#include "math_support.h"
+
+
+using std::string;
+using std::auto_ptr;
 
 
 MathExFuncInset::MathExFuncInset(string const & name)
@@ -19,19 +33,19 @@ MathExFuncInset::MathExFuncInset(string const & name, MathArray const & ar)
 }
 
 
-MathInset * MathExFuncInset::clone() const
+auto_ptr<InsetBase> MathExFuncInset::doClone() const
 {
-       return new MathExFuncInset(*this);
+       return auto_ptr<InsetBase>(new MathExFuncInset(*this));
 }
 
 
-void MathExFuncInset::metrics(MathMetricsInfo & mi) const
+void MathExFuncInset::metrics(MetricsInfo & mi, Dimension & /*dim*/) const
 {
        mathed_string_dim(mi.base.font, name_, dim_);
 }
 
 
-void MathExFuncInset::draw(MathPainterInfo & pi, int x, int y) const
+void MathExFuncInset::draw(PainterInfo & pi, int x, int y) const
 {
        drawStrBlack(pi, x, y, name_);
 }
@@ -43,7 +57,7 @@ string MathExFuncInset::name() const
 }
 
 
-void MathExFuncInset::maplize(MapleStream & os) const
+void MathExFuncInset::maple(MapleStream & os) const
 {
        if (name_ == "det")
                os << "linalg[det](" << cell(0) << ')';
@@ -52,7 +66,7 @@ void MathExFuncInset::maplize(MapleStream & os) const
 }
 
 
-void MathExFuncInset::maximize(MaximaStream & os) const
+void MathExFuncInset::maxima(MaximaStream & os) const
 {
        if (name_ == "det")
                os << "determinant(" << cell(0) << ')';
@@ -83,7 +97,7 @@ string asMathematicaName(string const & name)
 }
 
 
-void MathExFuncInset::mathematicize(MathematicaStream & os) const
+void MathExFuncInset::mathematica(MathematicaStream & os) const
 {
        os << asMathematicaName(name_) << '[' << cell(0) << ']';
 }
@@ -95,7 +109,7 @@ void MathExFuncInset::mathmlize(MathMLStream & os) const
 }
 
 
-void MathExFuncInset::octavize(OctaveStream & os) const
+void MathExFuncInset::octave(OctaveStream & os) const
 {
        os << name_ << '(' << cell(0) << ')';
 }