Commit 56ab4b6a authored by GoshaZotov's avatar GoshaZotov

transpose merge cells

parent aab3a4f6
......@@ -9546,6 +9546,17 @@
}
pastedRangeProps.offsetLast = {offsetCol: offsetCol, offsetRow: offsetRow};
if(specialPasteProps.transpose)
{
mergeArr.push(new Asc.Range(
curMerge.c1 + arn.c1 - activeCellsPasteFragment.r1 + colDiff,
curMerge.r1 + arn.r1 - activeCellsPasteFragment.c1 + rowDiff,
curMerge.c2 + arn.c1 - activeCellsPasteFragment.r1 + colDiff,
curMerge.r2 + arn.r1 - activeCellsPasteFragment.c1 + rowDiff
));
}
else
{
mergeArr.push(new Asc.Range(
curMerge.c1 + arn.c1 - activeCellsPasteFragment.c1 + colDiff,
curMerge.r1 + arn.r1 - activeCellsPasteFragment.r1 + rowDiff,
......@@ -9554,6 +9565,7 @@
));
}
}
}
else {
if (!isMerged) {
pastedRangeProps.offsetLast = {offsetCol: isMergedFirstCell.c2 - isMergedFirstCell.c1, offsetRow: isMergedFirstCell.r2 - isMergedFirstCell.r1};
......@@ -9683,6 +9695,7 @@
var curMerge = newVal.hasMerged();
if(curMerge && specialPasteProps.transpose)
{
curMerge = curMerge.clone();
var r1 = curMerge.r1;
var r2 = curMerge.r2;
var c1 = curMerge.c1;
......
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