X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2FInsetMathNumber.cpp;h=5237cebab65a95747b5a67c1489950ee0e133ae7;hb=bc54a55491a0b6eab5179235496773410657782f;hp=0a56cb01e909ddfe3f21f09f871d9ecba25d4a05;hpb=f497296c30e6da2f97b16da8ad1c9e96feffb16b;p=lyx.git diff --git a/src/mathed/InsetMathNumber.cpp b/src/mathed/InsetMathNumber.cpp index 0a56cb01e9..5237cebab6 100644 --- a/src/mathed/InsetMathNumber.cpp +++ b/src/mathed/InsetMathNumber.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. */ @@ -15,31 +15,27 @@ #include "MathStream.h" #include "MathSupport.h" +#include "MetricsInfo.h" + +using namespace std; -namespace lyx { -using std::string; -using std::auto_ptr; -using std::vector; +namespace lyx { InsetMathNumber::InsetMathNumber(docstring const & s) : str_(s) {} -auto_ptr InsetMathNumber::doClone() const +Inset * InsetMathNumber::clone() const { - return auto_ptr(new InsetMathNumber(*this)); + return new InsetMathNumber(*this); } -bool InsetMathNumber::metrics(MetricsInfo & mi, Dimension & dim) const +void InsetMathNumber::metrics(MetricsInfo & mi, Dimension & dim) const { mathed_string_dim(mi.base.font, str_, dim); - if (dim_ == dim) - return false; - dim_ = dim; - return true; } @@ -75,7 +71,13 @@ void InsetMathNumber::octave(OctaveStream & os) const void InsetMathNumber::mathmlize(MathStream & os) const { - os << " " << str_ << " "; + os << "" << str_ << ""; +} + + +void InsetMathNumber::htmlize(HtmlStream & os) const +{ + os << str_; }