coverity#735305 Unchecked return value

Change-Id: I0f03b67a5df3427e78f70f2b86aba26024ea575f
This commit is contained in:
Caolán McNamara 2014-10-28 12:43:40 +00:00
parent 459e080067
commit f338acb77c

View file

@ -1422,8 +1422,8 @@ SvxAutoCorrectLanguageLists& SvxAutoCorrect::_GetLanguageList(
LanguageType eLang )
{
LanguageTag aLanguageTag( eLang);
if(pLangTable->find(aLanguageTag) == pLangTable->end())
CreateLanguageFile(aLanguageTag, true);
if (pLangTable->find(aLanguageTag) == pLangTable->end())
(void)CreateLanguageFile(aLanguageTag, true);
return *(pLangTable->find(aLanguageTag)->second);
}
@ -1453,7 +1453,7 @@ void SvxAutoCorrect::SaveWrdSttExceptList(LanguageType eLang)
#endif
}
// Adds a single word. The list will immediately be written to the file!
// Adds a single word. The list will immediately be written to the file!
bool SvxAutoCorrect::AddCplSttException( const OUString& rNew,
LanguageType eLang )
{
@ -1472,7 +1472,7 @@ bool SvxAutoCorrect::AddCplSttException( const OUString& rNew,
pLists = pLangTable->find(aLangTagUndetermined)->second;
}
OSL_ENSURE(pLists, "No auto correction data");
return pLists->AddToCplSttExceptList(rNew);
return pLists ? pLists->AddToCplSttExceptList(rNew) : false;
}
// Adds a single word. The list will immediately be written to the file!
@ -1494,7 +1494,7 @@ bool SvxAutoCorrect::AddWrtSttException( const OUString& rNew,
pLists = pLangTable->find(aLangTagUndetermined)->second;
}
OSL_ENSURE(pLists, "No auto correction file!");
return pLists->AddToWrdSttExceptList(rNew);
return pLists ? pLists->AddToWrdSttExceptList(rNew) : false;
}
bool SvxAutoCorrect::GetPrevAutoCorrWord( SvxAutoCorrDoc& rDoc,