]> git.lyx.org Git - features.git/blobdiff - src/mathed/InsetMathFrac.cpp
Introduce a return value for mathmlize(). We will need this to be able
[features.git] / src / mathed / InsetMathFrac.cpp
index 3a1fac12274f6812d54d9318b69fb57296b5808f..3fbd56d8fdfc1bf552538258d4a4455d2a4af2be 100644 (file)
@@ -17,6 +17,7 @@
 #include "Cursor.h"
 #include "LaTeXFeatures.h"
 #include "MathData.h"
+#include "MathExtern.h"
 #include "MathStream.h"
 #include "MathSupport.h"
 #include "MetricsInfo.h"
@@ -384,20 +385,14 @@ void InsetMathFrac::octave(OctaveStream & os) const
 }
 
 
-void InsetMathFrac::mathmlize(MathStream & os) const
+docstring InsetMathFrac::mathmlize(MathStream & os) const
 {
-       switch (kind_) {
-       case DFRAC:
-               os << MTag("mdfrac") << cell(0) << cell(1) << ETag("mdfrac");
-               break;
-       case TFRAC:
-               os << MTag("mtfrac") << cell(0) << cell(1) << ETag("mtfrac");
-               break;
-       case FRAC:
-       default:
-               os << MTag("mfrac") << cell(0) << cell(1) << ETag("mfrac");
-               break;
-       }
+       os << MTag("mfrac") << MTag("mrow");
+       docstring rv = lyx::mathmlize(cell(0), os);
+       os << ETag("mrow") << MTag("mrow");
+       rv += lyx::mathmlize(cell(1), os);
+       os << ETag("mrow") << ETag("mfrac");
+       return rv;
 }
 
 
@@ -541,8 +536,9 @@ void InsetMathBinom::normalize(NormalStream & os) const
 }
 
 
-void InsetMathBinom::mathmlize(MathStream & os) const
+docstring InsetMathBinom::mathmlize(MathStream & os) const
 {
+       // FIXME This all needs fixing
        switch (kind_) {
        case BINOM:
                os << MTag("mbinom") << cell(0) << cell(1) << ETag("mbinom");
@@ -555,6 +551,7 @@ void InsetMathBinom::mathmlize(MathStream & os) const
                os << MTag("mdbinom") << cell(0) << cell(1) << ETag("mdbinom");
                break;
        }
+       return docstring();
 }