Commit 122a34e9 authored by Sergey Konovalov's avatar Sergey Konovalov Committed by GitHub

Merge pull request #154 from ONLYOFFICE/release/v5.0.0

Release/v5.0.0
parents 22db3b3d 2d751400
......@@ -1005,7 +1005,7 @@ var editor;
}
}).then(function (content) {
if (content) {
pivotTableCacheDefinition = new CT_PivotCacheDefinition();
pivotTableCacheDefinition = new Asc.CT_PivotCacheDefinition();
new openXml.SaxParserBase().parse(content, pivotTableCacheDefinition);
if (pivotTableCacheDefinition.isValidCacheSource()) {
wb.pivotCaches[wbPivotCacheXml.cacheId] = pivotTableCacheDefinition;
......@@ -1018,7 +1018,7 @@ var editor;
}
}).then(function (content) {
if (content) {
var pivotTableCacheRecords = new CT_PivotCacheRecords();
var pivotTableCacheRecords = new Asc.CT_PivotCacheRecords();
new openXml.SaxParserBase().parse(content, pivotTableCacheRecords);
pivotTableCacheDefinition.cacheRecords = pivotTableCacheRecords;
}
......@@ -1045,7 +1045,7 @@ var editor;
if (res) {
var ws = wb.getWorksheet(wsIndex);
for (var i = 0; i < res.length; ++i) {
var pivotTable = new CT_pivotTableDefinition();
var pivotTable = new Asc.CT_pivotTableDefinition();
new openXml.SaxParserBase().parse(res[i], pivotTable);
var cacheDefinition = wb.pivotCaches[pivotTable.cacheId];
if (cacheDefinition) {
......@@ -1058,14 +1058,16 @@ var editor;
});
}, Promise.resolve());
}
});
Promise.all([loadAsyncFile, Asc.ReadDefTableStyles(wb)]).then(function () {
}).catch(function (err) {
//don't show error.(case of open xls, ods, csv)
if (window.console && window.console.log) {
window.console.log(err);
}
}).then(function (err) {
//clean up
openXml.SaxParserDataTransfer = {};
resolve();
}).catch(function (err) {
reject(err);
});
return Asc.ReadDefTableStyles(wb);
}).then(resolve, reject);
}
});
});
......
......@@ -457,10 +457,7 @@ CShape.prototype.handleUpdateGeometry = function()
CShape.prototype.convertPixToMM = function(pix)
{
var drawingObjects = getDrawingObjects_Sp(this);
var _ret = drawingObjects ? drawingObjects.convertMetric(pix, 0, 3) : 0;
if(AscCommon.AscBrowser.isRetina){
_ret *= 2;
}
var _ret = drawingObjects ? drawingObjects.convertMetric(AscCommon.AscBrowser.convertToRetinaValue(pix, true), 0, 3) : 0;
return _ret;
};
CShape.prototype.getCanvasContext = function()
......
......@@ -10362,7 +10362,11 @@ prot['Second'] = prot.Second;
window['AscCommonExcel'].ToName_ST_ItemType = ToName_ST_ItemType;
window["Asc"]["CT_pivotTableDefinition"] = CT_pivotTableDefinition;
window['Asc']['CT_PivotCacheDefinition'] = window['Asc'].CT_PivotCacheDefinition = CT_PivotCacheDefinition;
window['Asc']['CT_PivotCacheRecords'] = window['Asc'].CT_PivotCacheRecords = CT_PivotCacheRecords;
window["Asc"]["CT_pivotTableDefinition"] = window['Asc'].CT_pivotTableDefinition = CT_pivotTableDefinition;
prot = CT_pivotTableDefinition.prototype;
prot["asc_getName"] = prot.asc_getName;
prot["asc_getPageWrap"] = prot.asc_getPageWrap;
......
......@@ -362,8 +362,8 @@ DrawingObjectsController.prototype.addChartDrawingObject = function(options)
}
else
{
w = this.drawingObjects.convertMetric(AscCommon.c_oAscChartDefines.defaultChartWidth, 0, 3);
h = this.drawingObjects.convertMetric(AscCommon.c_oAscChartDefines.defaultChartHeight, 0, 3);
w = this.drawingObjects.convertMetric(AscCommon.AscBrowser.convertToRetinaValue(AscCommon.c_oAscChartDefines.defaultChartWidth, true), 0, 3);
h = this.drawingObjects.convertMetric(AscCommon.AscBrowser.convertToRetinaValue(AscCommon.c_oAscChartDefines.defaultChartHeight, true), 0, 3);
}
var chartLeft, chartTop;
......
......@@ -12956,6 +12956,10 @@
WorksheetView.prototype.af_setDialogProp = function (filterProp, isReturnProps) {
var ws = this.model;
if(!filterProp){
return;
}
//get filter
var filter, autoFilter, displayName = null;
if (filterProp.id === null) {
......
......@@ -944,6 +944,7 @@
changeType: function (type) {
if(null === this.type){
this.putType(type);
return;
}
if (this.type === type) {
......
......@@ -759,22 +759,23 @@ function CEditorPage(api)
});
document.getElementById("dem_id_end").onclick = function() {
this.elementReporter1 = document.getElementById("dem_id_end");
this.elementReporter1.onclick = function() {
window.editor.EndDemonstration();
};
document.getElementById("dem_id_prev").onclick = function() {
this.elementReporter2 = document.getElementById("dem_id_prev");
this.elementReporter2.onclick = function() {
window.editor.DemonstrationPrevSlide();
};
document.getElementById("dem_id_next").onclick = function() {
this.elementReporter3 = document.getElementById("dem_id_next");
this.elementReporter3.onclick = function() {
window.editor.DemonstrationNextSlide();
};
document.getElementById("dem_id_play").onclick = function() {
this.elementReporter4 = document.getElementById("dem_id_play");
this.elementReporter4.onclick = function() {
var _wordControl = window.editor.WordControl;
var _isNowPlaying = _wordControl.DemonstrationManager.IsPlayMode;
......@@ -808,7 +809,8 @@ function CEditorPage(api)
}
};
document.getElementById("dem_id_reset").onclick = function() {
this.elementReporter5 = document.getElementById("dem_id_reset");
this.elementReporter5.onclick = function() {
var _wordControl = window.editor.WordControl;
_wordControl.reporterTimerAdd = 0;
......@@ -817,7 +819,8 @@ function CEditorPage(api)
};
document.getElementById("dem_id_pointer").onclick = function() {
this.elementReporter6 = document.getElementById("dem_id_pointer");
this.elementReporter6.onclick = function() {
var _wordControl = window.editor.WordControl;
var _elem1 = document.getElementById("dem_id_pointer");
......@@ -862,6 +865,16 @@ function CEditorPage(api)
window.addEventListener('message', this.m_oApi.DemonstrationToReporterMessages, false);
}
}
else
{
if (window.addEventListener)
{
window.addEventListener("beforeunload", function (e)
{
window.editor.EndDemonstration();
});
}
}
// --------------------------------------------------------------------------
this.m_oDrawingDocument.TargetHtmlElement = document.getElementById('id_target_cursor');
......@@ -2869,6 +2882,12 @@ function CEditorPage(api)
{
this.m_oBoundsController.ClearNoAttack();
this.onTimerScroll_sync();
if (this.m_bIsRuler)
{
this.UpdateHorRulerBack(true);
this.UpdateVerRulerBack(true);
}
return;
}
}
......@@ -2878,6 +2897,12 @@ function CEditorPage(api)
{
this.m_oBoundsController.ClearNoAttack();
this.onTimerScroll_sync();
if (this.m_bIsRuler)
{
this.UpdateHorRulerBack(true);
this.UpdateVerRulerBack(true);
}
return;
}
}
......
......@@ -6025,6 +6025,9 @@ background-repeat: no-repeat;\
asc_docs_api.prototype.preloadReporter = function(data)
{
this.reporterTranslates = [data["translations"]["reset"], data["translations"]["slideOf"], data["translations"]["endSlideshow"]];
if (!this.WordControl)
return;
this.WordControl.reporterTranslates = this.reporterTranslates;
var _button1 = document.getElementById("dem_id_reset");
......
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