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

git-svn-id:...

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@51415 954022d7-b5bf-4e40-9824-e11837661b57
parent d476e193
...@@ -477,6 +477,8 @@ CGeometry.prototype= ...@@ -477,6 +477,8 @@ CGeometry.prototype=
{ {
canFill: function() canFill: function()
{ {
if(this.preset === "line")
return false;
for(var i = 0; i < this.pathLst.length; ++i) for(var i = 0; i < this.pathLst.length; ++i)
{ {
if(this.pathLst[i].fill !== "none") if(this.pathLst[i].fill !== "none")
......
This diff is collapsed.
...@@ -1230,7 +1230,7 @@ function CLayoutThumbnailDrawer() ...@@ -1230,7 +1230,7 @@ function CLayoutThumbnailDrawer()
this.DrawingDocument = null; this.DrawingDocument = null;
this.GetThumbnail = function(_layout) this.GetThumbnail = function(_layout, use_background, use_master_shapes, use_layout_shapes)
{ {
_layout.recalculate2(); _layout.recalculate2();
...@@ -1305,21 +1305,28 @@ function CLayoutThumbnailDrawer() ...@@ -1305,21 +1305,28 @@ function CLayoutThumbnailDrawer()
if (_back_fill != null) if (_back_fill != null)
_back_fill.calculate(_theme, null, _layout, _master, RGBA); _back_fill.calculate(_theme, null, _layout, _master, RGBA);
DrawBackground(g, _back_fill, this.WidthMM, this.HeightMM); if (use_background !== false)
DrawBackground(g, _back_fill, this.WidthMM, this.HeightMM);
var _sx = g.m_oCoordTransform.sx; var _sx = g.m_oCoordTransform.sx;
var _sy = g.m_oCoordTransform.sy; var _sy = g.m_oCoordTransform.sy;
if (_layout.showMasterSp == true || _layout.showMasterSp == undefined) if (use_master_shapes !== false)
{ {
_master.draw(g); if (_layout.showMasterSp == true || _layout.showMasterSp == undefined)
{
_master.draw(g);
}
} }
for (var i = 0; i < _layout.cSld.spTree.length; i++) for (var i = 0; i < _layout.cSld.spTree.length; i++)
{ {
var _sp_elem = _layout.cSld.spTree[i]; var _sp_elem = _layout.cSld.spTree[i];
if (!_sp_elem.isPlaceholder()) if (!_sp_elem.isPlaceholder())
_sp_elem.draw(g); {
if (use_layout_shapes !== false)
_sp_elem.draw(g);
}
else else
{ {
_ctx.globalAlpha = 1; _ctx.globalAlpha = 1;
...@@ -1432,6 +1439,21 @@ function CLayoutThumbnailDrawer() ...@@ -1432,6 +1439,21 @@ function CLayoutThumbnailDrawer()
} }
} }
return this.CanvasImage.toDataURL("image/png"); try
{
return this.CanvasImage.toDataURL("image/png");
}
catch (err)
{
this.CanvasImage = null;
if (undefined === use_background && undefined === use_master_shapes && undefined == use_layout_shapes)
return this.GetThumbnail(_layout, true, true, false);
else if (use_background && use_master_shapes && !use_layout_shapes)
return this.GetThumbnail(_layout, true, false, false);
else if (use_background && !use_master_shapes && !use_layout_shapes)
return this.GetThumbnail(_layout, false, false, false);
}
return "";
} }
} }
\ No newline at end of file
...@@ -1008,7 +1008,7 @@ function CMasterThumbnailDrawer() ...@@ -1008,7 +1008,7 @@ function CMasterThumbnailDrawer()
this.DrawingDocument = null; this.DrawingDocument = null;
this.GetThumbnail = function(_master) this.GetThumbnail = function(_master, use_background, use_master_shapes)
{ {
var h_px = 40; var h_px = 40;
var w_px = (this.WidthMM * h_px / this.HeightMM) >> 0; var w_px = (this.WidthMM * h_px / this.HeightMM) >> 0;
...@@ -1066,12 +1066,14 @@ function CMasterThumbnailDrawer() ...@@ -1066,12 +1066,14 @@ function CMasterThumbnailDrawer()
if (_back_fill != null) if (_back_fill != null)
_back_fill.calculate(_theme, null, null, _master, RGBA); _back_fill.calculate(_theme, null, null, _master, RGBA);
DrawBackground(g, _back_fill, this.WidthMM, this.HeightMM); if (use_background !== false)
DrawBackground(g, _back_fill, this.WidthMM, this.HeightMM);
var _sx = g.m_oCoordTransform.sx; var _sx = g.m_oCoordTransform.sx;
var _sy = g.m_oCoordTransform.sy; var _sy = g.m_oCoordTransform.sy;
_master.draw(g); if (use_master_shapes !== false)
_master.draw(g);
g.reset(); g.reset();
g.SetIntegerGrid(true); g.SetIntegerGrid(true);
...@@ -1138,6 +1140,18 @@ function CMasterThumbnailDrawer() ...@@ -1138,6 +1140,18 @@ function CMasterThumbnailDrawer()
History.TurnOn(); History.TurnOn();
_api.isViewMode = _oldTurn; _api.isViewMode = _oldTurn;
return this.CanvasImage.toDataURL("image/png"); try
{
return this.CanvasImage.toDataURL("image/png");
}
catch (err)
{
this.CanvasImage = null;
if (undefined === use_background && undefined === use_master_shapes)
return this.GetThumbnail(_master, true, false);
else if (use_background && !use_master_shapes)
return this.GetThumbnail(_master, false, false);
}
return "";
} }
} }
\ No newline at end of file
...@@ -5572,7 +5572,7 @@ function CDrawingDocument() ...@@ -5572,7 +5572,7 @@ function CDrawingDocument()
var _pos = this.ConvertCoordsToCursor4(xPos, 0, pageNum); var _pos = this.ConvertCoordsToCursor4(xPos, 0, pageNum);
if (_pos.Error === false) if (_pos.Error === false)
{ {
this.m_oWordControl.m_oOverlayApi.DashLineColor = "#FF0000"; this.m_oWordControl.m_oOverlayApi.DashLineColor = "#C8C8C8";
this.m_oWordControl.m_oOverlayApi.VertLine2(_pos.X); this.m_oWordControl.m_oOverlayApi.VertLine2(_pos.X);
this.m_oWordControl.m_oOverlayApi.DashLineColor = "#000000"; this.m_oWordControl.m_oOverlayApi.DashLineColor = "#000000";
} }
...@@ -5589,7 +5589,7 @@ function CDrawingDocument() ...@@ -5589,7 +5589,7 @@ function CDrawingDocument()
var _pos = this.ConvertCoordsToCursor4(0, yPos, pageNum); var _pos = this.ConvertCoordsToCursor4(0, yPos, pageNum);
if (_pos.Error === false) if (_pos.Error === false)
{ {
this.m_oWordControl.m_oOverlayApi.DashLineColor = "#FF0000"; this.m_oWordControl.m_oOverlayApi.DashLineColor = "#C8C8C8";
this.m_oWordControl.m_oOverlayApi.HorLine2(_pos.Y); this.m_oWordControl.m_oOverlayApi.HorLine2(_pos.Y);
this.m_oWordControl.m_oOverlayApi.DashLineColor = "#000000"; this.m_oWordControl.m_oOverlayApi.DashLineColor = "#000000";
} }
......
This diff is collapsed.
...@@ -483,6 +483,8 @@ CGeometry.prototype= ...@@ -483,6 +483,8 @@ CGeometry.prototype=
canFill: function() canFill: function()
{ {
if(this.preset === "line")
return false;
for(var i = 0; i < this.pathLst.length; ++i) for(var i = 0; i < this.pathLst.length; ++i)
{ {
if(this.pathLst[i].fill !== "none") if(this.pathLst[i].fill !== "none")
......
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