diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2014-03-07 21:55:42 -0600 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2014-03-08 01:21:25 -0600 |
commit | 0b83c8ffdcba92be56030b1e205a030d46168cfe (patch) | |
tree | e6228b2c1060e5e1d93918a6fa9b4c786e69e0c4 /lotuswordpro | |
parent | 48ab20b710c37a395b27f98fa3bfe57886378126 (diff) |
coverity#735759 Unchecked dynamic_cast
Change-Id: I48e618355f97ac366db2337cdd0787b1b39ae46e
Diffstat (limited to 'lotuswordpro')
-rw-r--r-- | lotuswordpro/source/filter/lwpstory.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lotuswordpro/source/filter/lwpstory.cxx b/lotuswordpro/source/filter/lwpstory.cxx index 3edee62ca07b..8bb7b86f4fec 100644 --- a/lotuswordpro/source/filter/lwpstory.cxx +++ b/lotuswordpro/source/filter/lwpstory.cxx @@ -462,7 +462,7 @@ OUString LwpStory::GetContentText(sal_Bool bAllText) { if (bAllText)//convert all text fribs { - OUString sText = A2OUSTR(""); + OUString sText(""); //process para list LwpPara* pPara = dynamic_cast<LwpPara*>(GetFirstPara()->obj()); while (pPara) @@ -479,12 +479,12 @@ OUString LwpStory::GetContentText(sal_Bool bAllText) if(pObj) { LwpPara* pPara = dynamic_cast<LwpPara*>(pObj); - if (pPara->GetNext()->obj() != NULL) - return A2OUSTR(""); + if (!pPara || pPara->GetNext()->obj() != NULL) + return OUString(""); pPara->SetFoundry(m_pFoundry); return pPara->GetContentText(); } - return A2OUSTR(""); + return OUString(""); } } @@ -500,15 +500,15 @@ OUString LwpStory::RegisterFirstFribStyle() XFStyleManager* pXFStyleManager = LwpGlobalMgr::GetInstance()->GetXFStyleManager(); XFTextStyle* pBaseStyle = pXFStyleManager->FindTextStyle(pFirstFrib->GetStyleName()); if (pBaseStyle == NULL) - return A2OUSTR(""); + return OUString(""); XFTextStyle* pStyle = new XFTextStyle; *pStyle = *pBaseStyle; - OUString sName = A2OUSTR("Ruby") + pFirstFrib->GetStyleName(); + OUString sName = "Ruby" + pFirstFrib->GetStyleName(); pStyle->SetStyleName(sName); pXFStyleManager->AddStyle(pStyle); return sName; } - return A2OUSTR(""); + return OUString(""); } sal_Bool LwpStory::IsBullStyleUsedBefore(const OUString& rStyleName, const sal_uInt8& nPos) |