X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2FInsetSpace.cpp;h=2a709c4b0edf28c15fb3d070c02fe5b49a16a2b7;hb=cf6ff2cac79d09adafa63e3a1ec02dfb09f707b9;hp=839ccc917b194e64b7f9912bb22c418744772d0d;hpb=66fa801e74e1775b31008df548332436ce79e2e1;p=lyx.git diff --git a/src/insets/InsetSpace.cpp b/src/insets/InsetSpace.cpp index 839ccc917b..2a709c4b0e 100644 --- a/src/insets/InsetSpace.cpp +++ b/src/insets/InsetSpace.cpp @@ -27,6 +27,7 @@ #include "MetricsInfo.h" #include "OutputParams.h" #include "output_xhtml.h" +#include "texstream.h" #include "support/debug.h" #include "support/docstream.h" @@ -200,9 +201,10 @@ int const arrow_size = 8; void InsetSpace::metrics(MetricsInfo & mi, Dimension & dim) const { if (isHfill()) { - // The metrics for this kinds are calculated externally in - // \c TextMetrics::computeRowMetrics. Those are dummy value: - dim = Dimension(10, 10, 10); + // The width for hfills is calculated externally in + // TextMetrics::computeRowMetrics. The value of 5 is the + // minimal value when the hfill is not active. + dim = Dimension(5, 10, 10); return; } @@ -258,8 +260,6 @@ void InsetSpace::metrics(MetricsInfo & mi, Dimension & dim) const // shut up compiler break; } - // Cache the inset dimension. - setDimCache(mi, dim); } @@ -387,7 +387,6 @@ void InsetSpace::draw(PainterInfo & pi, int x, int y) const void InsetSpaceParams::write(ostream & os) const { - string command; switch (kind) { case InsetSpaceParams::NORMAL: os << "\\space{}"; @@ -832,7 +831,7 @@ docstring InsetSpace::xhtml(XHTMLStream & xs, OutputParams const &) const void InsetSpace::validate(LaTeXFeatures & features) const { if (params_.kind == InsetSpaceParams::NEGMEDIUM || - params_.kind == InsetSpaceParams::NEGTHICK) + params_.kind == InsetSpaceParams::NEGTHICK) features.require("amsmath"); } @@ -845,7 +844,7 @@ void InsetSpace::toString(odocstream & os) const } -void InsetSpace::forOutliner(docstring & os, size_t) const +void InsetSpace::forOutliner(docstring & os, size_t const, bool const) const { // There's no need to be cute here. os += " ";