Kaydet (Commit) f338acb7 authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#735305 Unchecked return value

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