diff options
author | Laurent Balland-Poirier <laurent.balland-poirier@laposte.net> | 2013-11-19 19:55:55 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-11-20 04:42:46 -0600 |
commit | 7a32f528fe4746e721e7f1a45f2039b75b08fdfc (patch) | |
tree | 4f457016afbf1325fc7c7a35444d4936837debff /editeng | |
parent | 7e93e93a4a93b7968255d6b23a32fa3e9fe37885 (diff) |
fdo#67742 Avoid autocorr of "--" before "-"
LibO 4.1 now uses '-' as word separator for AutoCorrection
Then the sequence "---" is detected as word "--" and autocorrect
as "–". This avoids autocorrection of "---", as word or as border
This commit detects the sequence "---" and report autocorrection.
Change-Id: I1342c2ff83dd42683e683b3bb27280d61179b9a2
Reviewed-on: https://gerrit.libreoffice.org/6727
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/misc/svxacorr.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx index 43522d7071ed..83a470710727 100644 --- a/editeng/source/misc/svxacorr.cxx +++ b/editeng/source/misc/svxacorr.cxx @@ -1335,6 +1335,11 @@ SvxAutoCorrect::DoAutoCorrect( SvxAutoCorrDoc& rDoc, const OUString& rTxt, OUString aPara; OUString* pPara = IsAutoCorrFlag(CptlSttSntnc) ? &aPara : 0; + // since LibO 4.1, '-' is a word separator + // fdo#67742 avoid "--" to be replaced by "–" if next is "-" + if( rTxt.getLength() >= 3 && + rTxt.match( OUString("---"), rTxt.getLength()-3 ) ) + break; bool bChgWord = rDoc.ChgAutoCorrWord( nCapLttrPos, nInsPos, *this, pPara ); if( !bChgWord ) |