diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-02-04 11:27:51 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-02-04 15:47:12 +0000 |
commit | 4ed467ccc8f69c056a380f9b07ad8871e11f7d37 (patch) | |
tree | 339746a6434350308eec52bb4c1f9cfae2ea8b15 /xmerge | |
parent | 28fc15b3d35561bd2ed55526691c92689d9227dc (diff) |
coverity#1326426 Dereference null return value
Change-Id: I8ac0a0df5e111b72db181ee1b8043e6f65fbaf25
Diffstat (limited to 'xmerge')
-rw-r--r-- | xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcDocumentSerializer.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcDocumentSerializer.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcDocumentSerializer.java index 2604bf706c08..4c573a7b6ef4 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcDocumentSerializer.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcDocumentSerializer.java @@ -537,16 +537,20 @@ public abstract class SxcDocumentSerializer implements OfficeConstants, styleName = tableStyleNode.getNodeValue(); } + CellStyle cStyle = null; + if(styleName.equalsIgnoreCase("Default")) { Debug.log(Debug.TRACE, "No defined Style Attribute was found"); } else if(styleName.length()!=0) { - CellStyle cStyle = (CellStyle)styleCat.lookup(styleName, + cStyle = (CellStyle)styleCat.lookup(styleName, SxcConstants.TABLE_CELL_STYLE_FAMILY, null, CellStyle.class); + } + if (cStyle != null) { Format definedFormat = cStyle.getFormat(); fmt = new Format(definedFormat); } |