]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetVSpace.cpp
Do not output deleted rows columns if show changes in output is false
[lyx.git] / src / insets / InsetVSpace.cpp
index f621172fe2b5ba28475212002d26c7250fbdf6c7..4cdd1ba6edd37dfbdca46ea36db7e0770bbbefc8 100644 (file)
@@ -24,6 +24,7 @@
 #include "MetricsInfo.h"
 #include "OutputParams.h"
 #include "output_xhtml.h"
+#include "texstream.h"
 #include "Text.h"
 
 #include "support/debug.h"
@@ -45,7 +46,7 @@ namespace {
 
 int const ADD_TO_VSPACE_WIDTH = 5;
 
-} // namespace anon
+} // namespace
 
 
 InsetVSpace::InsetVSpace(VSpace const & space)
@@ -90,10 +91,10 @@ bool InsetVSpace::getStatus(Cursor & cur, FuncRequest const & cmd,
                                : "vspace 1" + string(stringFromUnit(Length::defaultUnit()));
                        InsetVSpace::string2params(arg, vspace);
                        status.setOnOff(vspace == space_);
-               } 
+               }
                status.setEnabled(true);
                return true;
-       
+
        default:
                return Inset::getStatus(cur, cmd, status);
        }
@@ -149,8 +150,6 @@ void InsetVSpace::metrics(MetricsInfo & mi, Dimension & dim) const
        dim.asc = height / 2 + (a - d) / 2; // align cursor with the
        dim.des = height - dim.asc;         // label text
        dim.wid = ADD_TO_VSPACE_WIDTH + 2 * vspace_arrow_size + 5 + w;
-       // Cache the inset dimension. 
-       setDimCache(mi, dim);
 }
 
 
@@ -232,14 +231,12 @@ int InsetVSpace::docbook(odocstream & os, OutputParams const &) const
 }
 
 
-docstring InsetVSpace::xhtml(XHTMLStream &, OutputParams const &) const
+docstring InsetVSpace::xhtml(XHTMLStream & os, OutputParams const &) const
 {
-       odocstringstream ods;
-       XHTMLStream xds(ods);
        string const len = space_.asHTMLLength();
        string const attr = "style='height:" + (len.empty() ? "1em" : len) + "'";
-       xds << html::StartTag("div", attr, true) << html::EndTag("div");
-       return ods.str();
+       os << html::StartTag("div", attr, true) << html::EndTag("div");
+       return docstring();
 }