sw/source/core/txtnode/fntcache.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 5975554699121046fe21bd376b2922b347fc94fd
Author:     Caolán McNamara <[email protected]>
AuthorDate: Fri Mar 6 19:20:27 2026 +0000
Commit:     Caolán McNamara <[email protected]>
CommitDate: Sat Mar 7 20:32:41 2026 +0100

    crashtesting: assert in SwTextGuess::Guess
    
    new break position result is before start index of text to break
    
    presumably since:
    
    commit 0d28097fadf44ed58cb5e3e9b9c04a65a7a33fd6
    Date:   Tue Sep 22 16:37:22 2020 +0200
    
        tdf#136588 sw: fix line break regression with small caps
    
    There are tests for
    SwLayoutWriter::TestTdf136588
    and
    SwLayoutWriter6::testTdf112290
    that continue to work after this fix.
    
    I think 1 worked because rInf.GetIdx was 1 in the testcases.
    
    Change-Id: I7208cff9fa5782b6a5b640c3133d093e487d8d52
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201155
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <[email protected]>

diff --git a/sw/source/core/txtnode/fntcache.cxx 
b/sw/source/core/txtnode/fntcache.cxx
index f0b14aa01118..0e04f48cfe5f 100644
--- a/sw/source/core/txtnode/fntcache.cxx
+++ b/sw/source/core/txtnode/fntcache.cxx
@@ -2300,7 +2300,7 @@ TextFrameIndex SwFont::GetTextBreak(SwDrawTextInfo const 
& rInf, tools::Long nTe
     if (GetCaseMap() == SvxCaseMap::SmallCaps && 
TextFrameIndex(COMPLETE_STRING) == nTextBreak2 &&
         ! bCompress && nTextWidth == 0)
         // If nTextWidth == 0 means the line is full, we have to break it
-        nTextBreak2 = TextFrameIndex(1);
+        nTextBreak2 = rInf.GetIdx();
 
     if ( ! bCompress )
         return nTextBreak2;

Reply via email to