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) { ...@@ -141,6 +141,7 @@ function asc_CChart(object) {
this.type = bCopy ? object.type : null; this.type = bCopy ? object.type : null;
this.subType = bCopy ? object.subType : c_oAscChartSubType.normal; this.subType = bCopy ? object.subType : c_oAscChartSubType.normal;
this.bChartEditor = bCopy ? object.bChartEditor : false;
this.bShowValue = bCopy ? object.bShowValue : false; this.bShowValue = bCopy ? object.bShowValue : false;
this.bShowBorder = bCopy ? object.bShowBorder : true; this.bShowBorder = bCopy ? object.bShowBorder : true;
this.styleId = bCopy ? object.styleId : c_oAscChartStyle.Standart; this.styleId = bCopy ? object.styleId : c_oAscChartStyle.Standart;
...@@ -239,6 +240,7 @@ asc_CChart.prototype = { ...@@ -239,6 +240,7 @@ asc_CChart.prototype = {
var api_sheet = window["Asc"]["editor"]; var api_sheet = window["Asc"]["editor"];
var api = api_sheet ? api_sheet : api_doc; var api = api_sheet ? api_sheet : api_doc;
this.bChartEditor = true;
this.header.title = "2012 Olympics Medal Standings"; this.header.title = "2012 Olympics Medal Standings";
this.range.interval = "Sheet1!A1:D7"; 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")] }; 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 = { ...@@ -580,6 +582,7 @@ asc_CChart.prototype = {
Writer.WriteString2( this.subType ); Writer.WriteString2( this.subType );
Writer.WriteLong( this.styleId ); Writer.WriteLong( this.styleId );
Writer.WriteBool( this.bChartEditor );
Writer.WriteBool( this.bShowValue ); Writer.WriteBool( this.bShowValue );
Writer.WriteBool( this.bShowBorder ); Writer.WriteBool( this.bShowBorder );
...@@ -667,6 +670,7 @@ asc_CChart.prototype = { ...@@ -667,6 +670,7 @@ asc_CChart.prototype = {
this.subType = Reader.GetString2(); this.subType = Reader.GetString2();
this.styleId = Reader.GetLong(); this.styleId = Reader.GetLong();
this.bChartEditor = Reader.GetBool();
this.bShowValue = Reader.GetBool(); this.bShowValue = Reader.GetBool();
this.bShowBorder = Reader.GetBool(); this.bShowBorder = Reader.GetBool();
...@@ -3397,6 +3401,8 @@ function DrawingObjects() { ...@@ -3397,6 +3401,8 @@ function DrawingObjects() {
else if ( isObject(chart) && chart["binary"] ) { else if ( isObject(chart) && chart["binary"] ) {
//try { //try {
History.TurnOff();
var graphicObject = new CChartAsGroup(null, _this); var graphicObject = new CChartAsGroup(null, _this);
graphicObject.setChartBinary(chart["binary"]); graphicObject.setChartBinary(chart["binary"]);
...@@ -3482,6 +3488,7 @@ function DrawingObjects() { ...@@ -3482,6 +3488,7 @@ function DrawingObjects() {
} }
} }
worksheet._updateCellsRange(graphicObject.chart.range.intervalObject.getBBox0()); worksheet._updateCellsRange(graphicObject.chart.range.intervalObject.getBBox0());
History.TurnOn();
/*} /*}
catch (e) { catch (e) {
e.message = "Error paste chart"; e.message = "Error paste chart";
......
...@@ -5493,6 +5493,13 @@ function DefaultKeyDownHandle(drawingObjectsController, e) ...@@ -5493,6 +5493,13 @@ function DefaultKeyDownHandle(drawingObjectsController, e)
} }
case STATES_ID_NULL: 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(); drawingObjectsController.drawingObjects.objectLocker.reset();
for(var i = 0; i < drawingObjectsController.selectedObjects.length; ++i) 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