Commit b13152a7 authored by Oleg Korshul's avatar Oleg Korshul Committed by GitHub

Merge pull request #122 from ONLYOFFICE/hotfix/v4.3.5

Hotfix/v4.3.5
parents 5cbf688f e1e49f81
......@@ -4868,10 +4868,13 @@
res = this.bcr.Read1(length, function (t, l) {
return oThis.ReadBorders(t, l, oStyleObject.aBorders);
});
oStyleObject.aBorders[0] = new AscCommonExcel.Border();
} else if (c_oSerStylesTypes.Fills === type) {
res = this.bcr.Read1(length, function (t, l) {
return oThis.ReadFills(t, l, oStyleObject.aFills);
});
oStyleObject.aFills[0] = new AscCommonExcel.Fill();
oStyleObject.aFills[1] = new AscCommonExcel.Fill();
} else if (c_oSerStylesTypes.Fonts === type) {
res = this.bcr.Read1(length, function (t, l) {
return oThis.ReadFonts(t, l, oStyleObject.aFonts);
......
......@@ -435,6 +435,11 @@
this.bIsAsyncLoadDocumentImages = false;
this.bIsLoadDocumentImagesNoByOrder = true;
this.nNoByOrderCounter = 0;
var oThis = this;
this.put_Api = function(_api)
{
this.Api = _api;
......@@ -467,6 +472,7 @@
if (!this.bIsAsyncLoadDocumentImages)
{
this.nNoByOrderCounter = 0;
this._LoadImages();
}
else
......@@ -486,11 +492,14 @@
}
};
var oThis = this;
this._LoadImages = function()
{
if (0 == this.images_loading.length)
var _count_images = this.images_loading.length;
if (0 == _count_images)
{
this.nNoByOrderCounter = 0;
if (this.ThemeLoader == null)
this.Api.asyncImagesDocumentEndLoaded();
else
......@@ -499,38 +508,65 @@
return;
}
var _id = this.images_loading[0];
var oImage = new CImage(_id);
oImage.Status = ImageLoadStatus.Loading;
oImage.Image = new Image();
oThis.map_image_index[oImage.src] = oImage;
oImage.Image.onload = function(){
oImage.Status = ImageLoadStatus.Complete;
if (oThis.bIsLoadDocumentFirst === true)
{
oThis.Api.OpenDocumentProgress.CurrentImage++;
oThis.Api.SendOpenProgress();
}
oThis.images_loading.shift();
oThis._LoadImages();
};
oImage.Image.onerror = function(){
oImage.Status = ImageLoadStatus.Complete;
oImage.Image = null;
if (oThis.bIsLoadDocumentFirst === true)
{
oThis.Api.OpenDocumentProgress.CurrentImage++;
oThis.Api.SendOpenProgress();
}
oThis.images_loading.shift();
oThis._LoadImages();
};
//oImage.Image.crossOrigin = 'anonymous';
oImage.Image.src = oImage.src;
for (var i = 0; i < _count_images; i++)
{
var _id = this.images_loading[i];
var oImage = new CImage(_id);
oImage.Status = ImageLoadStatus.Loading;
oImage.Image = new Image();
oThis.map_image_index[oImage.src] = oImage;
oImage.Image.parentImage = oImage;
oImage.Image.onload = function ()
{
this.parentImage.Status = ImageLoadStatus.Complete;
oThis.nNoByOrderCounter++;
if (oThis.bIsLoadDocumentFirst === true)
{
oThis.Api.OpenDocumentProgress.CurrentImage++;
oThis.Api.SendOpenProgress();
}
if (!oThis.bIsLoadDocumentImagesNoByOrder)
{
oThis.images_loading.shift();
oThis._LoadImages();
}
else if (oThis.nNoByOrderCounter == oThis.images_loading.length)
{
oThis.images_loading = [];
oThis._LoadImages();
}
};
oImage.Image.onerror = function ()
{
this.parentImage.Status = ImageLoadStatus.Complete;
this.parentImage.Image = null;
oThis.nNoByOrderCounter++;
if (oThis.bIsLoadDocumentFirst === true)
{
oThis.Api.OpenDocumentProgress.CurrentImage++;
oThis.Api.SendOpenProgress();
}
if (!oThis.bIsLoadDocumentImagesNoByOrder)
{
oThis.images_loading.shift();
oThis._LoadImages();
}
else if (oThis.nNoByOrderCounter == oThis.images_loading.length)
{
oThis.images_loading = [];
oThis._LoadImages();
}
};
//oImage.Image.crossOrigin = 'anonymous';
oImage.Image.src = oImage.src;
if (!oThis.bIsLoadDocumentImagesNoByOrder)
return;
}
};
this.LoadImage = function(src, Type)
......
......@@ -1672,6 +1672,10 @@ function BinaryPPTYLoader()
}
}
if(!uni_color.color){
return null;
}
s.Seek2(read_end);
return uni_color;
}
......
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