• R/O
  • SSH
  • HTTPS

excella-core: Commit


Commit MetaInfo

Revision153 (tree)
Time2010-08-06 11:26:52
Authorogiharasf

Log Message

リビジョン152で誤まってコミットしていた内容を修正

Change Summary

Incremental Difference

--- trunk/org.bbreak.excella.core/src/org/bbreak/excella/core/util/PoiUtil.java (revision 152)
+++ trunk/org.bbreak.excella.core/src/org/bbreak/excella/core/util/PoiUtil.java (revision 153)
@@ -74,7 +74,7 @@
7474 */
7575 private PoiUtil() {
7676 }
77-
77+
7878 /** 一時テンプレートシート名 */
7979 public static final String TMP_SHEET_NAME = "-@%delete%_tmpSheet";
8080
@@ -405,39 +405,6 @@
405405 }
406406
407407 /**
408- * セルのスタイルをコピーする。
409- *
410- * @param fromCell コピー元セル
411- * @param toCell コピー先セル
412- */
413- public static void copyCellStyle( Cell fromCell, Cell toCell) {
414-
415- if ( fromCell != null) {
416-
417- // スタイル
418- if ( fromCell.getCellStyle() != null) {
419- toCell.setCellStyle( fromCell.getCellStyle());
420- }
421-
422- }
423- }
424-
425- /**
426- * セルのコメントをコピーする。
427- *
428- * @param fromCell コピー元セル
429- * @param toCell コピー先セル
430- */
431- public static void copyCellComment( Cell fromCell, Cell toCell) {
432-
433- if ( fromCell != null) {
434- if ( fromCell.getCellComment() != null) {
435- toCell.setCellComment( fromCell.getCellComment());
436- }
437- }
438- }
439-
440- /**
441408 * 範囲をコピーする。
442409 *
443410 * @param fromSheet コピー元シート
@@ -475,10 +442,10 @@
475442 tmpSheet = fromWorkbook.createSheet( TMP_SHEET_NAME);
476443 }
477444 baseSheet = tmpSheet;
478-
479- int lastColNum = getLastColNum( fromSheet);
480- for ( int i = 0; i < lastColNum; i++) {
481- tmpSheet.setColumnWidth( i, fromSheet.getColumnWidth( i));
445+
446+ int lastColNum = getLastColNum(fromSheet);
447+ for(int i = 0; i < lastColNum; i++){
448+ tmpSheet.setColumnWidth(i, fromSheet.getColumnWidth(i));
482449 }
483450
484451 copyRange( fromSheet, rangeAddress, tmpSheet, rangeAddress.getFirstRow(), rangeAddress.getFirstColumn(), false);
@@ -526,7 +493,7 @@
526493 XSSFSheet xssfSheet = ( XSSFSheet) toSheet.getWorkbook().getSheetAt( toSheet.getWorkbook().getSheetIndex( toSheet));
527494 CTWorksheet ctWorksheet = xssfSheet.getCTWorksheet();
528495 columnHelper = new ColumnHelper( ctWorksheet);
529- }
496+ }
530497
531498 for ( int j = rangeAddress.getFirstColumn(); j <= rangeAddress.getLastColumn(); j++) {
532499 Cell fromCell = fromRow.getCell( j);
@@ -535,10 +502,10 @@
535502 }
536503 int maxColumn = SpreadsheetVersion.EXCEL97.getMaxColumns();
537504 if ( toSheet instanceof XSSFSheet) {
538- maxColumn = SpreadsheetVersion.EXCEL2007.getMaxColumns();
505+ maxColumn = SpreadsheetVersion.EXCEL2007.getMaxColumns();
539506 }
540- if ( j + columnNumOffset >= maxColumn) {
541- break;
507+ if(j + columnNumOffset >= maxColumn){
508+ break;
542509 }
543510 Cell cell = row.getCell( j + columnNumOffset);
544511 if ( cell == null) {
Show on old repository browser