Commit 7f233a40 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@49780 954022d7-b5bf-4e40-9824-e11837661b57
parent 7eb72e66
......@@ -1239,7 +1239,14 @@ CShapeDrawer.prototype =
}
else
{
this.Graphics.put_brushTexture(getFullImageSrc(this.UniFill.fill.RasterImageId), 0);
if (this.UniFill.fill.canvas)
{
this.Graphics.put_brushTexture(this.UniFill.fill.canvas.toDataURL("image/png"), 0);
}
else
{
this.Graphics.put_brushTexture(getFullImageSrc(this.UniFill.fill.RasterImageId), 0);
}
}
}
else
......@@ -1260,7 +1267,14 @@ CShapeDrawer.prototype =
}
else
{
this.Graphics.put_brushTexture(getFullImageSrc(this.UniFill.fill.RasterImageId), 1);
if (this.UniFill.fill.canvas)
{
this.Graphics.put_brushTexture(this.UniFill.fill.canvas.toDataURL("image/png"), 1);
}
else
{
this.Graphics.put_brushTexture(getFullImageSrc(this.UniFill.fill.RasterImageId), 1);
}
}
this.Graphics.put_BrushTextureAlpha(this.UniFill.transparent);
}
......
......@@ -878,9 +878,13 @@ CMetafile.prototype =
this.Memory.WriteByte(CommandType.ctBrushTexturePath);
var _src = src;
var _search = editor.DocumentUrl;
if (0 == _src.indexOf(_search))
_src = _src.substring(_search.length);
if (window.editor)
{
var _search = window.editor.DocumentUrl;
if (0 == _src.indexOf(_search))
_src = _src.substring(_search.length);
}
this.Memory.WriteString(_src);
this.Memory.WriteByte(CommandType.ctBrushTextureMode);
......@@ -1087,20 +1091,32 @@ CMetafile.prototype =
// images
drawImage : function(img,x,y,w,h)
{
var _img = editor.ImageLoader.map_image_index[img];
if (!window.editor)
{
// excel
this.Memory.WriteByte(CommandType.ctDrawImageFromFile);
this.Memory.WriteString2(img);
this.Memory.WriteDouble(x);
this.Memory.WriteDouble(y);
this.Memory.WriteDouble(w);
this.Memory.WriteDouble(h);
return;
}
var _img = window.editor.ImageLoader.map_image_index[img];
if (_img == undefined || _img.Image == null)
return;
var _src = _img.src;
var _search = editor.DocumentUrl;
var _search = window.editor.DocumentUrl;
if (0 == _src.indexOf(_search))
_src = _src.substring(_search.length);
else
{
if (editor.ThemeLoader !== undefined && editor.ThemeLoader != null)
if (window.editor.ThemeLoader !== undefined && window.editor.ThemeLoader != null)
{
if (0 == _src.indexOf(editor.ThemeLoader.ThemesUrl))
_src = _src.substring(editor.ThemeLoader.ThemesUrl.length);
if (0 == _src.indexOf(window.editor.ThemeLoader.ThemesUrl))
_src = _src.substring(window.editor.ThemeLoader.ThemesUrl.length);
}
}
......@@ -1530,7 +1546,10 @@ CDocumentRenderer.prototype =
this.m_arrayPages[this.m_lPagesCount - 1].drawImage(img,x,y,w,h);
else
{
var _img = editor.ImageLoader.map_image_index[img];
if (!window.editor)
this.m_arrayPages[this.m_lPagesCount - 1].drawImage(img,x,y,w,h);
var _img = window.editor.ImageLoader.map_image_index[img];
var w0 = 0;
var h0 = 0;
if (_img != undefined && _img.Image != null)
......
......@@ -609,7 +609,7 @@ function CHorRuler()
__xID = ((2.5 + _offset * dKoef_mm_to_pix) * 2) >> 0;
var __yID = this.m_nBottom - 10;
if (this.IsRetina);
if (this.IsRetina)
__yID <<= 1;
if (0 == i)
......
......@@ -1198,7 +1198,14 @@ CShapeDrawer.prototype =
}
else
{
this.Graphics.put_brushTexture(_getFullImageSrc(this.UniFill.fill.RasterImageId), 0);
if (this.UniFill.fill.canvas)
{
this.Graphics.put_brushTexture(this.UniFill.fill.canvas.toDataURL("image/png"), 0);
}
else
{
this.Graphics.put_brushTexture(_getFullImageSrc(this.UniFill.fill.RasterImageId), 0);
}
}
}
else
......@@ -1219,7 +1226,14 @@ CShapeDrawer.prototype =
}
else
{
this.Graphics.put_brushTexture(_getFullImageSrc(this.UniFill.fill.RasterImageId), 1);
if (this.UniFill.fill.canvas)
{
this.Graphics.put_brushTexture(this.UniFill.fill.canvas.toDataURL("image/png"), 1);
}
else
{
this.Graphics.put_brushTexture(_getFullImageSrc(this.UniFill.fill.RasterImageId), 1);
}
}
this.Graphics.put_BrushTextureAlpha(this.UniFill.transparent);
}
......
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