Commit b37666fe authored by GoshaZotov's avatar GoshaZotov

add transpose property

parent b9f71a61
...@@ -97,6 +97,7 @@ ...@@ -97,6 +97,7 @@
this.images = true; this.images = true;
this.width = null; this.width = null;
this.transpose = null;
} }
СSpecialPasteProps.prototype = { СSpecialPasteProps.prototype = {
...@@ -125,6 +126,7 @@ ...@@ -125,6 +126,7 @@
this.images = true; this.images = true;
this.width = null; this.width = null;
this.transpose = null;
}, },
revert: function() revert: function()
{ {
...@@ -148,6 +150,7 @@ ...@@ -148,6 +150,7 @@
this.images = null; this.images = null;
this.width = null; this.width = null;
this.transpose = null;
}, },
asc_setProps: function(props) asc_setProps: function(props)
{ {
...@@ -226,6 +229,7 @@ ...@@ -226,6 +229,7 @@
} }
case c_oSpecialPasteProps.transpose: case c_oSpecialPasteProps.transpose:
{ {
this.transpose = true;
break; break;
} }
case c_oSpecialPasteProps.link: case c_oSpecialPasteProps.link:
......
...@@ -9030,7 +9030,7 @@ ...@@ -9030,7 +9030,7 @@
var sProps = Asc.c_oSpecialPasteProps; var sProps = Asc.c_oSpecialPasteProps;
if(fromBinary) if(fromBinary)
{ {
allowedSpecialPasteProps = [sProps.paste, sProps.pasteOnlyFormula, sProps.formulaNumberFormat, sProps.formulaAllFormatting, sProps.formulaWithoutBorders, sProps.formulaColumnWidth, sProps.pasteOnlyValues, sProps.valueNumberFormat, sProps.valueAllFormating, sProps.pasteOnlyFormating/*, sProps.link*/]; allowedSpecialPasteProps = [sProps.paste, sProps.pasteOnlyFormula, sProps.formulaNumberFormat, sProps.formulaAllFormatting, sProps.formulaWithoutBorders, sProps.formulaColumnWidth, sProps.transpose, sProps.pasteOnlyValues, sProps.valueNumberFormat, sProps.valueAllFormating, sProps.pasteOnlyFormating/*, sProps.link*/];
} }
else else
{ {
...@@ -9628,21 +9628,22 @@ ...@@ -9628,21 +9628,22 @@
for (var autoR = 0; autoR < maxARow; ++autoR) { for (var autoR = 0; autoR < maxARow; ++autoR) {
for (var autoC = 0; autoC < maxACol; ++autoC) { for (var autoC = 0; autoC < maxACol; ++autoC) {
for (var r = arn.r1; r < rMax; ++r) { for (var r = 0; r < rMax - arn.r1; ++r) {
for (var c = arn.c1; c < cMax; ++c) { for (var c = 0; c < cMax - arn.c1; ++c) {
var pasteRow = r - arn.r1 + activeCellsPasteFragment.r1; var pasteRow = r + activeCellsPasteFragment.r1;
var pasteCol = c - arn.c1 + activeCellsPasteFragment.c1; var pasteCol = c + activeCellsPasteFragment.c1;
var newVal = val.getCell3(pasteRow, pasteCol); var newVal = val.getCell3(pasteRow, pasteCol);
var curMerge = newVal.hasMerged(); var curMerge = newVal.hasMerged();
if (undefined !== newVal) { if (undefined !== newVal) {
var nRow = r + autoR * plRow; var nRow = r + autoR * plRow + arn.r1;
var nCol = c + autoC * plCol + arn.c1;
if (nRow > gc_nMaxRow0) { if (nRow > gc_nMaxRow0) {
nRow = gc_nMaxRow0; nRow = gc_nMaxRow0;
} }
var nCol = c + autoC * plCol;
if (nCol > gc_nMaxCol0) { if (nCol > gc_nMaxCol0) {
nCol = gc_nMaxCol0; nCol = gc_nMaxCol0;
} }
...@@ -9651,9 +9652,9 @@ ...@@ -9651,9 +9652,9 @@
putInsertedCellIntoRange(nRow, nCol, pasteRow, pasteCol, autoR * plRow, autoC * plCol, range, newVal); putInsertedCellIntoRange(nRow, nCol, pasteRow, pasteCol, autoR * plRow, autoC * plCol, range, newVal);
//если замержили range //если замержили range
c = range.bbox.c2 - autoC * plCol; c = range.bbox.c2 - autoC * plCol - arn.c1;
if (c === cMax) { if (c === cMax) {
r = range.bbox.r2 - autoC * plCol; r = range.bbox.r2 - autoC * plCol - arn.r1;
} }
} }
} }
......
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