diff options
author | László Németh <nemeth@numbertext.org> | 2019-12-29 12:34:34 +0100 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2019-12-31 12:54:50 +0100 |
commit | a17eca1559d2dc07b88eeb836f794f43ef7ca0ce (patch) | |
tree | 373b2a0b763f47ca47f272e234d2d2c66667af10 /editeng | |
parent | 76afd1e81b5280408de96b220e19840ee7186154 (diff) |
tdf#38394 AutoCorrect: fix ’« in French l’« word »
instead of using the bad ’" -> ’» autocorrection.
Change-Id: I48adbb2e8ca8e786c7835ff186d4580e856cf3c7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85945
Tested-by: Jenkins
Reviewed-by: László Németh <nemeth@numbertext.org>
Tested-by: László Németh <nemeth@numbertext.org>
(cherry picked from commit 8039c9eb27170a162830f0ecd2086010a7a5858f)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85951
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/misc/svxacorr.cxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx index fc89820415a5..b0d163865289 100644 --- a/editeng/source/misc/svxacorr.cxx +++ b/editeng/source/misc/svxacorr.cxx @@ -1287,6 +1287,15 @@ void SvxAutoCorrect::DoAutoCorrect( SvxAutoCorrDoc& rDoc, const OUString& rTxt, lcl_IsInAsciiArr( "([{", cPrev ) || ( cEmDash == cPrev ) || ( cEnDash == cPrev ); + // tdf#38394 use opening quotation mark << in French l'<<word>> + if ( !bSingle && !bSttQuote && cPrev == cApostrophe && + (nInsPos == 2 || (nInsPos > 2 && IsWordDelim( rTxt[ nInsPos-3 ] ))) ) + { + const LanguageType eLang = GetDocLanguage( rDoc, nInsPos ); + if ( primary(eLang) == primary(LANGUAGE_FRENCH) ) + bSttQuote = true; + } + // tdf#108423 for capitalization of English i'm b_iApostrophe = bSingle && ( cPrev == 'i' ) && (( nInsPos == 1 ) || IsWordDelim( rTxt[ nInsPos-2 ] )); } |