[seam-commits] Seam SVN: r9773 - in trunk/src/excel/org/jboss/seam/excel: jxl and 1 other directory.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Sat Dec 13 16:05:01 EST 2008
Author: nickarls
Date: 2008-12-13 16:05:00 -0500 (Sat, 13 Dec 2008)
New Revision: 9773
Modified:
trunk/src/excel/org/jboss/seam/excel/css/Parser.java
trunk/src/excel/org/jboss/seam/excel/css/PropertyBuilders.java
trunk/src/excel/org/jboss/seam/excel/jxl/JXLExcelWorkbook.java
Log:
JBSEAM-3839
Modified: trunk/src/excel/org/jboss/seam/excel/css/Parser.java
===================================================================
--- trunk/src/excel/org/jboss/seam/excel/css/Parser.java 2008-12-13 19:45:32 UTC (rev 9772)
+++ trunk/src/excel/org/jboss/seam/excel/css/Parser.java 2008-12-13 21:05:00 UTC (rev 9773)
@@ -345,20 +345,19 @@
String[] styles = trimArray(styleString.split(STYLES_SEPARATOR));
for (String style : styles)
{
- String[] styleParts = style.split(STYLE_NAME_VALUE_SEPARATOR);
- if (styleParts.length != 2)
- {
- log.warn("Style component #0 should be of form <key>#1<value>", style, STYLE_NAME_VALUE_SEPARATOR);
- continue;
+ int breakpoint = style.indexOf(STYLE_NAME_VALUE_SEPARATOR);
+ if (breakpoint < 0) {
+ log.warn("Style component #0 should be of form <key>#1<value>", style, STYLE_NAME_VALUE_SEPARATOR);
+ continue;
}
- String styleName = styleParts[0].toLowerCase().trim();
+ String styleName = style.substring(0, breakpoint).toLowerCase().trim();
if (!propertyBuilders.containsKey(styleName))
{
log.warn("No property builder (unknown style) for property #0", styleName);
continue;
}
PropertyBuilder propertyBuilder = propertyBuilders.get(styleName);
- String styleValue = styleParts[1];
+ String styleValue = style.substring(breakpoint + 1);
String[] styleValues = trimArray(styleValue.trim().split(STYLE_SHORTHAND_SEPARATOR));
styleMap.putAll(propertyBuilder.parseProperty(styleName, styleValues));
}
Modified: trunk/src/excel/org/jboss/seam/excel/css/PropertyBuilders.java
===================================================================
--- trunk/src/excel/org/jboss/seam/excel/css/PropertyBuilders.java 2008-12-13 19:45:32 UTC (rev 9772)
+++ trunk/src/excel/org/jboss/seam/excel/css/PropertyBuilders.java 2008-12-13 21:05:00 UTC (rev 9773)
@@ -404,7 +404,7 @@
{
}
- public static class FormatMask extends StringPropertyBuilder
+ public static class FormatMask extends MergingStringPropertyBuilder
{
}
Modified: trunk/src/excel/org/jboss/seam/excel/jxl/JXLExcelWorkbook.java
===================================================================
--- trunk/src/excel/org/jboss/seam/excel/jxl/JXLExcelWorkbook.java 2008-12-13 19:45:32 UTC (rev 9772)
+++ trunk/src/excel/org/jboss/seam/excel/jxl/JXLExcelWorkbook.java 2008-12-13 21:05:00 UTC (rev 9773)
@@ -494,7 +494,7 @@
if (!((UIComponent) item).isRendered()) {
return;
}
- if (item.getValue() == null) {
+ if (item.getValue() == null || "".equals(item.getValue())) {
if (item.getColumn() == null && item.getRow() == null) {
nextRow();
}
More information about the seam-commits
mailing list