summaryrefslogtreecommitdiff
path: root/editeng/source/misc/svxacorr.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-06-19 14:07:46 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-06-19 14:38:47 +0100
commit0a9e57785e3a391cea1aa74b87afc6e2c2c0a398 (patch)
tree17ee8e7e30081cf09a5654c2fc5865b6e1bb8a04 /editeng/source/misc/svxacorr.cxx
parentb9d0d608b0fc9a392b1a60dbd21ba5955f70b746 (diff)
rename IsAutoCapitalizeWordDelim to NonFieldWordDelim
Change-Id: If8fb8f5e51bba8e631a6fc5db54487b418c19e05
Diffstat (limited to 'editeng/source/misc/svxacorr.cxx')
-rw-r--r--editeng/source/misc/svxacorr.cxx22
1 files changed, 11 insertions, 11 deletions
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index e0472dd7caea..c7ec14cb0be6 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -105,18 +105,18 @@ static const sal_Char
OUString EncryptBlockName_Imp(const OUString& rName);
-static inline bool IsWordDelim( const sal_Unicode c )
+static inline bool NonFieldWordDelim( const sal_Unicode c )
{
return ' ' == c || '\t' == c || 0x0a == c ||
- cNonBreakingSpace == c || 0x2011 == c || 0x1 == c;
+ cNonBreakingSpace == c || 0x2011 == c;
}
-static inline bool IsAutoCapitalizeWordDelim( const sal_Unicode c )
+static inline bool IsWordDelim( const sal_Unicode c )
{
- return ' ' == c || '\t' == c || 0x0a == c ||
- cNonBreakingSpace == c || 0x2011 == c;
+ return c == 0x1 || NonFieldWordDelim(c);
}
+
static inline bool IsLowerLetter( sal_Int32 nCharType )
{
return CharClass::isLetterType( nCharType ) &&
@@ -882,9 +882,9 @@ bool SvxAutoCorrect::FnCapitalStartSentence( SvxAutoCorrDoc& rDoc,
if( !bAtStart ) // Still no beginning of a paragraph?
{
- if (IsAutoCapitalizeWordDelim(*pStr))
+ if (NonFieldWordDelim(*pStr))
{
- while (!(bAtStart = (pStart == pStr--)) && IsAutoCapitalizeWordDelim(*pStr))
+ while (!(bAtStart = (pStart == pStr--)) && NonFieldWordDelim(*pStr))
;
}
// Asian full stop, full width full stop, full width exclamation mark
@@ -915,7 +915,7 @@ bool SvxAutoCorrect::FnCapitalStartSentence( SvxAutoCorrDoc& rDoc,
do { // overwrite all blanks
--pStr;
- if (!IsAutoCapitalizeWordDelim(*pStr))
+ if (!NonFieldWordDelim(*pStr))
break;
bAtStart = (pStart == pStr);
} while( !bAtStart );
@@ -1011,7 +1011,7 @@ bool SvxAutoCorrect::FnCapitalStartSentence( SvxAutoCorrDoc& rDoc,
else
bAlphaFnd = true;
}
- else if (bAlphaFnd || IsAutoCapitalizeWordDelim(*pTmpStr))
+ else if (bAlphaFnd || NonFieldWordDelim(*pTmpStr))
break;
if( pTmpStr == pStart )
@@ -1027,7 +1027,7 @@ bool SvxAutoCorrect::FnCapitalStartSentence( SvxAutoCorrDoc& rDoc,
bool bNumericOnly = '0' <= *(pStr+1) && *(pStr+1) <= '9';
// Search for the beginning of the word
- while (!IsAutoCapitalizeWordDelim(*pStr))
+ while (!NonFieldWordDelim(*pStr))
{
if( bNumericOnly && rCC.isLetter( aText, pStr - pStart ) )
bNumericOnly = false;
@@ -1041,7 +1041,7 @@ bool SvxAutoCorrect::FnCapitalStartSentence( SvxAutoCorrDoc& rDoc,
if( bNumericOnly ) // consists of only numbers, then not
return false;
- if (IsAutoCapitalizeWordDelim(*pStr))
+ if (NonFieldWordDelim(*pStr))
++pStr;
OUString sWord;