Commit 47f4c5ae authored by Dmitry.Vikulov's avatar Dmitry.Vikulov Committed by Alexander.Trofimov

- Fix Bug 20125 - [Charts] Убрать действие undo в режиме редактора диаграмм,...

- Fix Bug 20125 - [Charts] Убрать действие undo в режиме редактора диаграмм, пока не были произведены изменения
- Отмена на удаление диаграммы в iframe

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@49512 954022d7-b5bf-4e40-9824-e11837661b57
parent e23e2a2a
......@@ -141,6 +141,7 @@ function asc_CChart(object) {
this.type = bCopy ? object.type : null;
this.subType = bCopy ? object.subType : c_oAscChartSubType.normal;
this.bChartEditor = bCopy ? object.bChartEditor : false;
this.bShowValue = bCopy ? object.bShowValue : false;
this.bShowBorder = bCopy ? object.bShowBorder : true;
this.styleId = bCopy ? object.styleId : c_oAscChartStyle.Standart;
......@@ -239,6 +240,7 @@ asc_CChart.prototype = {
var api_sheet = window["Asc"]["editor"];
var api = api_sheet ? api_sheet : api_doc;
this.bChartEditor = true;
this.header.title = "2012 Olympics Medal Standings";
this.range.interval = "Sheet1!A1:D7";
var Cat = { Formula: "Sheet1!A2:A7", NumCache: [createItem("USA"), createItem("CHN"), createItem("RUS"), createItem("GBR"), createItem("GER"), createItem("JPN")] };
......@@ -580,6 +582,7 @@ asc_CChart.prototype = {
Writer.WriteString2( this.subType );
Writer.WriteLong( this.styleId );
Writer.WriteBool( this.bChartEditor );
Writer.WriteBool( this.bShowValue );
Writer.WriteBool( this.bShowBorder );
......@@ -667,6 +670,7 @@ asc_CChart.prototype = {
this.subType = Reader.GetString2();
this.styleId = Reader.GetLong();
this.bChartEditor = Reader.GetBool();
this.bShowValue = Reader.GetBool();
this.bShowBorder = Reader.GetBool();
......@@ -3397,6 +3401,8 @@ function DrawingObjects() {
else if ( isObject(chart) && chart["binary"] ) {
//try {
History.TurnOff();
var graphicObject = new CChartAsGroup(null, _this);
graphicObject.setChartBinary(chart["binary"]);
......@@ -3482,6 +3488,7 @@ function DrawingObjects() {
}
}
worksheet._updateCellsRange(graphicObject.chart.range.intervalObject.getBBox0());
History.TurnOn();
/*}
catch (e) {
e.message = "Error paste chart";
......
......@@ -5493,6 +5493,13 @@ function DefaultKeyDownHandle(drawingObjectsController, e)
}
case STATES_ID_NULL:
{
// Если открыт iframe, то нельзя удалить диаграмму
if ( drawingObjectsController.selectedObjects.length == 1 )
{
if ( (drawingObjectsController.selectedObjects[0] instanceof CChartAsGroup) && (drawingObjectsController.selectedObjects[0].chart.bChartEditor) )
break;
}
drawingObjectsController.drawingObjects.objectLocker.reset();
for(var i = 0; i < drawingObjectsController.selectedObjects.length; ++i)
{
......
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