[Libreoffice-commits] core.git: editeng/source
anuragkanungo
anuragkanungo at gmail.com
Fri Apr 26 08:59:13 PDT 2013
editeng/source/misc/svxacorr.cxx | 9 +++++++++
1 file changed, 9 insertions(+)
New commits:
commit 3a390f36e8931e50009438f992ed0e4cdb02cca4
Author: anuragkanungo <anuragkanungo at 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: anuragkanungo at 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 <caolanm at redhat.com>
Reviewed-by: Caolán McNamara <caolanm at 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;
More information about the Libreoffice-commits
mailing list