]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathLim.cpp
Fix drawing of empty boxes
[lyx.git] / src / mathed / InsetMathLim.cpp
index 3fdd3b5e8abb530d93d1e6e81be22daff6d0f5b6..9c042beba8cc41c48b5e87fccb59e3c18cadd85f 100644 (file)
@@ -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.
  */
 #include <config.h>
 
 #include "InsetMathLim.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 {
 
-InsetMathLim::InsetMathLim
-       (MathArray const & f, MathArray const & x, MathArray const & x0)
-       : InsetMathNest(3)
+InsetMathLim::InsetMathLim(Buffer * buf, MathData const & f, MathData const & x,
+       MathData const & x0)
+       : InsetMathNest(buf, 3)
 {
        cell(0) = f;
        cell(1) = x;
@@ -32,9 +29,9 @@ InsetMathLim::InsetMathLim
 }
 
 
-auto_ptr<InsetBase> InsetMathLim::doClone() const
+Inset * InsetMathLim::clone() const
 {
-       return auto_ptr<InsetBase>(new InsetMathLim(*this));
+       return new InsetMathLim(*this);
 }
 
 
@@ -44,16 +41,15 @@ void InsetMathLim::normalize(NormalStream & os) const
 }
 
 
-bool InsetMathLim::metrics(MetricsInfo &, Dimension &) const
+void InsetMathLim::metrics(MetricsInfo &, Dimension &) const
 {
-       lyxerr << "should not happen" << endl;
-       return true;
+       LYXERR0("should not happen");
 }
 
 
 void InsetMathLim::draw(PainterInfo &, int, int) const
 {
-       lyxerr << "should not happen" << endl;
+       LYXERR0("should not happen");
 }
 
 
@@ -75,15 +71,9 @@ void InsetMathLim::mathematica(MathematicaStream & os) const
 }
 
 
-void InsetMathLim::mathmlize(MathStream & os) const
-{
-       os << "lim(" << cell(0) << ',' << cell(1) << ',' << cell(2) << ')';
-}
-
-
 void InsetMathLim::write(WriteStream &) const
 {
-       lyxerr << "should not happen" << endl;
+       LYXERR0("should not happen");
 }