Commit 247b5513 authored by Oleg.Korshul's avatar Oleg.Korshul Committed by Alexander.Trofimov

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@47266 954022d7-b5bf-4e40-9824-e11837661b57
parent e77898b1
......@@ -62,6 +62,23 @@ function CStream(data, size)
return t;
}
this.GetStringA = function(len)
{
if (this.pos + len > this.size)
return "";
var t = "";
for (var i = 0; i < len; i++)
{
var _c = this.data[this.pos + i];
if (_c == 0)
break;
t += String.fromCharCode(_c);
}
this.pos += len;
return t;
}
// 2 byte
this.GetUShort = function()
{
......@@ -585,6 +602,29 @@ function CDocMeta()
return;
}
else if (3 == _type)
{
var _lenA = s.GetULong();
var _src = "data:image/svg+xml;base64," + s.GetStringA(_lenA);
obj.StreamPos = s.pos;
var img = new Image();
img.onload = function(){
if (1 != obj.BreakDrawing)
{
g.drawImage2(img, 0, 0, page.width_mm, page.height_mm);
}
oThisDoc.OnImageLoad(obj);
};
img.onerror = function(){
oThisDoc.OnImageLoad(obj);
};
img.src = _src;
return;
}
var _src = (0 == _type) ? (this.DocumentUrl + "media/image" + s.GetLong() + ".jpg") : (this.DocumentUrl + "media/image" + s.GetLong() + ".png");
......
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