summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/source/core/edit/autofmt.cxx15
1 files changed, 6 insertions, 9 deletions
diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx
index 45a6f892af1e..6a1de5b508f8 100644
--- a/sw/source/core/edit/autofmt.cxx
+++ b/sw/source/core/edit/autofmt.cxx
@@ -2319,19 +2319,16 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
m_bEmptyLine = false;
const OUString sEndClrStr( DelTrailingBlanks(sClrStr) );
- const sal_Int32 nLen = sEndClrStr.getLength();
+ const sal_Unicode cLast = sEndClrStr[sEndClrStr.getLength() - 1];
// not, then check if headline
- if( ':' == sEndClrStr[ nLen - 1 ] )
+ if( ':' == cLast )
{
- {
- BuildHeadLine( 2 );
- m_eStat = READ_NEXT_PARA;
- break;
- }
+ BuildHeadLine( 2 );
+ m_eStat = READ_NEXT_PARA;
+ break;
}
- else if( 256 <= sEndClrStr[ nLen-1 ] ||
- !strchr( ",.;", sEndClrStr[ nLen-1 ]) )
+ else if( 256 <= cLast || !strchr( ",.;", cLast ) )
{
if( bNxtEmpty || bNxtAlpha
|| ( pNxtNd && IsEnumericChar( *pNxtNd ))