summaryrefslogtreecommitdiff
path: root/lotuswordpro
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-02-17 11:34:58 +0200
committerNoel Grandin <noel@peralex.com>2014-02-17 14:04:34 +0200
commit796b51a763d956e58e38af5643854ba3b49bc76a (patch)
tree5d20c620cbd959ff4183fb6354ea1267e5ae5dd5 /lotuswordpro
parent2b3b3373eb13e12204180d634de5063add6b4f8e (diff)
cid#736782 dereference before null check
and reduce scope of some variables Change-Id: I1aada9af15090ff2083354ea9b265b9e3d4e5c02
Diffstat (limited to 'lotuswordpro')
-rw-r--r--lotuswordpro/source/filter/lwptablelayout.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/lotuswordpro/source/filter/lwptablelayout.cxx b/lotuswordpro/source/filter/lwptablelayout.cxx
index b8193b4ca63d..209c2ace7c5a 100644
--- a/lotuswordpro/source/filter/lwptablelayout.cxx
+++ b/lotuswordpro/source/filter/lwptablelayout.cxx
@@ -1184,7 +1184,6 @@ void LwpTableLayout::PostProcessParagraph(XFCell *pCell, sal_uInt16 nRowID, sal_
pXFPara = static_cast<XFParagraph*>(pCell->FindFirstContent(enumXFContentPara));
if (!pXFPara)
return;
- XFColor aColor;
XFColor aNullColor = XFColor();
if ( pXFPara)
@@ -1196,8 +1195,8 @@ void LwpTableLayout::PostProcessParagraph(XFCell *pCell, sal_uInt16 nRowID, sal_
if (!sNumfmt.isEmpty())
{
pNumStyle = (XFNumberStyle*)pXFStyleManager->FindStyle( sNumfmt);
- aColor = pNumStyle->GetColor();
- if ( pNumStyle && aColor != aNullColor )
+ XFColor aColor = pNumStyle->GetColor();
+ if ( aColor != aNullColor )
bColorMod = sal_True;//end
}
@@ -1213,7 +1212,7 @@ void LwpTableLayout::PostProcessParagraph(XFCell *pCell, sal_uInt16 nRowID, sal_
if (bColorMod)
{
XFFont* pFont = pOverStyle->GetFont();
- aColor = pFont->GetColor();
+ XFColor aColor = pFont->GetColor();
if ( aColor == aNullColor )
{
XFFont* pNewFont = new XFFont;