summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-12-03 12:09:30 +0200
committerNoel Grandin <noel@peralex.com>2013-12-04 08:55:34 +0200
commit39c8524f7d9180fe500e1b5d9a272cabd72399e9 (patch)
tree79d760584089b46063d3655d6813b405f9230588
parentaa4a39c9d754d0f7e953a3a642db5ad15053c63f (diff)
remove some STRING_NOTFOUND usage
from old, probably dead code. Completely untested. But at least it's not in my grep results anymore. Change-Id: I9d917d0558bcab25a48fa36140beaa92150b62c9
-rw-r--r--linguistic/workben/sspellimp.cxx12
-rw-r--r--ucb/workben/ucb/ucbdemo.cxx15
-rw-r--r--vcl/workben/svpclient.cxx6
3 files changed, 16 insertions, 17 deletions
diff --git a/linguistic/workben/sspellimp.cxx b/linguistic/workben/sspellimp.cxx
index 77c8820d3634..e9cd7d9490f0 100644
--- a/linguistic/workben/sspellimp.cxx
+++ b/linguistic/workben/sspellimp.cxx
@@ -135,12 +135,12 @@ sal_Int16 SpellChecker::GetSpellFailure( const OUString &rWord, const Locale & )
String aTmp( rWord );
if (aTmp.Len())
{
- if (STRING_NOTFOUND != aTmp.SearchAscii( "liss" ))
+ if (-1 != aTmp.indexOf( "liss" ))
{
nRes = SpellFailure::IS_NEGATIVE_WORD;
}
- else if (STRING_NOTFOUND != aTmp.Search( (sal_Unicode) 'x' ) ||
- STRING_NOTFOUND != aTmp.Search( (sal_Unicode) 'X' ))
+ else if (-1 != aTmp.indexOf( (sal_Unicode) 'x' ) ||
+ -1 != aTmp.indexOf( (sal_Unicode) 'X' ))
{
nRes = SpellFailure::SPELLING_ERROR;
}
@@ -216,14 +216,14 @@ Reference< XSpellAlternatives >
{
sal_Int16 nLang = LinguLocaleToLanguage( rLocale );
- if (STRING_NOTFOUND != aTmp.SearchAscii( "liss" ))
+ if (-1 != aTmp.indexOf( "liss" ))
{
aTmp.SearchAndReplaceAllAscii( "liss", "liz" );
xRes = new SpellAlternatives( aTmp, nLang,
SpellFailure::IS_NEGATIVE_WORD, ::com::sun::star::uno::Sequence< OUString >() );
}
- else if (STRING_NOTFOUND != aTmp.Search( (sal_Unicode) 'x' ) ||
- STRING_NOTFOUND != aTmp.Search( (sal_Unicode) 'X' ))
+ else if (-1 != aTmp.indexOf( (sal_Unicode) 'x' ) ||
+ -1 != aTmp.indexOf( (sal_Unicode) 'X' ))
{
Sequence< OUString > aStr( 2 );
OUString *pStr = aStr.getArray();
diff --git a/ucb/workben/ucb/ucbdemo.cxx b/ucb/workben/ucb/ucbdemo.cxx
index ce48a6ba37db..6a7a6016aea8 100644
--- a/ucb/workben/ucb/ucbdemo.cxx
+++ b/ucb/workben/ucb/ucbdemo.cxx
@@ -96,10 +96,10 @@ public:
//-------------------------------------------------------------------------
void MyOutWindow::Append( const String &rLine )
{
- String aLine( rLine );
+ OUString aLine( rLine );
- xub_StrLen nPos = aLine.Search( '\n' );
- while ( nPos != STRING_NOTFOUND )
+ sal_Int32 nPos = aLine.indexOf( '\n' );
+ while ( nPos != -1 )
{
if ( GetEntryCount() >= MYOUTWINDOW_MAXLINES )
RemoveEntry( 0 );
@@ -2254,17 +2254,16 @@ void MyApp::Main()
USHORT nParams = Application::GetCommandLineParamCount();
for ( USHORT n = 0; n < nParams; ++n )
{
- String aParam( Application::GetCommandLineParam( n ) );
+ OUString aParam( Application::GetCommandLineParam( n ) );
if (aParam.CompareIgnoreCaseToAscii("-key=",
RTL_CONSTASCII_LENGTH("-key="))
== COMPARE_EQUAL)
{
- xub_StrLen nSlash
- = aParam.Search('/', RTL_CONSTASCII_LENGTH("-key="));
- if (nSlash == STRING_NOTFOUND)
+ sal_Int32 nSlash = aParam.indexOf('/', RTL_CONSTASCII_LENGTH("-key="));
+ if (nSlash == -1)
{
aConfigurationKey1
- = aParam.Copy(RTL_CONSTASCII_LENGTH("-key="));
+ = aParam.copy(RTL_CONSTASCII_LENGTH("-key="));
aConfigurationKey2 = "";
}
else
diff --git a/vcl/workben/svpclient.cxx b/vcl/workben/svpclient.cxx
index 54a51d9cbcff..9125cb1120ca 100644
--- a/vcl/workben/svpclient.cxx
+++ b/vcl/workben/svpclient.cxx
@@ -231,9 +231,9 @@ IMPL_LINK( MyWin, QuitHdl, Button*, )
IMPL_LINK( MyWin, SelectHdl, ListBox*, )
{
- String aEntry = m_aSvpBitmaps.GetSelectEntry();
- sal_uInt16 nPos = aEntry.SearchAscii( ": " );
- if( nPos != STRING_NOTFOUND )
+ OUString aEntry = m_aSvpBitmaps.GetSelectEntry();
+ sal_Int32 nPos = aEntry.indexOf( ": " );
+ if( nPos != -1 )
{
OStringBuffer aCommand( 64 );
aCommand.append( "get " );