X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2FInsetMathDiff.cpp;h=ffc3bedb4ea5ef5e740731fb904bd0af024f93d0;hb=d9082639080b9de993742bd352f92e5183058cf5;hp=61b87a36c8b752f632261f2f08830c224bf624b1;hpb=6e3a75969b97a5db4c80c46be49d4deb122abfe7;p=lyx.git diff --git a/src/mathed/InsetMathDiff.cpp b/src/mathed/InsetMathDiff.cpp index 61b87a36c8..ffc3bedb4e 100644 --- a/src/mathed/InsetMathDiff.cpp +++ b/src/mathed/InsetMathDiff.cpp @@ -3,7 +3,7 @@ * This file is part of LyX, the document processor. * Licence details can be found in the file COPYING. * - * \author André Pönitz + * \author André Pönitz * * Full author contact details are available in file CREDITS. */ @@ -11,29 +11,26 @@ #include #include "InsetMathDiff.h" -#include "MathArray.h" +#include "MathData.h" #include "MathStream.h" -#include "debug.h" +#include "support/debug.h" -namespace lyx { - -using std::auto_ptr; -using std::endl; +namespace lyx { -InsetMathDiff::InsetMathDiff() - : InsetMathNest(1) +InsetMathDiff::InsetMathDiff(Buffer * buf) + : InsetMathNest(buf, 1) {} -auto_ptr InsetMathDiff::doClone() const +Inset * InsetMathDiff::clone() const { - return auto_ptr(new InsetMathDiff(*this)); + return new InsetMathDiff(*this); } -void InsetMathDiff::addDer(MathArray const & der) +void InsetMathDiff::addDer(MathData const & der) { cells_.push_back(der); } @@ -48,16 +45,15 @@ void InsetMathDiff::normalize(NormalStream & os) const } -bool InsetMathDiff::metrics(MetricsInfo &, Dimension &) const +void InsetMathDiff::metrics(MetricsInfo &, Dimension &) const { - lyxerr << "should not happen" << endl; - return true; + LYXERR0("should not happen"); } void InsetMathDiff::draw(PainterInfo &, int, int) const { - lyxerr << "should not happen" << endl; + LYXERR0("should not happen"); } @@ -99,21 +95,9 @@ void InsetMathDiff::mathematica(MathematicaStream & os) const } -void InsetMathDiff::mathmlize(MathStream & os) const -{ - os << "diff("; - for (idx_type idx = 0; idx < nargs(); ++idx) { - if (idx != 0) - os << ','; - os << cell(idx); - } - os << ')'; -} - - -void InsetMathDiff::write(WriteStream &) const +void InsetMathDiff::write(TeXMathStream &) const { - lyxerr << "should not happen" << endl; + LYXERR0("should not happen"); }