fix Search->indexOf conversion

Change-Id: I2b02b62311c00fc47892ea7e24d8bc01ac4fb149
This commit is contained in:
Ivan Timofeev
2013-01-10 09:34:42 +04:00
parent 24edbb1900
commit 469cec21f7

View File

@@ -198,14 +198,14 @@ IMPL_LINK( SdCustomShowDlg, ClickButtonHdl, void *, p )
OUString aStr( pShow->GetName() );
OUString aStrCopy( SdResId( STR_COPY_CUSTOMSHOW ) );
sal_uInt16 nStrPos = aStr.indexOf( aStrCopy );
sal_Int32 nStrPos = aStr.indexOf( aStrCopy );
sal_Int32 nNum = 1;
if( nStrPos == STRING_NOTFOUND )
if( nStrPos < 0 )
{
aStr = aStr + " (" + aStrCopy + OUString::valueOf( nNum ) + ")";
nStrPos = aStr.indexOf( aStrCopy );
}
nStrPos = nStrPos + (sal_uInt16)aStrCopy.getLength();
nStrPos = nStrPos + aStrCopy.getLength();
// Um nicht ins Nirvana zu greifen (--> Endlosschleife)
if( nStrPos >= aStr.getLength() )
{