Kaydet (Commit) 0a9e5778 authored tarafından Caolán McNamara's avatar Caolán McNamara

rename IsAutoCapitalizeWordDelim to NonFieldWordDelim

Change-Id: If8fb8f5e51bba8e631a6fc5db54487b418c19e05
üst b9d0d608
...@@ -105,18 +105,18 @@ static const sal_Char ...@@ -105,18 +105,18 @@ static const sal_Char
OUString EncryptBlockName_Imp(const OUString& rName); 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 || 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 || return c == 0x1 || NonFieldWordDelim(c);
cNonBreakingSpace == c || 0x2011 == c;
} }
static inline bool IsLowerLetter( sal_Int32 nCharType ) static inline bool IsLowerLetter( sal_Int32 nCharType )
{ {
return CharClass::isLetterType( nCharType ) && return CharClass::isLetterType( nCharType ) &&
...@@ -882,9 +882,9 @@ bool SvxAutoCorrect::FnCapitalStartSentence( SvxAutoCorrDoc& rDoc, ...@@ -882,9 +882,9 @@ bool SvxAutoCorrect::FnCapitalStartSentence( SvxAutoCorrDoc& rDoc,
if( !bAtStart ) // Still no beginning of a paragraph? 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 // Asian full stop, full width full stop, full width exclamation mark
...@@ -915,7 +915,7 @@ bool SvxAutoCorrect::FnCapitalStartSentence( SvxAutoCorrDoc& rDoc, ...@@ -915,7 +915,7 @@ bool SvxAutoCorrect::FnCapitalStartSentence( SvxAutoCorrDoc& rDoc,
do { // overwrite all blanks do { // overwrite all blanks
--pStr; --pStr;
if (!IsAutoCapitalizeWordDelim(*pStr)) if (!NonFieldWordDelim(*pStr))
break; break;
bAtStart = (pStart == pStr); bAtStart = (pStart == pStr);
} while( !bAtStart ); } while( !bAtStart );
...@@ -1011,7 +1011,7 @@ bool SvxAutoCorrect::FnCapitalStartSentence( SvxAutoCorrDoc& rDoc, ...@@ -1011,7 +1011,7 @@ bool SvxAutoCorrect::FnCapitalStartSentence( SvxAutoCorrDoc& rDoc,
else else
bAlphaFnd = true; bAlphaFnd = true;
} }
else if (bAlphaFnd || IsAutoCapitalizeWordDelim(*pTmpStr)) else if (bAlphaFnd || NonFieldWordDelim(*pTmpStr))
break; break;
if( pTmpStr == pStart ) if( pTmpStr == pStart )
...@@ -1027,7 +1027,7 @@ bool SvxAutoCorrect::FnCapitalStartSentence( SvxAutoCorrDoc& rDoc, ...@@ -1027,7 +1027,7 @@ bool SvxAutoCorrect::FnCapitalStartSentence( SvxAutoCorrDoc& rDoc,
bool bNumericOnly = '0' <= *(pStr+1) && *(pStr+1) <= '9'; bool bNumericOnly = '0' <= *(pStr+1) && *(pStr+1) <= '9';
// Search for the beginning of the word // Search for the beginning of the word
while (!IsAutoCapitalizeWordDelim(*pStr)) while (!NonFieldWordDelim(*pStr))
{ {
if( bNumericOnly && rCC.isLetter( aText, pStr - pStart ) ) if( bNumericOnly && rCC.isLetter( aText, pStr - pStart ) )
bNumericOnly = false; bNumericOnly = false;
...@@ -1041,7 +1041,7 @@ bool SvxAutoCorrect::FnCapitalStartSentence( SvxAutoCorrDoc& rDoc, ...@@ -1041,7 +1041,7 @@ bool SvxAutoCorrect::FnCapitalStartSentence( SvxAutoCorrDoc& rDoc,
if( bNumericOnly ) // consists of only numbers, then not if( bNumericOnly ) // consists of only numbers, then not
return false; return false;
if (IsAutoCapitalizeWordDelim(*pStr)) if (NonFieldWordDelim(*pStr))
++pStr; ++pStr;
OUString sWord; OUString sWord;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment