[Libreoffice-commits] core.git: editeng/source

László Németh nemeth at numbertext.org
Sun Aug 31 05:55:13 PDT 2014


 editeng/source/misc/svxacorr.cxx |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit 10176b1b6f4801d78695451a1eccabf32701e175
Author: László Németh <nemeth at numbertext.org>
Date:   Sun Aug 31 14:48:01 2014 +0200

    fdo#33899 autocorrect: don't replace date parts with fractions
    
    Change-Id: I1470d1f3e7b8613c49a4998f3ff106ca5abeff65

diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index 9aae335..04e079b 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -2788,7 +2788,12 @@ const SvxAutocorrWord* SvxAutocorrWordList::WordMatches(const SvxAutocorrWord *p
             if( (!left_wildcard && rCmp.isEqual( rChk, sWord )) || (left_wildcard && rCmp.isEqual( rChk.copy(left_wildcard), sWord) ))
             {
                 rStt = nCalcStt;
-                if (!left_wildcard) return pFnd;
+                if (!left_wildcard)
+                {
+                    // fdo#33899 avoid "1/2", "1/3".. to be replaced by fractions in dates, eg. 1/2/14
+                    if ( rTxt[nEndPos] == '/' && rChk.indexOf( '/' ) != -1 ) return NULL;
+                    return pFnd;
+                }
                 // get the first word delimiter position before the matching ".*word" pattern
                 while( rStt && !(bWasWordDelim = IsWordDelim( rTxt[ --rStt ])))
                     ;


More information about the Libreoffice-commits mailing list