]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathComment.cpp
Fix bug 5802 (http://bugzilla.lyx.org/show_bug.cgi?id=5802)
[lyx.git] / src / mathed / InsetMathComment.cpp
index ca0de54262e6d6b7e4bad023fa39eced24c485cb..f64f3729007c1f7fd7f40164641dd726b1662f94 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 "InsetMathComment.h"
+
 #include "MathData.h"
 #include "MathStream.h"
 #include "MathSupport.h"
-#include "support/std_ostream.h"
-
 
-namespace lyx {
+#include <ostream>
 
-using std::string;
-using std::auto_ptr;
 
+namespace lyx {
 
 InsetMathComment::InsetMathComment()
        : InsetMathNest(1)
@@ -36,20 +34,16 @@ InsetMathComment::InsetMathComment(docstring const & str)
 }
 
 
-auto_ptr<InsetBase> InsetMathComment::doClone() const
+Inset * InsetMathComment::clone() const
 {
-       return auto_ptr<InsetBase>(new InsetMathComment(*this));
+       return new InsetMathComment(*this);
 }
 
 
-bool InsetMathComment::metrics(MetricsInfo & mi, Dimension & dim) const
+void InsetMathComment::metrics(MetricsInfo & mi, Dimension & dim) const
 {
        cell(0).metrics(mi, dim);
        metricsMarkers(dim);
-       if (dim_ == dim)
-               return false;
-       dim_ = dim;
-       return true;
 }