Minor bug fix to previous check-in: made sure blank cells in the 2 newly generated columns don't get filled in.
git-svn-id: http://google-refine.googlecode.com/svn/trunk@2368 7d457c2a-affb-35e4-300a-418c747d4874
This commit is contained in:
parent
d01745284b
commit
dbeaefb00b
@ -339,12 +339,17 @@ public class TransposeColumnsIntoRowsOperation extends AbstractOperation {
|
||||
for (int r2 = firstNewRowIndex + 1; r2 < newRows.size(); r2++) {
|
||||
Row newRow = newRows.get(r2);
|
||||
for (int c = 0; c < newColumns.size(); c++) {
|
||||
Column column = newColumns.get(c);
|
||||
int cellIndex = column.getCellIndex();
|
||||
|
||||
Cell cellToCopy = firstNewRow.getCell(cellIndex);
|
||||
if (cellToCopy != null && newRow.getCell(cellIndex) == null) {
|
||||
newRow.setCell(cellIndex, cellToCopy);
|
||||
if (c < startColumnIndex ||
|
||||
(_combinedColumnName != null ?
|
||||
c > startColumnIndex :
|
||||
c > startColumnIndex + 1)) {
|
||||
Column column = newColumns.get(c);
|
||||
int cellIndex = column.getCellIndex();
|
||||
|
||||
Cell cellToCopy = firstNewRow.getCell(cellIndex);
|
||||
if (cellToCopy != null && newRow.getCell(cellIndex) == null) {
|
||||
newRow.setCell(cellIndex, cellToCopy);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user