On Sat, Jan 22, 2022 at 09:43:15PM +0100, Pavel Sanda wrote:
> lyx::TextMetrics::redoParagraph:522 pm.rows() = breakParagraph(bigrow); -> 
> step into
> lyx::TextMetrics::breakParagraph:1136 tail = rb.shortenIfNeeded(width, 
> next_width); -> step into
> lyx::Row::shortenIfNeeded:640 if (cit->splitAt(w - wid, next_width, true, 
> tail)) {
> 
> ... (equivalently 4x cont on  Row.cpp:640 breakpoint and then step in)
> 
> Thread 1 "lyx" hit Breakpoint 5, lyx::Row::shortenIfNeeded 
> (this=0x5555588a7ae0, w=569, next_width=203) at Row.cpp:640
> 640             if (cit->splitAt(w - wid, next_width, true, tail)) {


Biset leads to:
commit d723b90344c0e56b26fc69aa00cb3001e074a723
Author: Jean-Marc Lasgouttes <lasgout...@lyx.org>
Date:   Mon Sep 6 14:52:42 2021 +0200

    Break multi-row strings in one pass
    
    Replace FontMetrics::breakAt, which returned the next break point,
    with FontMetrics::breakString, which returns a vector of break points.
    To this end, an additional parameter gives the available width for
    next rows.
    
    Rename various variables and methods accordingly. Factor the code in
    breakString_helper to be more manageable.
    
    Adapt Row::Element::splitAt to return a bool on sucess and provide
    remaining row elements in a vector. The width noted above has been
    added as parameters.
    
    Rename the helper function splitFrom to moveElements and rewrite the
    code to be more efficient.
    
    Remove type of row element INVALID, which is not needed anymore.
    
    The code in TextMetrics::breakParagraph is now much simpler.
    
    In Row::finalize, remove the code that computed inconditionnally the
    current element size, and make sure that this width will be computed
    in all code paths of Row::Element::splitAt.

Pavel
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel

Reply via email to