X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2FInsetMathUnknown.cpp;h=e79a17c015b289acdb679f7ead9989a1e133d984;hb=6a21ec854b356fbbc89aaf99b2a23e4c3de4aca6;hp=ae6f8ce005eaed85851bfcb2477defbf5b0beefd;hpb=8a0134cc8ce7de41d6d6911a1c4219ca958f2b71;p=lyx.git diff --git a/src/mathed/InsetMathUnknown.cpp b/src/mathed/InsetMathUnknown.cpp index ae6f8ce005..e79a17c015 100644 --- a/src/mathed/InsetMathUnknown.cpp +++ b/src/mathed/InsetMathUnknown.cpp @@ -11,19 +11,22 @@ #include #include "InsetMathUnknown.h" + #include "MathSupport.h" #include "MathAtom.h" #include "MathStream.h" -#include "MathStream.h" + +#include "MetricsInfo.h" #include "frontends/Painter.h" namespace lyx { -InsetMathUnknown::InsetMathUnknown(docstring const & nm, +InsetMathUnknown::InsetMathUnknown(docstring const & name, docstring const & selection, bool final, bool black) - : name_(nm), final_(final), black_(black), selection_(selection) + : name_(name), final_(final), black_(black), kerning_(0), + selection_(selection) {} @@ -47,7 +50,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); } @@ -86,10 +89,15 @@ void InsetMathUnknown::mathematica(MathematicaStream & os) const } -docstring InsetMathUnknown::mathmlize(MathStream & os) const +void InsetMathUnknown::mathmlize(MathStream &) const +{ + throw MathExportException(); +} + + +void InsetMathUnknown::htmlize(HtmlStream &) const { - os << MTag("mi") << name_ << ETag("mi"); - return docstring(); + throw MathExportException(); }