X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2FInsetMathXYArrow.cpp;h=0cb525c15a0e28b69842dff8dea6d42ec604b850;hb=c9609fe56a2deb40f001503c2fd707c990a2e0e2;hp=38841b9577a18cc895a0c033f5180d315cf7d14e;hpb=f319fdbc2a4c8305d60f176566b818240066cfa9;p=lyx.git diff --git a/src/mathed/InsetMathXYArrow.cpp b/src/mathed/InsetMathXYArrow.cpp index 38841b9577..0cb525c15a 100644 --- a/src/mathed/InsetMathXYArrow.cpp +++ b/src/mathed/InsetMathXYArrow.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. */ @@ -14,15 +14,13 @@ #include "MathStream.h" #include "MathSupport.h" #include "frontends/Painter.h" -#include "debug.h" +#include "support/debug.h" +using namespace std; namespace lyx { -using std::max; - - InsetMathXYArrow::InsetMathXYArrow() : InsetMathNest(2) {} @@ -133,7 +131,7 @@ void InsetMathXYArrow::draw(PainterInfo & pi, int x, int y) const pi.pain.text(x, y, "X"); MathData const & s = sourceCell(); MathData const & t = targetCell(); - pi.pain.line(s.xm(), s.ym(), t.xm(), t.ym(), Color::math); + pi.pain.line(s.xm(), s.ym(), t.xm(), t.ym(), Color_math); cell(1).draw(pi, (s.xm() + t.xm())/2, (s.ym() + t.ym())/2); } @@ -142,10 +140,11 @@ void InsetMathXYArrow::draw(PainterInfo & pi, int x, int y) const void InsetMathXYArrow::write(WriteStream & os) const { + MathEnsurer ensurer(os); os << "\\ar"; - if (cell(0).size()) + if (!cell(0).empty()) os << '[' << cell(0) << ']'; - if (cell(1).size()) + if (!cell(1).empty()) os << (up_ ? '^' : '_') << '{' << cell(1) << '}'; os << " "; } @@ -159,4 +158,15 @@ void InsetMathXYArrow::normalize(NormalStream & os) const } +void InsetMathXYArrow::mathmlize(MathStream &) const +{ + throw MathExportException(); +} + + +void InsetMathXYArrow::htmlize(HtmlStream &) const +{ + throw MathExportException(); +} + } // namespace lyx