91334d
From fce38cb5608fd35bc27f35c81cb27075ea85f9d3 Mon Sep 17 00:00:00 2001
91334d
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
91334d
Date: Mon, 19 Jun 2017 14:07:46 +0100
91334d
Subject: [PATCH 1/2] rename IsAutoCapitalizeWordDelim to NonFieldWordDelim
91334d
91334d
Change-Id: If8fb8f5e51bba8e631a6fc5db54487b418c19e05
91334d
---
91334d
 editeng/source/misc/svxacorr.cxx | 22 +++++++++++-----------
91334d
 1 file changed, 11 insertions(+), 11 deletions(-)
91334d
91334d
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
91334d
index f9f701b..6a815bc 100644
91334d
--- a/editeng/source/misc/svxacorr.cxx
91334d
+++ b/editeng/source/misc/svxacorr.cxx
91334d
@@ -98,18 +98,18 @@ static const sal_Char
91334d
 
91334d
 OUString EncryptBlockName_Imp(const OUString& rName);
91334d
 
91334d
-static inline bool IsWordDelim( const sal_Unicode c )
91334d
+static inline bool NonFieldWordDelim( const sal_Unicode c )
91334d
 {
91334d
     return ' ' == c || '\t' == c || 0x0a == c ||
91334d
-            cNonBreakingSpace == c || 0x2011 == c || 0x1 == c;
91334d
+            cNonBreakingSpace == c || 0x2011 == c;
91334d
 }
91334d
 
91334d
-static inline bool IsAutoCapitalizeWordDelim( const sal_Unicode c )
91334d
+static inline bool IsWordDelim( const sal_Unicode c )
91334d
 {
91334d
-    return ' ' == c || '\t' == c || 0x0a == c ||
91334d
-            cNonBreakingSpace == c || 0x2011 == c;
91334d
+    return c == 0x1 || NonFieldWordDelim(c);
91334d
 }
91334d
 
91334d
+
91334d
 static inline bool IsLowerLetter( sal_Int32 nCharType )
91334d
 {
91334d
     return CharClass::isLetterType( nCharType ) &&
91334d
@@ -870,9 +870,9 @@ bool SvxAutoCorrect::FnCapitalStartSentence( SvxAutoCorrDoc& rDoc,
91334d
 
91334d
     if( !bAtStart ) // Still no beginning of a paragraph?
91334d
     {
91334d
-        if (IsAutoCapitalizeWordDelim(*pStr))
91334d
+        if (NonFieldWordDelim(*pStr))
91334d
         {
91334d
-            while (!(bAtStart = (pStart == pStr--)) && IsAutoCapitalizeWordDelim(*pStr))
91334d
+            while (!(bAtStart = (pStart == pStr--)) && NonFieldWordDelim(*pStr))
91334d
                 ;
91334d
         }
91334d
         // Asian full stop, full width full stop, full width exclamation mark
91334d
@@ -903,7 +903,7 @@ bool SvxAutoCorrect::FnCapitalStartSentence( SvxAutoCorrDoc& rDoc,
91334d
 
91334d
         do {            // overwrite all blanks
91334d
             --pStr;
91334d
-            if (!IsAutoCapitalizeWordDelim(*pStr))
91334d
+            if (!NonFieldWordDelim(*pStr))
91334d
                 break;
91334d
         } while( ! ( bAtStart = (pStart == pStr) ) );
91334d
 
91334d
@@ -998,7 +998,7 @@ bool SvxAutoCorrect::FnCapitalStartSentence( SvxAutoCorrDoc& rDoc,
91334d
                 else
91334d
                     bAlphaFnd = true;
91334d
             }
91334d
-            else if (bAlphaFnd || IsAutoCapitalizeWordDelim(*pTmpStr))
91334d
+            else if (bAlphaFnd || NonFieldWordDelim(*pTmpStr))
91334d
                 break;
91334d
 
91334d
             if( pTmpStr == pStart )
91334d
@@ -1014,7 +1014,7 @@ bool SvxAutoCorrect::FnCapitalStartSentence( SvxAutoCorrDoc& rDoc,
91334d
     bool bNumericOnly = '0' <= *(pStr+1) && *(pStr+1) <= '9';
91334d
 
91334d
     // Search for the beginning of the word
91334d
-    while (!IsAutoCapitalizeWordDelim(*pStr))
91334d
+    while (!NonFieldWordDelim(*pStr))
91334d
     {
91334d
         if( bNumericOnly && rCC.isLetter( aText, pStr - pStart ) )
91334d
             bNumericOnly = false;
91334d
@@ -1028,7 +1028,7 @@ bool SvxAutoCorrect::FnCapitalStartSentence( SvxAutoCorrDoc& rDoc,
91334d
     if( bNumericOnly )      // consists of only numbers, then not
91334d
         return false;
91334d
 
91334d
-    if (IsAutoCapitalizeWordDelim(*pStr))
91334d
+    if (NonFieldWordDelim(*pStr))
91334d
         ++pStr;
91334d
 
91334d
     OUString sWord;
91334d
-- 
91334d
2.9.3
91334d