Commit 15accf65 authored by GoshaZotov's avatar GoshaZotov

fix for merged cells(from html)

parent 604cce8e
......@@ -9098,21 +9098,23 @@
//for merge
var isMerged = false;
for (var mergeCheck = 0; mergeCheck < mergeArr.length; ++mergeCheck) {
var tempRow = r + 1 + autoR * plRow;
var tempCol = c + autoC * plCol + 1;
var tempRow = pasteIntoRow + 1;
var tempCol = pasteIntoCol + 1;
if (tempRow <= mergeArr[mergeCheck].r2 && tempRow >= mergeArr[mergeCheck].r1 && tempCol <= mergeArr[mergeCheck].c2 && tempCol >= mergeArr[mergeCheck].c1) {
isMerged = true;
}
}
if ((currentObj.colSpan > 1 || currentObj.rowSpan > 1) && !isMerged) {
pastedRangeProps.offsetLast = {offsetCol: currentObj.colSpan - 1, offsetRow: currentObj.rowSpan - 1};
if ((currentObj.colSpan > 1 || currentObj.rowSpan > 1) && !isMerged) {
var offsetCol = currentObj.colSpan - 1;
var offsetRow = currentObj.rowSpan - 1;
pastedRangeProps.offsetLast = {offsetCol: offsetCol, offsetRow: offsetRow};
mergeArr[n] = {
r1: range.first.row, r2: range.last.row, c1: range.first.col, c2: range.last.col
r1: range.first.row, r2: range.last.row + offsetRow, c1: range.first.col, c2: range.last.col + offsetCol
};
n++;
if (contentCurrentObj[0] == undefined) {
pastedRangeProps.val = '';
}
}
pastedRangeProps.merge = c_oAscMergeOptions.Merge;
}
......@@ -9121,11 +9123,11 @@
pastedRangeProps.borders = currentObj.borders;
}
//wrap
pastedRangeProps.wrap = currentObj.wrap;
//wrap
pastedRangeProps.wrap = currentObj.wrap;
//fill
if (currentObj.bc && currentObj.bc.rgb) {
if (currentObj.bc && currentObj.bc.rgb) {
pastedRangeProps.fill = currentObj.bc;
}
......@@ -9133,15 +9135,15 @@
var link = pasteContent.content[r][c].hyperLink;
if (link) {
pastedRangeProps.hyperLink = pasteContent.content[r][c];
}
//apply props by cell
}
//apply props by cell
applyPropertiesByRange(range, pastedRangeProps);
}
}
}
}
}
}
if (isMultiple) {
arn.r2 = lastSelection.r2;
......@@ -9149,8 +9151,11 @@
}
t.isChanged = true;
var arnFor = [arn, arrFormula];
lastSelection.c2 = arn.c2;
lastSelection.r2 = arn.r2;
var arnFor = [];
arnFor[0] = arn;
arnFor[1] = arrFormula;
return arnFor;
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment