diff options
author | László Németh <nemeth@numbertext.org> | 2020-06-02 10:12:27 +0200 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2020-06-02 18:40:38 +0200 |
commit | 967d1ba1f2a3f551c23ba4d9902632a0dc581224 (patch) | |
tree | 31dc57fa7f89b93dc21aa054006ff946fee5213b /editeng | |
parent | da64ec8c8a91db6a6ec9657898f081d5ee67e739 (diff) |
tdf#132301 AutoCorrect: fix ’« in French qu’« word »
instead of using the bad ’" -> ’» autocorrection.
Also limit this for abbreviated single-letter form of
French words ce, de, je, la, le, ne, me, te, se and si.
See commit 8039c9eb27170a162830f0ecd2086010a7a5858f
(tdf#38394 AutoCorrect: fix ’« in French l’« word »).
Change-Id: I1761365d90ae3af3c9ab47a3a82bf0abbe1b32be
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95345
Tested-by: Jenkins
Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/misc/svxacorr.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx index 51fdf5c30746..c776cb45aae7 100644 --- a/editeng/source/misc/svxacorr.cxx +++ b/editeng/source/misc/svxacorr.cxx @@ -1326,7 +1326,13 @@ void SvxAutoCorrect::DoAutoCorrect( SvxAutoCorrDoc& rDoc, const OUString& rTxt, // tdf#38394 use opening quotation mark << in French l'<<word>> if ( !bSingle && !bSttQuote && cPrev == cApostrophe && primary(eLang) == primary(LANGUAGE_FRENCH) && - (nInsPos == 2 || (nInsPos > 2 && IsWordDelim( rTxt[ nInsPos-3 ] ))) ) + ( ( ( nInsPos == 2 || ( nInsPos > 2 && IsWordDelim( rTxt[ nInsPos-3 ] ) ) ) && + // abbreviated form of ce, de, je, la, le, ne, me, te, se or si + OUString("cdjlnmtsCDJLNMTS").indexOf( rTxt[ nInsPos-2 ] ) > -1 ) || + ( ( nInsPos == 3 || (nInsPos > 3 && IsWordDelim( rTxt[ nInsPos-4 ] ) ) ) && + // abbreviated form of que + ( rTxt[ nInsPos-2 ] == 'u' || rTxt[ nInsPos-2 ] == 'U' ) && + ( rTxt[ nInsPos-3 ] == 'q' || rTxt[ nInsPos-3 ] == 'Q' ) ) ) ) { bSttQuote = true; } |