[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - editeng/source
Laurent Balland-Poirier
laurent.balland-poirier at laposte.net
Mon Nov 25 03:25:46 PST 2013
editeng/source/misc/svxacorr.cxx | 5 +++++
1 file changed, 5 insertions(+)
New commits:
commit 0299cfaca263b1cc635980fdd8497346d5cb8513
Author: Laurent Balland-Poirier <laurent.balland-poirier at laposte.net>
Date: Tue Nov 19 19:55:55 2013 +0100
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.
Modified for LibO 4.1 (OUString => String)
Change-Id: I1342c2ff83dd42683e683b3bb27280d61179b9a2
Reviewed-on: https://gerrit.libreoffice.org/6747
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index cc61b5e..a5e2279 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -1330,6 +1330,11 @@ SvxAutoCorrect::DoAutoCorrect( SvxAutoCorrDoc& rDoc, const String& rTxt,
sal_Bool bChgWord = rDoc.ChgAutoCorrWord( nCapLttrPos, nInsPos,
*this, ppPara );
+ // since LibO 4.1, '-' is a word separator
+ // fdo#67742 avoid "--" to be replaced by "â" if next is "-"
+ if( rTxt.Len() >= 3 &&
+ rTxt.Equals( String("---"), rTxt.Len()-3, 3 ) )
+ break;
if( !bChgWord )
{
xub_StrLen nCapLttrPos1 = nCapLttrPos, nInsPos1 = nInsPos;
More information about the Libreoffice-commits
mailing list