From d1563b818d335495a5591f5fd491fee77b47c93d Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Thu, 17 Oct 2013 09:21:50 +0100 Subject: Related: fdo#38838 make String::CompareTo private Change-Id: Ibb17bb9e5df9fa9cf9abc4c05dc6ae8fa15b4058 --- sw/source/core/doc/docnum.cxx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'sw') diff --git a/sw/source/core/doc/docnum.cxx b/sw/source/core/doc/docnum.cxx index cc5b27227dd0..5a142ecc483a 100644 --- a/sw/source/core/doc/docnum.cxx +++ b/sw/source/core/doc/docnum.cxx @@ -562,7 +562,7 @@ bool SwDoc::MoveOutlinePara( const SwPaM& rPam, short nOffset ) return MoveParagraph( aPam, nOffs, true ); } -static sal_uInt16 lcl_FindOutlineName( const SwNodes& rNds, const String& rName, +static sal_uInt16 lcl_FindOutlineName( const SwNodes& rNds, const OUString& rName, bool bExact ) { sal_uInt16 nSavePos = USHRT_MAX; @@ -570,15 +570,14 @@ static sal_uInt16 lcl_FindOutlineName( const SwNodes& rNds, const String& rName, for( sal_uInt16 n = 0; n < rOutlNds.size(); ++n ) { SwTxtNode* pTxtNd = rOutlNds[ n ]->GetTxtNode(); - String sTxt( pTxtNd->GetExpandTxt() ); - if( sTxt.Equals( rName ) ) + OUString sTxt( pTxtNd->GetExpandTxt() ); + if (sTxt == rName) { // Found "exact", set Pos to the Node nSavePos = n; break; } - else if( !bExact && USHRT_MAX == nSavePos && - COMPARE_EQUAL == sTxt.CompareTo( rName, rName.Len()) ) + else if( !bExact && USHRT_MAX == nSavePos && sTxt.startsWith(rName) ) { // maybe we just found the text's first part nSavePos = n; -- cgit v1.2.3