Commit 720f6768 authored by Sergey Luzyanin's avatar Sergey Luzyanin Committed by GitHub

Merge pull request #52 from ONLYOFFICE/release/v4.1.0

Release/v4.1.0
parents 11ed355f f7e53982
...@@ -111,7 +111,6 @@ ...@@ -111,7 +111,6 @@
cADDRESS.prototype = Object.create(cBaseFunction.prototype); cADDRESS.prototype = Object.create(cBaseFunction.prototype);
cADDRESS.prototype.Calculate = function (arg) { cADDRESS.prototype.Calculate = function (arg) {
var rowNumber = arg[0], colNumber = arg[1], refType = arg[2] ? arg[2] : new cNumber(1), A1RefType = arg[3] ? var rowNumber = arg[0], colNumber = arg[1], refType = arg[2] ? arg[2] : new cNumber(1), A1RefType = arg[3] ?
arg[3] : new cBool(true), sheetName = arg[4] ? arg[4] : new cEmpty(); arg[3] : new cBool(true), sheetName = arg[4] ? arg[4] : new cEmpty();
...@@ -176,25 +175,29 @@ ...@@ -176,25 +175,29 @@
return this.value = new cError(cErrorType.wrong_value_type); return this.value = new cError(cErrorType.wrong_value_type);
} }
var strRef; var strRef;
var strColumn = A1RefType ? g_oCellAddressUtils.colnumToColstrFromWsView(colNumber) : colNumber; var absR, absC;
var strRow;
switch (refType - 1) { switch (refType - 1) {
case AscCommonExcel.referenceType.A: case AscCommonExcel.referenceType.A:
strRow = this._absolute(rowNumber, A1RefType); absR = true;
strColumn = this._absolute(strColumn, A1RefType); absC = true;
break; break;
case AscCommonExcel.referenceType.ARRC: case AscCommonExcel.referenceType.ARRC:
strRow = this._absolute(rowNumber, A1RefType); absR = true;
absC = false;
break; break;
case AscCommonExcel.referenceType.RRAC: case AscCommonExcel.referenceType.RRAC:
strColumn = this._absolute(strColumn, A1RefType); absR = false;
strRow = rowNumber; absC = true;
break; break;
case AscCommonExcel.referenceType.R: case AscCommonExcel.referenceType.R:
strRow = rowNumber; absR = false;
absC = false;
break; break;
} }
strRef = this._getRef(strRow, strColumn, A1RefType);
strRef = this._getRef(this._absolute(absR, rowNumber, A1RefType),
this._absolute(absC, A1RefType ? g_oCellAddressUtils.colnumToColstrFromWsView(colNumber) : colNumber, A1RefType),
A1RefType);
return this.value = return this.value =
new cString((cElementType.empty === sheetName.type) ? strRef : parserHelp.get3DRef(sheetName.toString(), strRef)); new cString((cElementType.empty === sheetName.type) ? strRef : parserHelp.get3DRef(sheetName.toString(), strRef));
...@@ -202,8 +205,9 @@ ...@@ -202,8 +205,9 @@
cADDRESS.prototype._getRef = function (row, col, A1RefType) { cADDRESS.prototype._getRef = function (row, col, A1RefType) {
return A1RefType ? col + row : 'R' + row + 'C' + col; return A1RefType ? col + row : 'R' + row + 'C' + col;
}; };
cADDRESS.prototype._absolute = function (val, A1RefType) { cADDRESS.prototype._absolute = function (abs, val, A1RefType) {
return A1RefType ? '$' + val : '[' + val + ']';
return abs ? (A1RefType ? '$' + val : val) : (A1RefType ? val : '[' + val + ']');
}; };
cADDRESS.prototype.getInfo = function () { cADDRESS.prototype.getInfo = function () {
return { return {
......
...@@ -1577,6 +1577,12 @@ ...@@ -1577,6 +1577,12 @@
var x = ((event.pageX * AscBrowser.zoom) >> 0) - offs.left; var x = ((event.pageX * AscBrowser.zoom) >> 0) - offs.left;
var y = ((event.pageY * AscBrowser.zoom) >> 0) - offs.top; var y = ((event.pageY * AscBrowser.zoom) >> 0) - offs.top;
if (AscBrowser.isRetina) {
x <<= 1;
y <<= 1;
}
return {x: x, y: y}; return {x: x, y: y};
}; };
......
...@@ -3081,6 +3081,7 @@ CPresentation.prototype = ...@@ -3081,6 +3081,7 @@ CPresentation.prototype =
} }
this.noShowContextMenu = false; this.noShowContextMenu = false;
this.Document_UpdateInterfaceState(); this.Document_UpdateInterfaceState();
this.Api.sendEvent("asc_onSelectionEnd");
}, },
OnMouseMove : function(e, X, Y, PageIndex) OnMouseMove : function(e, X, Y, PageIndex)
......
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