Kaydet (Commit) 11fcdecb authored tarafından Julien Nabet's avatar Julien Nabet

Related tdf#112425: fix another leak in MacSpellChecker

Apply the same changes in GetProposals than GetSpellFailure

Change-Id: Id78966568833f29c21f44724974254218636597d
Reviewed-on: https://gerrit.libreoffice.org/42397Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarJulien Nabet <serval2412@yahoo.fr>
üst dd586840
......@@ -331,13 +331,12 @@ Reference< XSpellAlternatives >
if (n)
{
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
NSString* aNSStr = [[NSString alloc] initWithCharacters: reinterpret_cast<unichar const *>(nWord.getStr()) length: nWord.getLength()];
NSString* aLang = [[NSString alloc] initWithCharacters: reinterpret_cast<unichar const *>(rLocale.Language.getStr()) length: rLocale.Language.getLength() ];
NSString* aNSStr = [[[NSString alloc] initWithCharacters: reinterpret_cast<unichar const *>(nWord.getStr()) length: nWord.getLength()]autorelease];
NSString* aLang = [[[NSString alloc] initWithCharacters: reinterpret_cast<unichar const *>(rLocale.Language.getStr()) length: rLocale.Language.getLength()]autorelease];
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()]autorelease];
NSString* aTaggedCountry = [@"_" stringByAppendingString:aCountry];
[aLang autorelease];
aLang = [aLang stringByAppendingString:aTaggedCountry];
}
[macSpell setLanguage:aLang];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment