Am 15.03.2008 um 19:28 schrieb Jürgen Spitzmüller:

Juergen Spitzmueller wrote:
It is basically complete and already works. The feature is a dialog for InsetSpace similar to our VSpace dialog (bug 2078), which also merges HFill
into InsetSpace (thus lets you switch between the diverse spaces and
hfill). The boni are: support for \hspace and \hspace* (bug 2075), \dotfill
and \hrulefill. Furthermore, it fixes bug 4555 (hfill drawing).

The remaining problems are: one specific lyx2lyx reversion problem and some metrics problems (all non-fill spaces are drawn in the same width). I think these are trivial, I just need some time. I'll try to finish it at the
weekend.

Here's the patch. Lyx2lyx works now, the metrics problem remains, and I'm
stuck with that. Maybe someone has an idea.

Otherwise, objections?

Yes, I don't think the following is what you want to do. The loop will set basically every inset to width 5.

diff --git a/src/TextMetrics.cpp b/src/TextMetrics.cpp
index 73e50a8..d728d77 100644
--- a/src/TextMetrics.cpp
+++ b/src/TextMetrics.cpp
@@ -626,7 +626,8 @@ void TextMetrics::computeRowMetrics(pit_type const pit,
        InsetList::const_iterator iend = par.insetList().end();
        for ( ; ii != iend; ++ii) {
                if (ii->pos >= endpos || ii->pos < row.pos()
-                       || ii->inset->lyxCode() != HFILL_CODE)
+                       || (ii->inset->lyxCode() != SPACE_CODE &&
+                           ii->inset->isStretchableSpace()))
                        continue;
                Dimension dim = row.dimension();
                if (pm.hfillExpansion(row, ii->pos))

Stefan

Reply via email to