]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/MathFactory.cpp
Small improvement for bug #7509 as suggested by JMarc
[lyx.git] / src / mathed / MathFactory.cpp
index 913c44ce7d6b52d69c9f2f45113d889a198329fb..f8b9185028a3b644d493da25fd927c2ee482604c 100644 (file)
@@ -528,11 +528,13 @@ bool createInsetMath_fromDialogStr(docstring const & str, MathData & ar)
                InsetSpaceParams isp(true);
                InsetSpace::string2params(to_utf8(str), isp);
                InsetSpace is(isp);
-               odocstringstream os;
+               TexRow texrow;
+               odocstringstream ods;
+               otexstream os(ods, texrow);
                Encoding const * const ascii = encodings.fromLyXName("ascii");
                OutputParams op(ascii);
                is.latex(os, op);
-               mathed_parse_cell(ar, os.str());
+               mathed_parse_cell(ar, ods.str());
                if (ar.size() == 2) {
                        // remove "{}"
                        if (ar[1].nucleus()->asBraceInset())