]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetVSpace.cpp
Routines for calculating numerical labels for BibTeX citations.
[lyx.git] / src / insets / InsetVSpace.cpp
index d1e5a19660756125ec672ec1ed8bb77794815fe9..b499b0bcc9c6d79f0981e5e01a0f704f85005409 100644 (file)
@@ -27,6 +27,7 @@
 #include "Text.h"
 
 #include "support/debug.h"
+#include "support/docstream.h"
 #include "support/gettext.h"
 #include "support/lassert.h"
 
@@ -234,17 +235,14 @@ int InsetVSpace::docbook(odocstream & os, OutputParams const &) const
 }
 
 
-docstring InsetVSpace::xhtml(XHTMLStream & xs, OutputParams const &) const
+docstring InsetVSpace::xhtml(XHTMLStream &, OutputParams const &) const
 {
-       string len = space_.asHTMLLength();
-       if (len.empty())
-               // we didn't understand it
-               xs << CompTag("br");
-       else {
-               string const attr = "style='height:" + len + "'";
-               xs << StartTag("div", attr, true) << EndTag("div");
-       }
-       return docstring();
+       odocstringstream ods;
+       XHTMLStream xds(ods);
+       string const len = space_.asHTMLLength();
+       string const attr = "style='height:" + (len.empty() ? "1em" : len) + "'";
+       xds << StartTag("div", attr, true) << EndTag("div");
+       return ods.str();
 }