Take right margin into account for text inset width

This is particularly important for contents in RtL languages, where
the right margin may contain the paragraph indentation, or
itemize/enumeration symbols.

Fixes bug #12030.

(cherry picked from commit 875b1def4f)
This commit is contained in:
Jean-Marc Lasgouttes 2020-11-17 17:47:22 +01:00
parent 326eab3408
commit 20c8959790
2 changed files with 3 additions and 1 deletions

View File

@ -490,7 +490,7 @@ bool TextMetrics::redoParagraph(pit_type const pit)
first = row.endpos();
++row_index;
pm.dim().wid = max(pm.dim().wid, row.width());
pm.dim().wid = max(pm.dim().wid, row.width() + row.right_margin);
pm.dim().des += row.height();
} while (first < par.size() || need_new_row);

View File

@ -64,6 +64,8 @@ What's new
- Fix width of collapsible insets with sublabels (bug 12046).
- Fix Hebrew characters overflow in insets (bug 12030).
* INTERNALS