|
|
|
@ -1,5 +1,5 @@
|
|
|
|
|
/*
|
|
|
|
|
* Copyright (C) Ascensio System SIA 2012-2019. All rights reserved
|
|
|
|
|
* Copyright (C) Ascensio System SIA 2012-2020. All rights reserved
|
|
|
|
|
*
|
|
|
|
|
* https://www.onlyoffice.com/
|
|
|
|
|
*
|
|
|
|
@ -204103,7 +204103,7 @@ function DecodeBase64(imData, szSrc)
|
|
|
|
|
{
|
|
|
|
|
this.Api = _api;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.LoadEmbeddedFonts = function(url, _fonts)
|
|
|
|
|
{
|
|
|
|
|
this.embeddedFilesPath = url;
|
|
|
|
@ -204372,7 +204372,7 @@ function DecodeBase64(imData, szSrc)
|
|
|
|
|
oThis.Api.OpenDocumentProgress.CurrentFont++;
|
|
|
|
|
oThis.Api.SendOpenProgress();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
oThis.fonts_loading_after_style[oThis.fonts_loading_after_style.length] = oThis.fonts_loading[0];
|
|
|
|
|
oThis.fonts_loading.shift();
|
|
|
|
|
oThis._LoadFonts();
|
|
|
|
@ -204447,7 +204447,7 @@ function DecodeBase64(imData, szSrc)
|
|
|
|
|
{
|
|
|
|
|
this.embeddedFontFiles[font_index].SetStreamIndex(stream_index);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function CGlobalImageLoader()
|
|
|
|
|
{
|
|
|
|
|
this.map_image_index = {};
|
|
|
|
@ -204459,7 +204459,7 @@ function DecodeBase64(imData, szSrc)
|
|
|
|
|
|
|
|
|
|
this.bIsLoadDocumentFirst = false;
|
|
|
|
|
|
|
|
|
|
this.bIsAsyncLoadDocumentImages = false;
|
|
|
|
|
this.bIsAsyncLoadDocumentImages = true;
|
|
|
|
|
|
|
|
|
|
this.bIsLoadDocumentImagesNoByOrder = true;
|
|
|
|
|
this.nNoByOrderCounter = 0;
|
|
|
|
@ -204520,7 +204520,15 @@ function DecodeBase64(imData, szSrc)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.LoadDocumentImagesCallback = function() {
|
|
|
|
|
|
|
|
|
|
if (this.ThemeLoader == null)
|
|
|
|
|
this.Api.asyncImagesDocumentEndLoaded();
|
|
|
|
|
else
|
|
|
|
|
this.ThemeLoader.asyncImagesEndLoaded();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.LoadDocumentImages = function(_images, isUrl)
|
|
|
|
|
{
|
|
|
|
|
// сначала заполним массив
|
|
|
|
@ -204548,13 +204556,10 @@ function DecodeBase64(imData, szSrc)
|
|
|
|
|
{
|
|
|
|
|
this.LoadImageAsync(i);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.images_loading.splice(0, _len);
|
|
|
|
|
|
|
|
|
|
if (this.ThemeLoader == null)
|
|
|
|
|
this.Api.asyncImagesDocumentEndLoaded();
|
|
|
|
|
else
|
|
|
|
|
this.ThemeLoader.asyncImagesEndLoaded();
|
|
|
|
|
var that = this;
|
|
|
|
|
setTimeout(function() { that.LoadDocumentImagesCallback() }, 3000);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
@ -204678,17 +204683,27 @@ function DecodeBase64(imData, szSrc)
|
|
|
|
|
oImage.Status = ImageLoadStatus.Loading;
|
|
|
|
|
oImage.Image = new Image();
|
|
|
|
|
oThis.map_image_index[oImage.src] = oImage;
|
|
|
|
|
var oThat = oThis;
|
|
|
|
|
oImage.Image.onload = function(){
|
|
|
|
|
oImage.Status = ImageLoadStatus.Complete;
|
|
|
|
|
oThis.Api.asyncImageEndLoadedBackground(oImage);
|
|
|
|
|
oThat.Api.asyncImageEndLoadedBackground(oImage);
|
|
|
|
|
};
|
|
|
|
|
oImage.Image.onerror = function(){
|
|
|
|
|
oImage.Status = ImageLoadStatus.Complete;
|
|
|
|
|
oImage.Image = null;
|
|
|
|
|
oThis.Api.asyncImageEndLoadedBackground(oImage);
|
|
|
|
|
oThat.Api.asyncImageEndLoadedBackground(oImage);
|
|
|
|
|
};
|
|
|
|
|
//oImage.Image.crossOrigin = 'anonymous';
|
|
|
|
|
oThis.loadImageByUrl(oImage.Image, oImage.src);
|
|
|
|
|
|
|
|
|
|
// CRYPTPAD: if we find an image URL with #channel= in it
|
|
|
|
|
// then we need to ask cryptpad to get the blob
|
|
|
|
|
if (oImage.src.indexOf("#src=")!=-1)
|
|
|
|
|
window.parent.APP.getImageURL(oImage.src, function(url) {
|
|
|
|
|
oThis.loadImageByUrl(oImage.Image, url);
|
|
|
|
|
oThis.map_image_index[url] = oImage;
|
|
|
|
|
});
|
|
|
|
|
else
|
|
|
|
|
oThis.loadImageByUrl(oImage.Image, oImage.src);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
this.LoadImagesWithCallback = function(arr, loadImageCallBack, loadImageCallBackArgs)
|
|
|
|
@ -205439,7 +205454,16 @@ CCollaborativeEditingBase.prototype.Clear_NewImages = function()
|
|
|
|
|
};
|
|
|
|
|
CCollaborativeEditingBase.prototype.Add_NewImage = function(Url)
|
|
|
|
|
{
|
|
|
|
|
this.m_aNewImages.push( Url );
|
|
|
|
|
// CryptPad - Modify URL for local loading
|
|
|
|
|
var that = this;
|
|
|
|
|
if (Url.indexOf("#src=")!=-1) {
|
|
|
|
|
window.parent.APP.getImageURL(Url, function(url) {
|
|
|
|
|
that.m_aNewImages.push( Url );
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
this.m_aNewImages.push( Url );
|
|
|
|
|
}
|
|
|
|
|
// CryptPad - End modification
|
|
|
|
|
};
|
|
|
|
|
//-----------------------------------------------------------------------------------
|
|
|
|
|
// Функции для работы с массивом m_aDC
|
|
|
|
|