]> 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 a0249720fa661b7338e27abc1e8a7eb4b66b4dfa..b499b0bcc9c6d79f0981e5e01a0f704f85005409 100644 (file)
 #include "Lexer.h"
 #include "MetricsInfo.h"
 #include "OutputParams.h"
+#include "output_xhtml.h"
 #include "Text.h"
 
 #include "support/debug.h"
+#include "support/docstream.h"
 #include "support/gettext.h"
 #include "support/lassert.h"
 
@@ -47,7 +49,7 @@ int const ADD_TO_VSPACE_WIDTH = 5;
 
 
 InsetVSpace::InsetVSpace(VSpace const & space)
-       : space_(space)
+       : Inset(0), space_(space)
 {}
 
 
@@ -87,10 +89,6 @@ bool InsetVSpace::getStatus(Cursor & cur, FuncRequest const & cmd,
                status.setEnabled(true);
                return true;
        
-       case LFUN_INSET_SETTINGS:
-               status.setEnabled(true);
-               return true;
-
        default:
                return Inset::getStatus(cur, cmd, status);
        }
@@ -237,6 +235,17 @@ int InsetVSpace::docbook(odocstream & os, OutputParams const &) const
 }
 
 
+docstring InsetVSpace::xhtml(XHTMLStream &, OutputParams const &) const
+{
+       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();
+}
+
+
 docstring InsetVSpace::contextMenu(BufferView const &, int, int) const
 {
        return from_ascii("context-vspace");