Commit 518252f5 authored by Sergey.Luzyanin's avatar Sergey.Luzyanin Committed by Alexander.Trofimov

перенес очистку листа из cleanWorksheet в addChartDrawingObject

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@61618 954022d7-b5bf-4e40-9824-e11837661b57
parent 9a9835dd
......@@ -1641,6 +1641,14 @@ function DrawingObjects() {
}
else if ( isObject(chart) && chart["binary"] )
{
for (var i = 0; i < aObjects.length; i++) {
aObjects[i].graphicObject.deleteDrawingBase();
}
var listRange = new Range(worksheet.model, 0, 0, worksheet.nRowsCount - 1, worksheet.nColsCount - 1);
listRange.cleanAll();
worksheet._clean();
History.Clear();
History.TurnOff();
aObjects.length = 0;
var listRange = new Range(worksheet.model, 0, 0, worksheet.nRowsCount - 1, worksheet.nColsCount - 1);
......@@ -2783,19 +2791,6 @@ function DrawingObjects() {
//-----------------------------------------------------------------------------------
_this.cleanWorksheet = function() {
for (var i = 0; i < aObjects.length; i++) {
aObjects[i].graphicObject.deleteDrawingBase();
}
worksheet._clean();
var listRange = new Range(worksheet.model, 0, 0, worksheet.nRowsCount - 1, worksheet.nColsCount - 1);
listRange.cleanAll();
_this.controller.resetSelection();
shapeCtx.m_oContext.clearRect(0, 0, shapeCtx.m_lWidthPix, shapeCtx.m_lHeightPix);
shapeOverlayCtx.m_oContext.clearRect(0, 0, shapeOverlayCtx.m_lWidthPix, shapeOverlayCtx.m_lHeightPix);
_this.OnUpdateOverlay();
History.Clear();
};
_this.getWordChartObject = function() {
......@@ -2803,9 +2798,7 @@ function DrawingObjects() {
var drawingObject = aObjects[i];
if ( drawingObject.isChart() ) {
var chart = new asc_CChartBinary(drawingObject.graphicObject);
_this.cleanWorksheet();
return chart;
return new asc_CChartBinary(drawingObject.graphicObject);
}
}
return null;
......
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