summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorLászló Németh <nemeth@numbertext.org>2021-02-25 10:55:57 +0100
committerLászló Németh <nemeth@numbertext.org>2021-02-26 09:48:09 +0100
commitd1be3d80d0ca5ccd7639ede379a1befc48dc73f2 (patch)
tree6a329cfca9daefc3d7a28deab24843f17d5f0fa7 /editeng
parent43e306ebe61ef5a849dcfd1e74b697be3b3fe716 (diff)
tdf#134940 sw: fix AutoCorrect of arrow "-->"
Fix bad replacement of "-->" with "–>" instead of "→" (i.e. premature replacement of "--" to n-dash) since '>' was added to IsAutoCorrectChar(). Regression from commit 57f07b1d7378d218648667c5b1315cc8ad905875 "tdf#133524 AutoCorrect: support double angle quotes". Change-Id: I06f0cddb48d13c8e230dab964f79f588799ed4ab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111527 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/misc/svxacorr.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index a551188a4c66..ce1f788f593c 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -1515,7 +1515,10 @@ void SvxAutoCorrect::DoAutoCorrect( SvxAutoCorrDoc& rDoc, const OUString& rTxt,
if( lcl_IsSymbolChar( rCC, rTxt, nCapLttrPos, nInsPos ))
break;
- if( IsAutoCorrFlag( ACFlags::Autocorrect ) )
+ if( IsAutoCorrFlag( ACFlags::Autocorrect ) &&
+ // tdf#134940 fix regression of arrow "-->" resulted by premature
+ // replacement of "--" since '>' was added to IsAutoCorrectChar()
+ '>' != cChar )
{
// WARNING ATTENTION: rTxt is an alias of the text node's OUString
// and becomes INVALID if ChgAutoCorrWord returns true!