summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMatteo Casalin <matteo.casalin@yahoo.com>2014-03-02 01:29:00 +0100
committerMatteo Casalin <matteo.casalin@yahoo.com>2014-03-02 20:18:02 +0100
commite9ac4088d932992c58ac0328ff0fd4b43cda338e (patch)
treec45c4b148261bb0012d62cd5ba4566fc83a9a56c /sw
parentaa5b337bff8d9c8c07f2c67a043bef4f07fccb79 (diff)
Avoid consecutive OUString appends and a temporary
Change-Id: Iee8998a4947a253f869fefb7bde316e3d3b4129b
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/edit/autofmt.cxx9
1 files changed, 4 insertions, 5 deletions
diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx
index e3ee2210be03..f2b672f708a2 100644
--- a/sw/source/core/edit/autofmt.cxx
+++ b/sw/source/core/edit/autofmt.cxx
@@ -383,8 +383,7 @@ sal_Bool SwAutoFormat::IsFastFullLine( const SwTxtNode& rNd ) const
sal_Bool SwAutoFormat::IsEnumericChar( const SwTxtNode& rNd ) const
{
const OUString& rTxt = rNd.GetTxt();
- OUString sTmp( rTxt );
- sal_Int32 nBlnks = GetLeadingBlanks( sTmp );
+ sal_Int32 nBlnks = GetLeadingBlanks( rTxt );
const sal_Int32 nLen = rTxt.getLength() - nBlnks;
if( !nLen )
return sal_False;
@@ -939,8 +938,8 @@ CHECK_ROMAN_5:
{
eScan |= CHG;
if( pPreFix )
- (*pPreFix += OUString((sal_Unicode)1))
- += OUString::number( nStart );
+ *pPreFix += OUString((sal_Unicode)1)
+ + OUString::number( nStart );
}
eScan &= ~NO_DELIM; // remove Delim
eScan |= DELIM; // add Digit
@@ -957,7 +956,7 @@ CHECK_ROMAN_5:
return USHRT_MAX;
if( (NO_DELIM & eScan) && pPreFix ) // do not forget the last one
- (*pPreFix += OUString((sal_Unicode)1)) += OUString::number( nStart );
+ *pPreFix += OUString((sal_Unicode)1) + OUString::number( nStart );
rPos = nPos;
return nDigitLvl; // 0 .. 9 (MAXLEVEL - 1)