OSDN Git Service

foreachでの配列オブジェクトに直書き文字列を利用できるよう対応
authornoboru saitoh <msnobosan@gmal.com>
Wed, 8 Oct 2014 16:31:42 +0000 (01:31 +0900)
committernoboru saitoh <msnobosan@gmal.com>
Wed, 8 Oct 2014 16:31:42 +0000 (01:31 +0900)
Jaxcel/src/org/hanei/jaxcel/report/TLParser.java

index b84f74b..a20f411 100644 (file)
@@ -1037,7 +1037,7 @@ public class TLParser {
                                                                ExcelUtil.getMoveFormula(
                                                                                sheet, 
                                                                                fromCell.getCellFormula().replace(
-                                                                                               (cpCount == 0 ? object : list + "[" + (mapKeys == null ? (startIdx - 1) : "'" + mapKeys[startIdx - 1] + "'") + "]"), list + "[" + (mapKeys == null ? (i - 1) : "'" + mapKeys[i - 1] + "'") + "]"), 
+                                                                                               (cpCount == 0 ? object : "(" + list + ")[" + (mapKeys == null ? (startIdx - 1) : "'" + mapKeys[startIdx - 1] + "'") + "]"), "(" + list + ")[" + (mapKeys == null ? (i - 1) : "'" + mapKeys[i - 1] + "'") + "]"), 
                                                                                toCell.getRowIndex() - fromCell.getRowIndex(), 
                                                                                toCell.getColumnIndex() - fromCell.getColumnIndex()
                                                                )
@@ -1050,7 +1050,7 @@ public class TLParser {
                                                break;
                                        case Cell.CELL_TYPE_STRING:
                                                toCell.setCellType(Cell.CELL_TYPE_STRING);
-                                               toCell.setCellValue(fromCell.getStringCellValue().replace((cpCount == 0 ? object : list + "[" + (mapKeys == null ? (startIdx - 1) : "'" + mapKeys[startIdx - 1] + "'") + "]"), list + "[" + (mapKeys == null ? (i - 1) : "'" + mapKeys[i - 1] + "'") + "]"));
+                                               toCell.setCellValue(fromCell.getStringCellValue().replace((cpCount == 0 ? object : "(" + list + ")[" + (mapKeys == null ? (startIdx - 1) : "'" + mapKeys[startIdx - 1] + "'") + "]"), "(" + list + ")[" + (mapKeys == null ? (i - 1) : "'" + mapKeys[i - 1] + "'") + "]"));
                                                log.debug("to cell string: {}", toCell.getStringCellValue());
                                                break;
                                        }