* 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 "InsetMathUnknown.h"
+
#include "MathSupport.h"
#include "MathAtom.h"
#include "MathStream.h"
-#include "MathStream.h"
+#include "MetricsInfo.h"
-namespace lyx {
+#include "frontends/Painter.h"
-InsetMathUnknown::InsetMathUnknown(docstring const & nm, bool final, bool black)
- : name_(nm), final_(final), black_(black)
-{}
+namespace lyx {
-Inset * InsetMathUnknown::clone() const
-{
- return new InsetMathUnknown(*this);
-}
+InsetMathUnknown::InsetMathUnknown(docstring const & nm,
+ docstring const & selection, bool final, bool black)
+ : name_(nm), final_(final), black_(black), kerning_(0),
+ selection_(selection)
+{}
docstring InsetMathUnknown::name() const
}
-bool InsetMathUnknown::metrics(MetricsInfo & mi, Dimension & dim) 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);
- if (dim_ == dim)
- return false;
- dim_ = dim;
- return true;
}
drawStrBlack(pi, x, y, name_);
else
drawStrRed(pi, x, y, name_);
- setPosCache(pi, x, y);
}
}
-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();
}