[Libreoffice-commits] core.git: sw/inc sw/source
Jan Holesovsky
kendy at suse.cz
Sun Aug 11 15:24:34 PDT 2013
sw/inc/doc.hxx | 4 ++--
sw/source/core/doc/doctxm.cxx | 8 ++++----
2 files changed, 6 insertions(+), 6 deletions(-)
New commits:
commit 697b1039bc1690dc8ec9aaa6faa0283cc57dee68
Author: Jan Holesovsky <kendy at suse.cz>
Date: Tue Jul 23 11:29:22 2013 +0200
Pass this string by reference, not by value.
[plus kill some unrelated unwanted whitespace]
Change-Id: Id5140c96b0bf10f3e4e5a8a54bca15cb4c452278
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index 750c69f..ffb2188 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 d58840b..a374051 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 );
}
More information about the Libreoffice-commits
mailing list