loplugin:oncevar

Change-Id: I285296913f469aa624ececefab488ff4c456f05a
This commit is contained in:
Stephan Bergmann 2017-06-30 09:55:00 +02:00
parent 5c5a49eda1
commit d6db18316b

View File

@ -236,8 +236,7 @@ sal_Int16 MacSpellChecker::GetSpellFailure( const OUString &rWord, const Locale
if(rLocale.Country.getLength()>0) if(rLocale.Country.getLength()>0)
{ {
NSString* aCountry = [[NSString alloc] initWithCharacters: reinterpret_cast<unichar const *>(rLocale.Country.getStr()) length: rLocale.Country.getLength()]; NSString* aCountry = [[NSString alloc] initWithCharacters: reinterpret_cast<unichar const *>(rLocale.Country.getStr()) length: rLocale.Country.getLength()];
NSString* aTag = @"_"; NSString* aTaggedCountry = [@"_" stringByAppendingString:aCountry];
NSString* aTaggedCountry = [aTag stringByAppendingString:aCountry];
[aLang autorelease]; [aLang autorelease];
aLang = [aLang stringByAppendingString:aTaggedCountry]; aLang = [aLang stringByAppendingString:aTaggedCountry];
} }
@ -338,8 +337,7 @@ Reference< XSpellAlternatives >
if(rLocale.Country.getLength()>0) if(rLocale.Country.getLength()>0)
{ {
NSString* aCountry = [[NSString alloc] initWithCharacters: reinterpret_cast<unichar const *>(rLocale.Country.getStr()) length: rLocale.Country.getLength() ]; NSString* aCountry = [[NSString alloc] initWithCharacters: reinterpret_cast<unichar const *>(rLocale.Country.getStr()) length: rLocale.Country.getLength() ];
NSString* aTag = @"_"; NSString* aTaggedCountry = [@"_" stringByAppendingString:aCountry];
NSString* aTaggedCountry = [aTag stringByAppendingString:aCountry];
[aLang autorelease]; [aLang autorelease];
aLang = [aLang stringByAppendingString:aTaggedCountry]; aLang = [aLang stringByAppendingString:aTaggedCountry];
} }