From 469cec21f7da6a680897615f912d137f94e62ee9 Mon Sep 17 00:00:00 2001 From: Ivan Timofeev Date: Thu, 10 Jan 2013 09:34:42 +0400 Subject: [PATCH] fix Search->indexOf conversion Change-Id: I2b02b62311c00fc47892ea7e24d8bc01ac4fb149 --- sd/source/ui/dlg/custsdlg.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sd/source/ui/dlg/custsdlg.cxx b/sd/source/ui/dlg/custsdlg.cxx index d55a688b0776..e6149eaacc92 100644 --- a/sd/source/ui/dlg/custsdlg.cxx +++ b/sd/source/ui/dlg/custsdlg.cxx @@ -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() ) {