Commit 92450ded authored by Oleg Korshul's avatar Oleg Korshul

ClearLastFont in graphics (for use global fontmanagers outside graphics)

parent 57146166
...@@ -479,6 +479,12 @@ CGraphics.prototype = ...@@ -479,6 +479,12 @@ CGraphics.prototype =
this.m_oFontManager.m_pFont = null; this.m_oFontManager.m_pFont = null;
}, },
ClearLastFont : function()
{
this.m_oLastFont = new AscCommon.CFontSetup();
this.m_oLastFont2 = null;
},
// images // images
drawImage2 : function(img,x,y,w,h,alpha,srcRect) drawImage2 : function(img,x,y,w,h,alpha,srcRect)
{ {
......
...@@ -479,6 +479,14 @@ ChartPreviewManager.prototype.getChartPreviews = function(chartType) { ...@@ -479,6 +479,14 @@ ChartPreviewManager.prototype.getChartPreviews = function(chartType) {
for(var i = 0; i < nStylesCount; ++i) for(var i = 0; i < nStylesCount; ++i)
arr.push(this.createChartPreview(chartType, i)); arr.push(this.createChartPreview(chartType, i));
} }
if (Asc['editor'] && AscCommon.c_oEditorId.Spreadsheet === Asc['editor'].getEditorId()) {
var api_sheet = Asc['editor'];
var _graphics = api_sheet.wb.getWorksheet().shapeCtx;
if (_graphics.ClearLastFont)
_graphics.ClearLastFont();
}
} }
var group = this.previewGroups[chartType]; var group = this.previewGroups[chartType];
var objectGroup = []; var objectGroup = [];
......
...@@ -480,6 +480,12 @@ CGraphics.prototype = ...@@ -480,6 +480,12 @@ CGraphics.prototype =
this.m_oFontManager.m_pFont = null; this.m_oFontManager.m_pFont = null;
}, },
ClearLastFont : function()
{
this.m_oLastFont = new AscCommon.CFontSetup();
this.m_oLastFont2 = null;
},
// images // images
drawImage2 : function(img,x,y,w,h,alpha,srcRect) drawImage2 : function(img,x,y,w,h,alpha,srcRect)
{ {
......
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