summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorLászló Németh <nemeth@numbertext.org>2019-12-25 18:07:11 +0100
committerLászló Németh <nemeth@numbertext.org>2019-12-29 12:47:23 +0100
commit30d5b303f0dd300e200c1316feeef4a0ba022b04 (patch)
treed81e6a6d1bc2628fc6c5773ff6892dcad76121a1 /editeng
parentc8e88aee3c058c57c96760cfb07a2330639cbc72 (diff)
tdf#54409 fix AutoCorrect with Unicode quotation marks
Now single or double typographical quotation marks don't break automatic correction of the quoted words. For example, ‘acn -> ‘can, acn’ -> can’, “acn” -> “can”. Change-Id: I7f895414be4c3bbc9a3914df83d93cf28b4311a3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85812 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org> (cherry picked from commit 0d52da4637b563c175cd21d04a639160441436ef) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85930 Tested-by: Jenkins
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/misc/svxacorr.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index 1e5006d90484..fc89820415a5 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -177,6 +177,10 @@ static bool lcl_IsSymbolChar( CharClass const & rCC, const OUString& rTxt,
static bool lcl_IsInAsciiArr( const sal_Char* pArr, const sal_Unicode c )
{
+ // tdf#54409 check also typographical quotation marks in the case of skipped ASCII quotation marks
+ if ( 0x2018 <= c && c <= 0x201F && (pArr == sImplSttSkipChars || pArr == sImplEndSkipChars) )
+ return true;
+
bool bRet = false;
for( ; *pArr; ++pArr )
if( *pArr == c )