editeng/source/misc/svxacorr.cxx |    9 +++++++++
 1 file changed, 9 insertions(+)

New commits:
commit 3a390f36e8931e50009438f992ed0e4cdb02cca4
Author: anuragkanungo <anuragkanu...@gmail.com>
Date:   Sat Apr 20 03:15:55 2013 +0530

    Resolves: fdo#42893 improve Capitalize first letter of Sentence
    
    don't autocapitalize a word if the previous word is clearly an
    anagram with intermediate periods.
    
     Committer: anuragkanu...@gmail.com
        modified:   editeng/source/misc/svxacorr.cxx
    
     On branch localbranch_anurag
    
    Change-Id: Ic559f4b6d5e15768870aabab29350bee51b24b08
    Reviewed-on: https://gerrit.libreoffice.org/3495
    Tested-by: Caolán McNamara <caol...@redhat.com>
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index 96f5b86..9f36498 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -904,6 +904,15 @@ sal_Bool SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& 
rDoc,
             case 0x3002 :
             case 0xFF0E :
                 {
+                    if (pStr >= pStart + 2 && *(pStr-2) == '.')
+                    {
+                        //e.g. text "f.o.o. word": Now currently considering
+                        //capitalizing word but second last character of
+                        //previous word is a .  So probably last word is an
+                        //anagram that ends in . and not truly the end of a
+                        //previous sentence, so don't autocapitalize this word
+                        return sal_False;
+                    }
                     if( nFlag & C_FULL_STOP )
                         return sal_False;  // no valid separator -> no 
replacement
                     nFlag |= C_FULL_STOP;
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to