]> git.lyx.org Git - features.git/commitdiff
Get MathML output for InsetMathDots working.
authorRichard Heck <rgheck@comcast.net>
Fri, 25 Dec 2009 21:42:07 +0000 (21:42 +0000)
committerRichard Heck <rgheck@comcast.net>
Fri, 25 Dec 2009 21:42:07 +0000 (21:42 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32633 a592a061-630c-0410-9148-cb99ea01b6c8

src/mathed/InsetMathDots.cpp

index 583fdecbf70152f4d257508c6b9b5c24b8ccfeca..45d2378550b8e4e5d07d4ca3b33ca026291e2808 100644 (file)
@@ -20,7 +20,7 @@
 #include "MetricsInfo.h"
 
 #include "frontends/FontMetrics.h"
-
+#include "support/lassert.h"
 
 namespace lyx {
 
@@ -85,10 +85,27 @@ void InsetMathDots::validate(LaTeXFeatures & features) const
 }
 
 
-// FIXME XHTML
 void InsetMathDots::mathmlize(MathStream & os) const
 {
-       InsetMath::mathmlize(os);
+       // which symbols we support is decided by what is listed in
+       // lib/symbols as generating a dots inset
+       docstring const & n = key_->name;
+       std::string ent;
+       if (n == "dots" || n == "dotsc" || n == "dotso" || n == "ldots")
+               ent = "&hellip;";
+       else if (n == "adots")
+               ent = "&utdot;";
+       else if (n == "cdots" || n == "dotsb" || n == "dotsi" || n == "dotsm")
+               ent = "&ctdot;";
+       else if (n == "ddots")
+               ent = "&dtdot;";
+       else if (n == "iddots")
+               ent = "&utdot;";
+       else if (n == "vdots")
+               ent = "&vellip;";
+       else
+               LASSERT(false, ent = "&hellip;");
+       os << from_ascii(ent);
 }
 
 } // namespace lyx