X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2FInsetSpace.cpp;h=2a709c4b0edf28c15fb3d070c02fe5b49a16a2b7;hb=cf6ff2cac79d09adafa63e3a1ec02dfb09f707b9;hp=b8cab16fd0ed3f963082aec36bd211c738a30c53;hpb=d3b5260f45d8b65c972f89819113723de96ed5ed;p=lyx.git diff --git a/src/insets/InsetSpace.cpp b/src/insets/InsetSpace.cpp index b8cab16fd0..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); } @@ -831,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"); }