summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorLászló Németh <nemeth@numbertext.org>2023-12-08 08:13:42 +0100
committerLászló Németh <nemeth@numbertext.org>2023-12-08 15:21:33 +0100
commit326660093c903427285cfebaef12ecab1236b2db (patch)
treeae89675bb509b5812056d57de36e60e68fca1d7b /editeng
parent08444c707133bac7f5581fe6b6da3cc7eea656fc (diff)
tdf#129357 editeng: show soft hyphen in text boxes and shapes
Shapes and text boxes didn't show the optional hyphen at line break. Change-Id: I5cc842964fc91571e5c55995981de697da966b14 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160453 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'editeng')
-rw-r--r--editeng/inc/editattr.hxx1
-rw-r--r--editeng/source/editeng/impedit3.cxx4
2 files changed, 5 insertions, 0 deletions
diff --git a/editeng/inc/editattr.hxx b/editeng/inc/editattr.hxx
index bb609ac1e996..3a619a5e85b8 100644
--- a/editeng/inc/editattr.hxx
+++ b/editeng/inc/editattr.hxx
@@ -54,6 +54,7 @@ class SfxGrabBagItem;
#define CH_FEATURE_OLD (sal_uInt8) 0xFF
#define CH_FEATURE u'\x0001'
+#define CH_SOFTHYPHEN u'\x00AD'
// DEF_METRIC: For my pool, the DefMetric should always appear when
// GetMetric (nWhich)!
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index 7402487120e1..b24cc004011c 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -1975,6 +1975,10 @@ void ImpEditEngine::ImpBreakLine( ParaPortion* pParaPortion, EditLine* pLine, Te
i18n::LineBreakResults aLBR = _xBI->getLineBreak(
pNode->GetString(), nMaxBreakPos, aLocale, nMinBreakPos, aHyphOptions, aUserOptions );
nBreakPos = aLBR.breakIndex;
+
+ // show soft hyphen
+ if ( nBreakPos && CH_SOFTHYPHEN == pNode->GetString()[ sal_Int32(nBreakPos) - 1 ] )
+ bHyphenated = true;
}
else
{