Commit 7ada3f36 authored by Ilya Kirillov's avatar Ilya Kirillov Committed by GitHub

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

Release/v4.1.0
parents 3f414e86 e3fd7c53
......@@ -32,11 +32,10 @@
"use strict";
(/**
* @param {jQuery} $
* @param {Window} window
* @param {undefined} undefined
*/
function ( $, window, undefined ) {
function (window, undefined) {
/*
......@@ -5425,12 +5424,13 @@
to1 = this.model.workbook.dependencyFormulas.getNode( this.model.getId(), c.getName() );
for ( var id2 in nodes ) {
if ( this.depDrawCells[id2] ) {
$.extend( this.depDrawCells[id2].to, to )
// remove extend
//$.extend( this.depDrawCells[id2].to, to )
}
else {
this.depDrawCells[id2] = {}
this.depDrawCells[id2].from = nodes[id2].returnCell()
this.depDrawCells[id2].to = {}
this.depDrawCells[id2] = {};
this.depDrawCells[id2].from = nodes[id2].returnCell();
this.depDrawCells[id2].to = {};
this.depDrawCells[id2].to[id] = to1;
}
}
......@@ -13801,4 +13801,4 @@
//------------------------------------------------------------export---------------------------------------------------
window['AscCommonExcel'] = window['AscCommonExcel'] || {};
window["AscCommonExcel"].WorksheetView = WorksheetView;
})( jQuery, window );
})(window);
......@@ -942,7 +942,7 @@
this.TimeDown = new Date().getTime();
var bIsKoefPixToMM = false;
var _matrix = this.DrawingDocument.TextMatrix;
var _matrix = this.DrawingDocument.SelectionMatrix;
if (_matrix && global_MatrixTransformer.IsIdentity(_matrix))
_matrix = null;
......@@ -1941,7 +1941,7 @@
if (null != this.RectSelect1 && null != this.RectSelect2 && !this.HtmlPage.m_oApi.isViewMode)
{
var _matrix = this.DrawingDocument.TextMatrix;
var _matrix = this.DrawingDocument.SelectionMatrix;
var pos1 = null;
var pos4 = null;
......@@ -2038,7 +2038,7 @@
var pos1 = null;
var pos4 = null;
var _matrix = this.DrawingDocument.TextMatrix;
var _matrix = this.DrawingDocument.SelectionMatrix;
if (!_matrix || global_MatrixTransformer.IsIdentity(_matrix))
{
pos1 = this.DrawingDocument.ConvertCoordsToCursorWR(this.RectSelect1.x, this.RectSelect1.y, this.PageSelect1);
......@@ -2068,7 +2068,7 @@
if (null == this.RectSelect1 || null == this.RectSelect2)
return;
var _matrix = this.DrawingDocument.TextMatrix;
var _matrix = this.DrawingDocument.SelectionMatrix;
if (!_matrix || global_MatrixTransformer.IsIdentity(_matrix))
{
......@@ -2179,7 +2179,7 @@
if (null == this.RectSelect1 || null == this.RectSelect2)
return;
var _matrix = this.DrawingDocument.TextMatrix;
var _matrix = this.DrawingDocument.SelectionMatrix;
if (!_matrix || global_MatrixTransformer.IsIdentity(_matrix))
{
......@@ -2558,6 +2558,8 @@
return;
var _table_markup = horRuler.m_oTableMarkup;
if (_table_markup.Rows.length == 0)
return;
this.HtmlPage.CheckShowOverlay();
......
......@@ -38,7 +38,6 @@ AscCommon.baseEditorsApi.prototype._onEndPermissions = function()
{
var oResult = new AscCommon.asc_CAscEditorPermissions();
oResult.setLicenseType(Asc.c_oLicenseResult.Success);
oResult.setCanLicense(true);
oResult.setCanBranding(true);
this.sendEvent('asc_onGetEditorPermissions', oResult);
}
......
......@@ -45,10 +45,6 @@ var TRACK_ADJUSTMENT_SIZE = 10;
var TRACK_WRAPPOINTS_SIZE = 6;
var IMAGE_ROTATE_TRACK_W = 21;
if (AscBrowser.isRetina && AscBrowser.isMobile) {
TRACK_DISTANCE_ROTATE <<= 1;
}
var bIsUseImageRotateTrack = true;
if (bIsUseImageRotateTrack)
{
......
......@@ -38,7 +38,6 @@ AscCommon.baseEditorsApi.prototype._onEndPermissions = function () {
if (null !== this.licenseResult) {
var type = this.licenseResult['type'];
oResult.setLicenseType(type);
oResult.setCanLicense(Asc.c_oLicenseResult.Success === type);
oResult.setCanBranding(Asc.c_oLicenseResult.Error !== type); // Для тех, у кого есть лицензия, branding доступен
oResult.setIsLight(this.licenseResult['light']);
}
......
......@@ -120,7 +120,6 @@
*/
function asc_CAscEditorPermissions() {
this.licenseType = c_oLicenseResult.Error;
this.canLicense = false;
this.isLight = false;
this.canCoAuthoring = true;
this.canReaderMode = true;
......@@ -134,9 +133,6 @@
asc_CAscEditorPermissions.prototype.asc_getLicenseType = function () {
return this.licenseType;
};
asc_CAscEditorPermissions.prototype.asc_getCanLicense = function () {
return this.canLicense;
};
asc_CAscEditorPermissions.prototype.asc_getCanCoAuthoring = function () {
return this.canCoAuthoring;
};
......@@ -162,9 +158,6 @@
asc_CAscEditorPermissions.prototype.setLicenseType = function (v) {
this.licenseType = v;
};
asc_CAscEditorPermissions.prototype.setCanLicense = function (v) {
this.canLicense = v;
};
asc_CAscEditorPermissions.prototype.setCanBranding = function (v) {
this.canBranding = v;
};
......@@ -2681,11 +2674,11 @@
prot['Success'] = prot.Success;
prot['UnknownUser'] = prot.UnknownUser;
prot['Connections'] = prot.Connections;
prot['ExpiredTrial'] = prot.ExpiredTrial;
window["AscCommon"].asc_CAscEditorPermissions = asc_CAscEditorPermissions;
prot = asc_CAscEditorPermissions.prototype;
prot["asc_getLicenseType"] = prot.asc_getLicenseType;
prot["asc_getCanLicense"] = prot.asc_getCanLicense;
prot["asc_getCanCoAuthoring"] = prot.asc_getCanCoAuthoring;
prot["asc_getCanReaderMode"] = prot.asc_getCanReaderMode;
prot["asc_getCanBranding"] = prot.asc_getCanBranding;
......
......@@ -331,6 +331,9 @@
var xPos = x ? x : parseInt(oTarget.style.left);
var yPos = (y ? y : parseInt(oTarget.style.top)) + parseInt(oTarget.style.height);
if (AscCommon.AscBrowser.isSafari && AscCommon.AscBrowser.isMobile)
xPos = -100;
if (!this.isDebug && !this.isSystem)
{
this.HtmlDiv.style.left = xPos + this.FixedPosCheckElementX + "px";
......@@ -451,6 +454,9 @@
this.debugTexBoxMaxH = 50;
}
if (AscCommon.AscBrowser.isSafari && AscCommon.AscBrowser.isMobile)
_left = -100;
this.HtmlDiv.style.left = _left + "px";
this.HtmlDiv.style.top = _top + "px";
......
......@@ -563,6 +563,7 @@ function CEditorPage(api)
else
{
this.bIsRetinaSupport = false;
this.m_oOverlayApi.IsRetina = this.bIsRetinaSupport;
}
if (old != this.bIsRetinaSupport)
......@@ -3038,10 +3039,20 @@ function CEditorPage(api)
this.m_oApi.syncOnThumbnailsShow();
AscCommon.InitBrowserInputContext(this.m_oApi, "id_target_cursor");
if (AscCommon.g_inputContext)
AscCommon.g_inputContext.onResize("id_main_view");
if (!this.m_oApi.isMobileVersion)
{
AscCommon.InitBrowserInputContext(this.m_oApi, "id_target_cursor");
if (AscCommon.g_inputContext)
AscCommon.g_inputContext.onResize("id_main_view");
}
else
{
window.onkeydown = this.onKeyDown;
window.onkeypress = this.onKeyPress;
window.onkeyup = this.onKeyUp;
window['AscCommon'].g_clipboardBase.Init(api);
}
};
this.StartMainTimer = function()
......
......@@ -2032,6 +2032,8 @@ function CDrawingDocument()
this.TargetShowFlag = false;
this.TargetShowNeedFlag = false;
this.SelectionMatrix = null;
this.CanvasHit = document.createElement('canvas');
this.CanvasHit.width = 10;
this.CanvasHit.height = 10;
......@@ -2636,7 +2638,7 @@ function CDrawingDocument()
var x_mm = (_x - rect.left) * dKoef;
var y_mm = (_y - rect.top) * dKoef;
return { X : x_mm, Y : y_mm, Page: rect.pageIndex, DrawPage: i };
return { X : x_mm, Y : y_mm, Page: rect.pageIndex, DrawPage: page };
}
this.ConvertCoordsToAnotherPage = function(x, y, pageCoord, pageNeed)
......@@ -4394,6 +4396,9 @@ function CDrawingDocument()
this.AddPageSelection = function(pageIndex, x, y, w, h)
{
if (null == this.SelectionMatrix)
this.SelectionMatrix = this.TextMatrix;
this.IsTextMatrixUse = ((null != this.TextMatrix) && !global_MatrixTransformer.IsIdentity(this.TextMatrix));
if (pageIndex < this.m_lDrawingFirst || pageIndex > this.m_lDrawingEnd)
......
......@@ -1417,7 +1417,11 @@ CGraphics.prototype =
var _w2 = 3;
var _lineWidth = 1;
if (AscBrowser.isRetina)
var _isRetina = AscBrowser.isRetina;
if (_isRetina && !editor.WordControl.bIsRetinaSupport)
_isRetina = false;
if (_isRetina)
{
_y >>= 0;
_lineWidth = 2;
......@@ -1456,7 +1460,7 @@ CGraphics.prototype =
}
}
if (AscBrowser.isRetina)
if (_isRetina)
{
_w1 <<= 1;
_w2 <<= 1;
......@@ -1496,10 +1500,10 @@ CGraphics.prototype =
}
}
this.DrawStringASCII("Courier New", AscBrowser.isRetina ? 18 : 9, false, false, _header_text, 2, yPos, true);
this.DrawStringASCII("Courier New", _isRetina ? 18 : 9, false, false, _header_text, 2, yPos, true);
if (bIsRepeat)
this.DrawStringASCII2("Courier New", AscBrowser.isRetina ? 18 : 9, false, false, "Same as Previous", 2, yPos, true);
this.DrawStringASCII2("Courier New", _isRetina ? 18 : 9, false, false, "Same as Previous", 2, yPos, true);
if (false == bIsNoIntGrid)
this.SetIntegerGrid(false);
......@@ -1514,7 +1518,11 @@ CGraphics.prototype =
var _w2 = 3;
var _lineWidth = 1;
if (AscBrowser.isRetina)
var _isRetina = AscBrowser.isRetina;
if (_isRetina && !editor.WordControl.bIsRetinaSupport)
_isRetina = false;
if (_isRetina)
{
_y >>= 0;
_lineWidth = 2;
......@@ -1552,7 +1560,7 @@ CGraphics.prototype =
}
}
if (AscBrowser.isRetina)
if (_isRetina)
{
_w1 <<= 1;
_w2 <<= 1;
......@@ -1594,10 +1602,10 @@ CGraphics.prototype =
}
}
this.DrawStringASCII("Courier New", AscBrowser.isRetina ? 18 : 9, false, false, _header_text, 2, yPos, false);
this.DrawStringASCII("Courier New", _isRetina ? 18 : 9, false, false, _header_text, 2, yPos, false);
if (bIsRepeat)
this.DrawStringASCII2("Courier New", AscBrowser.isRetina ? 18 : 9, false, false, "Same as Previous", 2, yPos, false);
this.DrawStringASCII2("Courier New", _isRetina ? 18 : 9, false, false, "Same as Previous", 2, yPos, false);
if (false == bIsNoIntGrid)
this.SetIntegerGrid(false);
......
This diff is collapsed.
......@@ -1572,14 +1572,14 @@ CHeaderFooterController.prototype =
if (oHeader)
{
oHeader.Set_Page(nPageIndex);
nOldHeaderCurPage = oHeader.RecalcInfo.CurPage;
oHeader.Set_Page(nPageIndex);
}
if (oFooter)
{
oFooter.Set_Page(nPageIndex);
nOldFooterCurPage = oFooter.RecalcInfo.CurPage;
oFooter.Set_Page(nPageIndex);
}
this.LogicDocument.DrawingObjects.mergeDrawings(nPageIndex, arrHeaderDrawings, arrHeaderTables, arrFooterDrawings, arrFooterTables);
......@@ -1602,14 +1602,14 @@ CHeaderFooterController.prototype =
if (oHeader)
{
oHeader.Set_Page(nPageIndex);
nOldHeaderCurPage = oHeader.RecalcInfo.CurPage;
oHeader.Set_Page(nPageIndex);
}
if (oFooter)
{
oFooter.Set_Page(nPageIndex);
nOldFooterCurPage = oFooter.RecalcInfo.CurPage;
oFooter.Set_Page(nPageIndex);
}
this.LogicDocument.DrawingObjects.drawBehindDocHdrFtr(nPageIndex, pGraphics);
......
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