summaryrefslogtreecommitdiff
path: root/sw/source/core
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-10-17 09:21:50 +0100
committerCaolán McNamara <caolanm@redhat.com>2013-10-17 16:52:11 +0100
commitd1563b818d335495a5591f5fd491fee77b47c93d (patch)
tree271c92c466fe0b2d0e60ae5f0be01f646999b590 /sw/source/core
parent63691a62c8695889144841abf8a32d52535ae671 (diff)
Related: fdo#38838 make String::CompareTo private
Change-Id: Ibb17bb9e5df9fa9cf9abc4c05dc6ae8fa15b4058
Diffstat (limited to 'sw/source/core')
-rw-r--r--sw/source/core/doc/docnum.cxx9
1 files changed, 4 insertions, 5 deletions
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;