From b4d9ed143471659ef0905379c5ebd60ee711c1e4 Mon Sep 17 00:00:00 2001 From: Herbert Dürr Date: Tue, 16 Apr 2013 11:20:17 +0000 Subject: small optimization, don't call objectAtIndex twice (cherry picked from commit a88630fb326fa4dcbe28edd1c149c8e5e7b7f123) Conflicts: lingucomponent/source/spellcheck/macosxspell/macspellimp.cxx Change-Id: Ic48281be27bf43f8a564f46684ddb53a2d83d80e --- lingucomponent/source/spellcheck/macosxspell/macspellimp.mm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lingucomponent') diff --git a/lingucomponent/source/spellcheck/macosxspell/macspellimp.mm b/lingucomponent/source/spellcheck/macosxspell/macspellimp.mm index c2ca43895f91..64cc1c1421a6 100644 --- a/lingucomponent/source/spellcheck/macosxspell/macspellimp.mm +++ b/lingucomponent/source/spellcheck/macosxspell/macspellimp.mm @@ -120,9 +120,10 @@ Sequence< Locale > SAL_CALL MacSpellChecker::getLocales() //Test for existence of the dictionaries for (unsigned int i = 0; i < [aLocales count]; i++) { - if( [macSpell setLanguage:[aLocales objectAtIndex:i] ] ) + NSString* pLangStr = (NSString*)[aLocales objectAtIndex:i]; + if( [macSpell setLanguage:pLangStr ] ) { - postspdict.push_back( [ aLocales objectAtIndex:i ] ); + postspdict.push_back( pLangStr ); } } -- cgit