X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2FInsetMathUnknown.cpp;h=29dae2b971ee27f588f4be2a6a18b713448923e5;hb=efaae780dbbe3685e26e040ed4255e5abf268106;hp=41baefc92c1b54e974c96519593deb6a407bf721;hpb=237c132c1e6fc720b87f2fea6deb18a8395cbe0a;p=lyx.git diff --git a/src/mathed/InsetMathUnknown.cpp b/src/mathed/InsetMathUnknown.cpp index 41baefc92c..29dae2b971 100644 --- a/src/mathed/InsetMathUnknown.cpp +++ b/src/mathed/InsetMathUnknown.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. */ @@ -16,20 +16,17 @@ #include "MathStream.h" #include "MathStream.h" +#include "frontends/Painter.h" + namespace lyx { -InsetMathUnknown::InsetMathUnknown(docstring const & nm, bool final, bool black) - : name_(nm), final_(final), black_(black) +InsetMathUnknown::InsetMathUnknown(docstring const & nm, + docstring const & selection, bool final, bool black) + : name_(nm), final_(final), black_(black), selection_(selection) {} -Inset * InsetMathUnknown::clone() const -{ - return new InsetMathUnknown(*this); -} - - docstring InsetMathUnknown::name() const { return name_; @@ -50,7 +47,7 @@ void InsetMathUnknown::normalize(NormalStream & os) const void InsetMathUnknown::metrics(MetricsInfo & mi, Dimension & dim) const { - mathed_string_dim(mi.base.font, name_, dim); + metricsStrRedBlack(mi, dim, name_); docstring::const_reverse_iterator rit = name_.rbegin(); kerning_ = mathed_char_kerning(mi.base.font, *rit); } @@ -62,7 +59,6 @@ void InsetMathUnknown::draw(PainterInfo & pi, int x, int y) const drawStrBlack(pi, x, y, name_); else drawStrRed(pi, x, y, name_); - setPosCache(pi, x, y); } @@ -90,9 +86,15 @@ void InsetMathUnknown::mathematica(MathematicaStream & os) const } -void InsetMathUnknown::mathmlize(MathStream & os) const +void InsetMathUnknown::mathmlize(MathStream &) const +{ + throw MathExportException(); +} + + +void InsetMathUnknown::htmlize(HtmlStream &) const { - os << MTag("mi") << name_ << ETag("mi"); + throw MathExportException(); }