diff options
author | Jan Holesovsky <kendy@suse.cz> | 2013-07-23 11:29:22 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@suse.cz> | 2013-07-23 11:30:41 +0200 |
commit | 697b1039bc1690dc8ec9aaa6faa0283cc57dee68 (patch) | |
tree | dace9f583b528a82ab18dc39d4a6a138ced43e07 /sw | |
parent | 1f5c14dadcb1eb749be863cadff0dfdf2e8bc32e (diff) |
Pass this string by reference, not by value.
[plus kill some unrelated unwanted whitespace]
Change-Id: Id5140c96b0bf10f3e4e5a8a54bca15cb4c452278
Diffstat (limited to 'sw')
-rw-r--r-- | sw/inc/doc.hxx | 4 | ||||
-rw-r--r-- | sw/source/core/doc/doctxm.cxx | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx index 750c69fd83c1..ffb21881d892 100644 --- a/sw/inc/doc.hxx +++ b/sw/inc/doc.hxx @@ -1395,13 +1395,13 @@ public: bool bExpand = false ); const SwTOXBaseSection* InsertTableOf( sal_uLong nSttNd, sal_uLong nEndNd, const SwTOXBase& rTOX, - const SfxItemSet* pSet = 0 ); + const SfxItemSet* pSet = 0 ); const SwTOXBase* GetCurTOX( const SwPosition& rPos ) const; const SwAttrSet& GetTOXBaseAttrSet(const SwTOXBase& rTOX) const; bool DeleteTOX( const SwTOXBase& rTOXBase, bool bDelNodes = false ); String GetUniqueTOXBaseName( const SwTOXType& rType, - const String sChkStr ) const; + const String& rChkStr ) const; bool SetTOXBaseName(const SwTOXBase& rTOXBase, const String& rName); void SetTOXBaseProtection(const SwTOXBase& rTOXBase, sal_Bool bProtect); diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx index d58840b31050..a374051d9291 100644 --- a/sw/source/core/doc/doctxm.cxx +++ b/sw/source/core/doc/doctxm.cxx @@ -611,9 +611,9 @@ const SwTOXType* SwDoc::InsertTOXType( const SwTOXType& rTyp ) } String SwDoc::GetUniqueTOXBaseName( const SwTOXType& rType, - const String sChkStr ) const + const String& rChkStr ) const { - bool bUseChkStr = sChkStr.Len()>0; + bool bUseChkStr = rChkStr.Len()>0; String aName( rType.GetTypeName() ); xub_StrLen nNmLen = aName.Len(); @@ -639,7 +639,7 @@ String SwDoc::GetUniqueTOXBaseName( const SwTOXType& rType, if( nNum-- && nNum < mpSectionFmtTbl->size() ) pSetFlags[ nNum / 8 ] |= (0x01 << ( nNum & 0x07 )); } - if( bUseChkStr && sChkStr.Equals( rNm ) ) + if( bUseChkStr && rChkStr.Equals( rNm ) ) bUseChkStr = false; } } @@ -666,7 +666,7 @@ String SwDoc::GetUniqueTOXBaseName( const SwTOXType& rType, } delete [] pSetFlags; if ( bUseChkStr ) - return sChkStr; + return rChkStr; return aName += OUString::number( ++nNum ); } |