editeng/source/editeng/impedit3.cxx |    3 +++
 1 file changed, 3 insertions(+)

New commits:
commit d84c900bb78168dd9bd0fd1ea02c0769a5ba5f14
Author:     Samuel Mehrbrodt <[email protected]>
AuthorDate: Mon Jan 15 16:53:50 2024 +0100
Commit:     Samuel Mehrbrodt <[email protected]>
CommitDate: Fri Apr 26 11:36:35 2024 +0200

    tdf#156955 Properly align text when tabstop is outside of textbox
    
    Co-authored-by: Tibor Nagy <[email protected]>
    
    Change-Id: I9f7ead01d93e0701f8df30ad1dcfe24ef0af7067
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162113
    Tested-by: Jenkins
    Reviewed-by: Samuel Mehrbrodt <[email protected]>

diff --git a/editeng/source/editeng/impedit3.cxx 
b/editeng/source/editeng/impedit3.cxx
index 72bc2022b1ea..c0a8b1fc734c 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -1096,6 +1096,9 @@ bool ImpEditEngine::CreateLines( sal_Int32 nPara, 
sal_uInt32 nStartPosY )
                             aCurrentTab.nTabPortion = nTmpPortion;
                         }
 
+                        if (nMaxLineWidth < aCurrentTab.nTabPos && nTmpWidth 
!= nMaxLineWidth - 1)
+                            aCurrentTab.nTabPos = nMaxLineWidth - 1;
+
                         pPortion->SetKind(PortionKind::TAB);
                         pPortion->SetExtraValue( 
aCurrentTab.aTabStop.GetFill() );
                         pPortion->setWidth( aCurrentTab.nTabPos - 
(nTmpWidth+nStartX) );

Reply via email to