]> git.lyx.org Git - features.git/blobdiff - src/mathed/InsetMathHull.C
* src/mathed/InsetMath.C: plaintext(): assert that this
[features.git] / src / mathed / InsetMathHull.C
index 09ac010b2748288b781d01f683ee120797862303..17887b681c5390a42434c05ef9a97a546062b88e 100644 (file)
@@ -1433,7 +1433,7 @@ void InsetMathHull::read(Buffer const &, LyXLex & lex)
 
 
 int InsetMathHull::plaintext(Buffer const &, odocstream & os,
-                       OutputParams const &) const
+                             OutputParams const &) const
 {
        if (0 && display()) {
                Dimension dim;
@@ -1446,15 +1446,19 @@ int InsetMathHull::plaintext(Buffer const &, odocstream & os,
                //metrics();
                return tpain.textheight();
        } else {
-               WriteStream wi(os, false, true);
+               odocstringstream oss;
+               WriteStream wi(oss, false, true);
                wi << cell(0);
-               return wi.line();
+
+               docstring const str = oss.str();
+               os << str;
+               return str.size();
        }
 }
 
 
 int InsetMathHull::docbook(Buffer const & buf, odocstream & os,
-                         OutputParams const & runparams) const
+                           OutputParams const & runparams) const
 {
        MathStream ms(os);
        int res = 0;