summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcDocumentSerializer.java7
1 files changed, 6 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 501059f9a979..9cf294237a89 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
@@ -469,15 +469,20 @@ public abstract class SxcDocumentSerializer implements OfficeConstants,
Debug.log(Debug.TRACE, "traverseColumn() default-cell-style : " + cellStyleName);
}
+ CellStyle cellStyle = null;
+
if(cellStyleName.equalsIgnoreCase("Default") || cellStyleName.length()==0) {
Debug.log(Debug.TRACE, "No default cell Style Attribute was found");
} else {
- CellStyle cellStyle = (CellStyle)styleCat.lookup(cellStyleName,
+ cellStyle = (CellStyle)styleCat.lookup(cellStyleName,
SxcConstants.TABLE_CELL_STYLE_FAMILY, null,
CellStyle.class);
+ }
+
+ if (cellStyle != null) {
Format defaultFmt = new Format(cellStyle.getFormat());
col.setFormat(defaultFmt);
}