Kaydet (Commit) 43f04e78 authored tarafından Matteo Casalin's avatar Matteo Casalin

Do not compare OUStrings twice

Change-Id: I94f7cecf5b39c1f03b9f10a13b5efa63bb06ced8
üst 2b3aa996
......@@ -570,17 +570,20 @@ static sal_uInt16 lcl_FindOutlineName( const SwNodes& rNds, const OUString& rNam
for( SwOutlineNodes::size_type n = 0; n < rOutlNds.size(); ++n )
{
SwTxtNode* pTxtNd = rOutlNds[ n ]->GetTxtNode();
OUString sTxt( pTxtNd->GetExpandTxt() );
if (sTxt == rName)
const OUString sTxt( pTxtNd->GetExpandTxt() );
if (sTxt.startsWith(rName))
{
// Found "exact", set Pos to the Node
nSavePos = n;
break;
}
else if( !bExact && USHRT_MAX == nSavePos && sTxt.startsWith(rName) )
{
// maybe we just found the text's first part
nSavePos = n;
if (sTxt.getLength() == rName.getLength())
{
// Found "exact", set Pos to the Node
nSavePos = n;
break;
}
else if( !bExact && USHRT_MAX == nSavePos )
{
// maybe we just found the text's first part
nSavePos = n;
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment