summaryrefslogtreecommitdiffstats
path: root/editeng
diff options
context:
space:
mode:
authorLászló Németh <nemeth@numbertext.org>2020-06-02 10:12:27 +0200
committerAdolfo Jayme Barrientos <fitojb@ubuntu.com>2020-06-05 14:53:44 +0200
commit9bc5e0808c815374d8a56bf0234996f133b19744 (patch)
tree3f9df03c8919a7c8ecc6c3d07b23924a8450afd1 /editeng
parentUpdate git submodules (diff)
downloadcore-9bc5e0808c815374d8a56bf0234996f133b19744.tar.gz
core-9bc5e0808c815374d8a56bf0234996f133b19744.zip
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> (cherry-picked from commit 967d1ba1f2a3f551c23ba4d9902632a0dc581224) Change-Id: I6ebe86dbb51b032f24c7e90cb269b081435ba7d9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95379 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/misc/svxacorr.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index b381b1726f45..07883ec38c50 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -1325,7 +1325,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;
}