]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathSpace.cpp
Revert "XHTML: remove DOCTYPE, as the document is then understood as HTML4/XHTML1...
[lyx.git] / src / mathed / InsetMathSpace.cpp
index 88aae1d4a66a85771e783ba88e7aa93b58a561d6..8e764868eb877dba43ec49667e024338318cb788 100644 (file)
@@ -125,7 +125,7 @@ void InsetMathSpace::metrics(MetricsInfo & mi, Dimension & dim) const
        dim.asc = 4;
        dim.des = 0;
        if (space_info[space_].custom)
-               dim.wid = abs(length_.inPixels(mi.base));
+               dim.wid = abs(mi.base.inPixels(length_));
        else
                dim.wid = space_info[space_].width;
 }
@@ -209,7 +209,7 @@ void InsetMathSpace::mathmlize(MathStream & ms) const
                l = ss.str() + "px";
        }
 
-       ms << "<mspace";
+       ms << "<" << from_ascii(ms.namespacedTag("mspace"));
        if (!l.empty())
                ms << " width=\"" << from_ascii(l) << "\"";
        ms << " />";
@@ -320,9 +320,11 @@ void InsetMathSpace::doDispatch(Cursor & cur, FuncRequest & cmd)
        case LFUN_INSET_MODIFY:
                if (cmd.getArg(0) == "mathspace") {
                        MathData ar;
+                       Buffer * buf = buffer_;
                        if (createInsetMath_fromDialogStr(cmd.argument(), ar)) {
                                cur.recordUndo();
                                *this = *ar[0].nucleus()->asSpaceInset();
+                               buffer_ = buf;
                                break;
                        }
                }