summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>2024-01-15 16:53:50 +0100
committerSamuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>2024-04-26 11:36:35 +0200
commitd84c900bb78168dd9bd0fd1ea02c0769a5ba5f14 (patch)
treed569e0d5aba38ec84a4d6022b6f16c102e38fb6d
parentFail early when external tarball can't be fetched (diff)
downloadcore-d84c900bb78168dd9bd0fd1ea02c0769a5ba5f14.tar.gz
core-d84c900bb78168dd9bd0fd1ea02c0769a5ba5f14.zip
tdf#156955 Properly align text when tabstop is outside of textbox
Co-authored-by: Tibor Nagy <tibor.nagy.extern@allotropia.de> Change-Id: I9f7ead01d93e0701f8df30ad1dcfe24ef0af7067 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162113 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
-rw-r--r--editeng/source/editeng/impedit3.cxx3
1 files changed, 3 insertions, 0 deletions
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) );