diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-12-13 17:40:36 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-12-13 17:41:00 +0000 |
commit | 9e04fac9ed56cbe709485430f60ee93d40127204 (patch) | |
tree | d71fe1db62078138a4186892fa794f2a212a9ee5 /lotuswordpro | |
parent | 15f3670533128c774a1c9885454b17f53cd5c256 (diff) |
font might be null
Change-Id: Id0d9bb1d1abe6f6c9440bf979407d13db49696c4
(cherry picked from commit 00bccc565d1bcd4bd620bb9b33b9f1d07fb5f13e)
Diffstat (limited to 'lotuswordpro')
-rw-r--r-- | lotuswordpro/source/filter/lwptablelayout.cxx | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/lotuswordpro/source/filter/lwptablelayout.cxx b/lotuswordpro/source/filter/lwptablelayout.cxx index 97835316c1c4..85ff88561338 100644 --- a/lotuswordpro/source/filter/lwptablelayout.cxx +++ b/lotuswordpro/source/filter/lwptablelayout.cxx @@ -1222,14 +1222,17 @@ void LwpTableLayout::PostProcessParagraph(XFCell *pCell, sal_uInt16 nRowID, sal_ if (bColorMod) { - rtl::Reference<XFFont> pFont = pOverStyle->GetFont(); - XFColor aColor = pFont->GetColor(); - if ( aColor == aNullColor ) + rtl::Reference<XFFont> xFont = pOverStyle->GetFont(); + if (xFont.is()) { - rtl::Reference<XFFont> pNewFont = new XFFont; - aColor = pNumStyle->GetColor(); - pNewFont->SetColor(aColor); - pOverStyle->SetFont(pNewFont); + XFColor aColor = xFont->GetColor(); + if ( aColor == aNullColor ) + { + rtl::Reference<XFFont> pNewFont = new XFFont; + aColor = pNumStyle->GetColor(); + pNewFont->SetColor(aColor); + pOverStyle->SetFont(pNewFont); + } } } |