X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2FInsetMathSideset.cpp;h=bf3f6cb41af354460919e2b42a007a191122ecf8;hb=d9082639080b9de993742bd352f92e5183058cf5;hp=02ac4badd679b57b164924822eb600a6fbfb450b;hpb=eadc55b8b38a489202e2e168521578dae119fd59;p=lyx.git
diff --git a/src/mathed/InsetMathSideset.cpp b/src/mathed/InsetMathSideset.cpp
index 02ac4badd6..bf3f6cb41a 100644
--- a/src/mathed/InsetMathSideset.cpp
+++ b/src/mathed/InsetMathSideset.cpp
@@ -36,7 +36,7 @@ using namespace std;
namespace {
/// x spacing between the nucleus and the scripts
int const dx = 2;
-}
+} // namespace
namespace lyx {
@@ -62,22 +62,6 @@ Inset * InsetMathSideset::clone() const
}
-bool InsetMathSideset::idxFirst(Cursor & cur) const
-{
- cur.idx() = 0;
- cur.pos() = 0;
- return true;
-}
-
-
-bool InsetMathSideset::idxLast(Cursor & cur) const
-{
- cur.idx() = 0;
- cur.pos() = nuc().size();
- return true;
-}
-
-
int InsetMathSideset::dybt(BufferView const & bv, int asc, int des, bool top) const
{
bool isCharBox = nuc().empty() ? false : isAlphaSymbol(nuc().back());
@@ -210,7 +194,7 @@ void InsetMathSideset::metrics(MetricsInfo & mi, Dimension & dim) const
tr().metrics(mi, dimtr);
}
- BufferView & bv = *mi.base.bv;
+ BufferView const & bv = *mi.base.bv;
// FIXME: data copying... not very efficient.
dim.wid = nwid(bv) + nker(mi.base.bv) + 2 * dx;
@@ -222,14 +206,13 @@ void InsetMathSideset::metrics(MetricsInfo & mi, Dimension & dim) const
int nd = ndes(bv);
int des = dyb(bv) + max(dimbl.descent(), dimbr.descent());
dim.des = max(nd, des);
- metricsMarkers(mi, dim);
}
void InsetMathSideset::draw(PainterInfo & pi, int x, int y) const
{
Changer dummy2 = pi.base.changeEnsureMath();
- BufferView & bv = *pi.base.bv;
+ BufferView const & bv = *pi.base.bv;
nuc().draw(pi, x + dxn(bv), y);
if (!scriptl_)
bl().draw(pi, x , y);
@@ -244,7 +227,6 @@ void InsetMathSideset::draw(PainterInfo & pi, int x, int y) const
br().draw(pi, x + dxr(bv), y + dyb(bv));
tr().draw(pi, x + dxr(bv), y - dyt(bv));
}
- drawMarkers(pi, x, y);
}
@@ -352,7 +334,7 @@ bool InsetMathSideset::idxUpDown(Cursor & cur, bool up) const
}
-void InsetMathSideset::write(WriteStream & os) const
+void InsetMathSideset::write(TeXMathStream & os) const
{
MathEnsurer ensurer(os);
@@ -403,41 +385,41 @@ void InsetMathSideset::normalize(NormalStream & os) const
}
-void InsetMathSideset::mathmlize(MathStream & os) const
+void InsetMathSideset::mathmlize(MathMLStream & ms) const
{
// FIXME This is only accurate if both scriptl_ and scriptr_ are true
if (!scriptl_)
- os << MTag("mrow") << bl() << ETag("mrow");
+ ms << MTag("mrow") << bl() << ETag("mrow");
if (scriptl_ || scriptr_) {
- os << MTag("mmultiscripts");
+ ms << MTag("mmultiscripts");
if (nuc().empty())
- os << "";
+ ms << "<" << from_ascii(ms.namespacedTag("mrow")) << " />";
else
- os << MTag("mrow") << nuc() << ETag("mrow");
+ ms << MTag("mrow") << nuc() << ETag("mrow");
if (br().empty() || !scriptr_)
- os << "";
+ ms << "<" << from_ascii(ms.namespacedTag("none")) << " />";
else
- os << MTag("mrow") << br() << ETag("mrow");
+ ms << MTag("mrow") << br() << ETag("mrow");
if (tr().empty() || !scriptr_)
- os << "";
+ ms << "<" << from_ascii(ms.namespacedTag("none")) << " />";
else
- os << MTag("mrow") << tr() << ETag("mrow");
+ ms << MTag("mrow") << tr() << ETag("mrow");
if (bl().empty() || !scriptl_)
- os << "";
+ ms << "<" << from_ascii(ms.namespacedTag("none")) << " />";
else
- os << MTag("mrow") << bl() << ETag("mrow");
+ ms << MTag("mrow") << bl() << ETag("mrow");
if (tl().empty() || !scriptl_)
- os << "";
+ ms << "<" << from_ascii(ms.namespacedTag("none")) << " />";
else
- os << MTag("mrow") << tl() << ETag("mrow");
+ ms << MTag("mrow") << tl() << ETag("mrow");
- os << ETag("mmultiscripts");
+ ms << ETag("mmultiscripts");
}
if (!scriptr_)
- os << MTag("mrow") << br() << ETag("mrow");
+ ms << MTag("mrow") << br() << ETag("mrow");
}