summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorOliver Specht <oliver.specht@cib.de>2024-02-20 15:38:36 +0100
committerAndras Timar <andras.timar@collabora.com>2024-03-07 13:54:18 +0100
commit1c4a874de4c54613f663b6afcc285189232e50bb (patch)
tree8698477f636ce9e7ed134d662f8b4f9357b819b0 /editeng
parent5e2e6b44e2496977397ca79b1599d07ffc4a969f (diff)
tdf#159797 replace dash also between sentences
Autocorrection replaces " - " with " <enDash/emDash> " also after dot, question mark and exclamation mark. Change-Id: Iad4b6c6073ab90b0c86514b8683dd2a07197f59d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163659 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de> (cherry picked from commit 95017739a05c4f515fc42caebfd1e01e8a9ba160) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163625 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/misc/svxacorr.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index ff2c4518aadd..676959d43dbe 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -614,7 +614,7 @@ bool SvxAutoCorrect::FnChgToEnEmDash(
sImplEndSkipChars,(cCh = rTxt[ --n ])); )
;
// found: "[A-z0-9][<AnyEndChars>] - [<AnySttChars>][A-z0-9]
- if( rCC.isLetterNumeric( OUString(cCh) ))
+ if (rCC.isLetterNumeric(OUString(cCh)) || lcl_IsInArr(u".!?", cCh))
{
rDoc.Delete( nTmpPos, nTmpPos + nLen );
rDoc.Insert( nTmpPos, bAlwaysUseEmDash ? sEmDash : sEnDash );