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