Browse Source

根据测试问题修复的bug

4.1.3.A
jueyue 9 years ago
parent
commit
fb9b8ed777
5 changed files with 14 additions and 7 deletions
  1. +1
    -0
      easypoi-base/src/main/java/org/jeecgframework/poi/excel/entity/ExcelBaseParams.java
  2. +11
    -4
      easypoi-base/src/main/java/org/jeecgframework/poi/excel/export/template/ExcelExportOfTemplateUtil.java
  3. +0
    -1
      easypoi-base/src/main/java/org/jeecgframework/poi/excel/html/ExcelToHtmlServer.java
  4. +1
    -1
      easypoi-base/src/main/java/org/jeecgframework/poi/util/PoiPublicUtil.java
  5. +1
    -1
      easypoi-base/src/main/java/org/jeecgframework/poi/word/parse/ParseWord07.java

+ 1
- 0
easypoi-base/src/main/java/org/jeecgframework/poi/excel/entity/ExcelBaseParams.java View File

@@ -22,6 +22,7 @@ import org.jeecgframework.poi.handler.inter.IExcelDataHandler;
* @author JueYue * @author JueYue
* @date 2014年6月20日 下午1:56:52 * @date 2014年6月20日 下午1:56:52
*/ */
@SuppressWarnings("rawtypes")
public class ExcelBaseParams { public class ExcelBaseParams {
/** /**


+ 11
- 4
easypoi-base/src/main/java/org/jeecgframework/poi/excel/export/template/ExcelExportOfTemplateUtil.java View File

@@ -462,7 +462,7 @@ public final class ExcelExportOfTemplateUtil extends ExcelExportBase {
try { try {
row.getCell(ci).setCellValue(val); row.getCell(ci).setCellValue(val);
} catch (Exception e) { } catch (Exception e) {
LOGGER.error(e.getMessage(),e);
LOGGER.error(e.getMessage(), e);
} }
} }
row.getCell(ci).setCellStyle(columns.get(i).getCellStyle()); row.getCell(ci).setCellStyle(columns.get(i).getCellStyle());
@@ -520,7 +520,14 @@ public final class ExcelExportOfTemplateUtil extends ExcelExportBase {
int startIndex = cell.getColumnIndex(); int startIndex = cell.getColumnIndex();
Row row = cell.getRow(); Row row = cell.getRow();
while (true) { while (true) {
index += 1;
int colSpan = columns.get(columns.size() - 1) != null
? columns.get(columns.size() - 1).getColspan() : 1;
index += columns.get(columns.size() - 1).getColspan();
for (int i = 1; i < colSpan; i++) {
//添加跳过的数据
columns.add(null);
continue;
}
cell = row.getCell(index); cell = row.getCell(index);
//可能是合并的单元格 //可能是合并的单元格
if (cell == null) { if (cell == null) {
@@ -564,9 +571,9 @@ public final class ExcelExportOfTemplateUtil extends ExcelExportBase {
} }
colspan = 0; colspan = 0;
for (int i = 0; i < columns.size(); i++) { for (int i = 0; i < columns.size(); i++) {
colspan += columns.get(i).getColspan();
colspan += columns.get(i) != null ? columns.get(i).getColspan() : 0;
} }
colspan = colspan/rowspan;
colspan = colspan / rowspan;
return new Object[] { rowspan, colspan, columns }; return new Object[] { rowspan, colspan, columns };
} }


+ 0
- 1
easypoi-base/src/main/java/org/jeecgframework/poi/excel/html/ExcelToHtmlServer.java View File

@@ -72,7 +72,6 @@ public class ExcelToHtmlServer {
public String printPage() { public String printPage() {
try { try {
System.out.println("--来了一次请求--");
ensureOut(); ensureOut();
if (completeHTML) { if (completeHTML) {
out.format("<!DOCTYPE HTML>%n"); out.format("<!DOCTYPE HTML>%n");


+ 1
- 1
easypoi-base/src/main/java/org/jeecgframework/poi/util/PoiPublicUtil.java View File

@@ -178,7 +178,7 @@ public final class PoiPublicUtil {
} }
return sheetIndexPicMap; return sheetIndexPicMap;
} else { } else {
return null;
return sheetIndexPicMap;
} }
} }


+ 1
- 1
easypoi-base/src/main/java/org/jeecgframework/poi/word/parse/ParseWord07.java View File

@@ -119,7 +119,7 @@ public class ParseWord07 {
text = text.replace(FOREACH_NOT_CREATE, EMPTY).replace(FOREACH_AND_SHIFT, EMPTY) text = text.replace(FOREACH_NOT_CREATE, EMPTY).replace(FOREACH_AND_SHIFT, EMPTY)
.replace(FOREACH, EMPTY).replace(START_STR, EMPTY); .replace(FOREACH, EMPTY).replace(START_STR, EMPTY);
String[] keys = text.replaceAll("\\s{1,}", " ").trim().split(" "); String[] keys = text.replaceAll("\\s{1,}", " ").trim().split(" ");
return (Collection<?>) PoiPublicUtil.getParamsValue(keys[0], map);
return PoiPublicUtil.getParamsValue(keys[0], map);
} }
return null; return null;
} }


Loading…
Cancel
Save