Commit 766cd839 authored by Alexander.Trofimov's avatar Alexander.Trofimov Committed by Alexander.Trofimov

Добавил диапазон для обновления диаграмм

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@56700 954022d7-b5bf-4e40-9824-e11837661b57
parent e57ac25d
...@@ -9291,6 +9291,7 @@ ...@@ -9291,6 +9291,7 @@
var _updateRangeIns, _updateRangeDel, bUndoRedo; var _updateRangeIns, _updateRangeDel, bUndoRedo;
var functionModelAction = null; var functionModelAction = null;
var lockDraw = false; // Параметр, при котором не будет отрисовки (т.к. мы просто обновляем информацию на неактивном листе) var lockDraw = false; // Параметр, при котором не будет отрисовки (т.к. мы просто обновляем информацию на неактивном листе)
var oChangeData = new CChangeTableData(null, null, null, null); // Обновление для диаграмм
var onChangeWorksheetCallback = function (isSuccess) { var onChangeWorksheetCallback = function (isSuccess) {
if (false === isSuccess) if (false === isSuccess)
...@@ -9315,7 +9316,7 @@ ...@@ -9315,7 +9316,7 @@
if (isUpdateCols) { t._updateVisibleColsCount(); } if (isUpdateCols) { t._updateVisibleColsCount(); }
if (isUpdateRows) { t._updateVisibleRowsCount(); } if (isUpdateRows) { t._updateVisibleRowsCount(); }
t.objectRender.rebuildChartGraphicObjects(); t.objectRender.rebuildChartGraphicObjects(oChangeData);
t.objectRender.showDrawingObjects(true); t.objectRender.showDrawingObjects(true);
}; };
...@@ -9336,31 +9337,39 @@ ...@@ -9336,31 +9337,39 @@
t.autoFilters.insertColumn(prop, val, arn); t.autoFilters.insertColumn(prop, val, arn);
t.model.insertColsBefore(arn.c1, val); t.model.insertColsBefore(arn.c1, val);
}; };
return this._isLockedCells (new asc_Range(arn.c1, 0, arn.c1 + val - 1, gc_nMaxRow0), c_oAscLockTypeElemSubType.InsertColumns, onChangeWorksheetCallback); oChangeData.added = new asc_Range(arn.c1, 0, arn.c1 + val - 1, gc_nMaxRow0);
return this._isLockedCells(oChangeData.added, c_oAscLockTypeElemSubType.InsertColumns,
onChangeWorksheetCallback);
case "insColAfter": case "insColAfter":
functionModelAction = function () { functionModelAction = function () {
fullRecalc = true; fullRecalc = true;
t.autoFilters.insertColumn(prop, val, arn); t.autoFilters.insertColumn(prop, val, arn);
t.model.insertColsAfter(arn.c2, val); t.model.insertColsAfter(arn.c2, val);
}; };
return this._isLockedCells (new asc_Range(arn.c2, 0, arn.c2 + val - 1, gc_nMaxRow0), c_oAscLockTypeElemSubType.InsertColumns, onChangeWorksheetCallback); oChangeData.added = new asc_Range(arn.c2, 0, arn.c2 + val - 1, gc_nMaxRow0);
return this._isLockedCells (oChangeData.added, c_oAscLockTypeElemSubType.InsertColumns,
onChangeWorksheetCallback);
case "delCol": case "delCol":
functionModelAction = function () { functionModelAction = function () {
fullRecalc = true; fullRecalc = true;
t.model.removeCols(arn.c1, arn.c2); t.model.removeCols(arn.c1, arn.c2);
}; };
return this._isLockedCells (new asc_Range(arn.c1, 0, arn.c2, gc_nMaxRow0), c_oAscLockTypeElemSubType.DeleteColumns, onChangeWorksheetCallback); oChangeData.removed = new asc_Range(arn.c1, 0, arn.c2, gc_nMaxRow0);
return this._isLockedCells (oChangeData.removed, c_oAscLockTypeElemSubType.DeleteColumns,
onChangeWorksheetCallback);
case "showCols": case "showCols":
functionModelAction = function () { functionModelAction = function () {
t.model.setColHidden(/*bHidden*/false, arn.c1, arn.c2); t.model.setColHidden(/*bHidden*/false, arn.c1, arn.c2);
fullRecalc = true; fullRecalc = true;
}; };
oChangeData.hided = new asc_Range(arn.c1, 0, arn.c2, gc_nMaxRow0);
return this._isLockedAll (onChangeWorksheetCallback); return this._isLockedAll (onChangeWorksheetCallback);
case "hideCols": case "hideCols":
functionModelAction = function () { functionModelAction = function () {
t.model.setColHidden(/*bHidden*/true, arn.c1, arn.c2); t.model.setColHidden(/*bHidden*/true, arn.c1, arn.c2);
fullRecalc = true; fullRecalc = true;
}; };
oChangeData.hided = new asc_Range(arn.c1, 0, arn.c2, gc_nMaxRow0);
return this._isLockedAll (onChangeWorksheetCallback); return this._isLockedAll (onChangeWorksheetCallback);
case "rowHeight": case "rowHeight":
...@@ -9377,30 +9386,38 @@ ...@@ -9377,30 +9386,38 @@
fullRecalc = true; fullRecalc = true;
t.model.insertRowsBefore(arn.r1, val); t.model.insertRowsBefore(arn.r1, val);
}; };
return this._isLockedCells (new asc_Range(0, arn.r1, gc_nMaxCol0, arn.r1 + val - 1), c_oAscLockTypeElemSubType.InsertRows, onChangeWorksheetCallback); oChangeData.added = new asc_Range(0, arn.r1, gc_nMaxCol0, arn.r1 + val - 1);
return this._isLockedCells (oChangeData.added, c_oAscLockTypeElemSubType.InsertRows,
onChangeWorksheetCallback);
case "insRowAfter": case "insRowAfter":
functionModelAction = function () { functionModelAction = function () {
fullRecalc = true; fullRecalc = true;
t.model.insertRowsAfter(arn.r2, val); t.model.insertRowsAfter(arn.r2, val);
}; };
return this._isLockedCells (new asc_Range(0, arn.r2, gc_nMaxCol0, arn.r2 + val - 1), c_oAscLockTypeElemSubType.InsertRows, onChangeWorksheetCallback); oChangeData.added = new asc_Range(0, arn.r2, gc_nMaxCol0, arn.r2 + val - 1);
return this._isLockedCells (oChangeData.added, c_oAscLockTypeElemSubType.InsertRows,
onChangeWorksheetCallback);
case "delRow": case "delRow":
functionModelAction = function () { functionModelAction = function () {
fullRecalc = true; fullRecalc = true;
t.model.removeRows(arn.r1, arn.r2); t.model.removeRows(arn.r1, arn.r2);
}; };
return this._isLockedCells (new asc_Range(0, arn.r1, gc_nMaxCol0, arn.r1), c_oAscLockTypeElemSubType.DeleteRows, onChangeWorksheetCallback); oChangeData.removed = new asc_Range(0, arn.r1, gc_nMaxCol0, arn.r1);
return this._isLockedCells (oChangeData.removed, c_oAscLockTypeElemSubType.DeleteRows,
onChangeWorksheetCallback);
case "showRows": case "showRows":
functionModelAction = function () { functionModelAction = function () {
t.model.setRowHidden(/*bHidden*/false, arn.r1, arn.r2); t.model.setRowHidden(/*bHidden*/false, arn.r1, arn.r2);
fullRecalc = true; fullRecalc = true;
}; };
oChangeData.hided = new asc_Range(0, arn.r1, gc_nMaxCol0, arn.r2);
return this._isLockedAll (onChangeWorksheetCallback); return this._isLockedAll (onChangeWorksheetCallback);
case "hideRows": case "hideRows":
functionModelAction = function () { functionModelAction = function () {
t.model.setRowHidden(/*bHidden*/true, arn.r1, arn.r2); t.model.setRowHidden(/*bHidden*/true, arn.r1, arn.r2);
fullRecalc = true; fullRecalc = true;
}; };
oChangeData.hided = new asc_Range(0, arn.r1, gc_nMaxCol0, arn.r2);
return this._isLockedAll (onChangeWorksheetCallback); return this._isLockedAll (onChangeWorksheetCallback);
case "insCell": case "insCell":
...@@ -9435,9 +9452,11 @@ ...@@ -9435,9 +9452,11 @@
if(bUndoRedo) if(bUndoRedo)
onChangeWorksheetCallback(true); onChangeWorksheetCallback(true);
else else {
this._isLockedCells (new asc_Range(_updateRangeIns.c1, _updateRangeIns.r1, oChangeData.changedRange = new asc_Range(_updateRangeIns.c1, _updateRangeIns.r1,
gc_nMaxCol0, _updateRangeIns.r2), null, onChangeWorksheetCallback); gc_nMaxCol0, _updateRangeIns.r2);
this._isLockedCells(oChangeData.changedRange, null, onChangeWorksheetCallback);
}
return; return;
case c_oAscInsertOptions.InsertCellsAndShiftDown: case c_oAscInsertOptions.InsertCellsAndShiftDown:
functionModelAction = function () { functionModelAction = function () {
...@@ -9461,9 +9480,11 @@ ...@@ -9461,9 +9480,11 @@
if(bUndoRedo) if(bUndoRedo)
onChangeWorksheetCallback(true); onChangeWorksheetCallback(true);
else else {
this._isLockedCells (new asc_Range(_updateRangeIns.c1, _updateRangeIns.r1, oChangeData.changedRange = new asc_Range(_updateRangeIns.c1, _updateRangeIns.r1,
_updateRangeIns.c2, gc_nMaxRow0), null, onChangeWorksheetCallback); _updateRangeIns.c2, gc_nMaxRow0);
this._isLockedCells(oChangeData.changedRange, null, onChangeWorksheetCallback);
}
return; return;
case c_oAscInsertOptions.InsertColumns: case c_oAscInsertOptions.InsertColumns:
functionModelAction = function () { functionModelAction = function () {
...@@ -9479,10 +9500,12 @@ ...@@ -9479,10 +9500,12 @@
}; };
if(bUndoRedo) if(bUndoRedo)
onChangeWorksheetCallback(true); onChangeWorksheetCallback(true);
else else {
this._isLockedCells (new asc_Range(_updateRangeIns.c1, 0, _updateRangeIns.c2, oChangeData.added = new asc_Range(_updateRangeIns.c1, 0, _updateRangeIns.c2,
gc_nMaxRow0), c_oAscLockTypeElemSubType.InsertColumns, gc_nMaxRow0);
this._isLockedCells(oChangeData.added, c_oAscLockTypeElemSubType.InsertColumns,
onChangeWorksheetCallback); onChangeWorksheetCallback);
}
return; return;
case c_oAscInsertOptions.InsertRows: case c_oAscInsertOptions.InsertRows:
functionModelAction = function () { functionModelAction = function () {
...@@ -9498,10 +9521,11 @@ ...@@ -9498,10 +9521,11 @@
}; };
if(bUndoRedo) if(bUndoRedo)
onChangeWorksheetCallback(true); onChangeWorksheetCallback(true);
else else {
this._isLockedCells (new asc_Range(0, _updateRangeIns.r1, gc_nMaxCol0, oChangeData.added = new asc_Range(0, _updateRangeIns.r1, gc_nMaxCol0, _updateRangeIns.r2);
_updateRangeIns.r2), c_oAscLockTypeElemSubType.InsertRows, this._isLockedCells(oChangeData.added, c_oAscLockTypeElemSubType.InsertRows,
onChangeWorksheetCallback); onChangeWorksheetCallback);
}
return; return;
default: return; default: return;
} }
...@@ -9539,9 +9563,11 @@ ...@@ -9539,9 +9563,11 @@
if(bUndoRedo) if(bUndoRedo)
onChangeWorksheetCallback(true); onChangeWorksheetCallback(true);
else else {
this._isLockedCells (new asc_Range(_updateRangeDel.c1, _updateRangeDel.r1, oChangeData.changedRange = new asc_Range(_updateRangeDel.c1, _updateRangeDel.r1,
gc_nMaxCol0, _updateRangeDel.r2), null, onChangeWorksheetCallback); gc_nMaxCol0, _updateRangeDel.r2);
this._isLockedCells(oChangeData.changedRange, null, onChangeWorksheetCallback);
}
return; return;
case c_oAscDeleteOptions.DeleteCellsAndShiftTop: case c_oAscDeleteOptions.DeleteCellsAndShiftTop:
isCheckChangeAutoFilter = t.autoFilters.isActiveCellsCrossHalfFTable(_updateRangeDel, c_oAscDeleteOptions.DeleteCellsAndShiftTop, prop, bUndoRedo); isCheckChangeAutoFilter = t.autoFilters.isActiveCellsCrossHalfFTable(_updateRangeDel, c_oAscDeleteOptions.DeleteCellsAndShiftTop, prop, bUndoRedo);
...@@ -9564,9 +9590,11 @@ ...@@ -9564,9 +9590,11 @@
if(bUndoRedo) if(bUndoRedo)
onChangeWorksheetCallback(true); onChangeWorksheetCallback(true);
else else {
this._isLockedCells (new asc_Range(_updateRangeDel.c1, _updateRangeDel.r1, oChangeData.changedRange = new asc_Range(_updateRangeDel.c1, _updateRangeDel.r1,
_updateRangeDel.c2, gc_nMaxRow0), null, onChangeWorksheetCallback); _updateRangeDel.c2, gc_nMaxRow0);
this._isLockedCells(oChangeData.changedRange, null, onChangeWorksheetCallback);
}
return; return;
case c_oAscDeleteOptions.DeleteColumns: case c_oAscDeleteOptions.DeleteColumns:
isCheckChangeAutoFilter = t.autoFilters.isActiveCellsCrossHalfFTable(_updateRangeDel, c_oAscDeleteOptions.DeleteColumns, prop, bUndoRedo); isCheckChangeAutoFilter = t.autoFilters.isActiveCellsCrossHalfFTable(_updateRangeDel, c_oAscDeleteOptions.DeleteColumns, prop, bUndoRedo);
...@@ -9585,10 +9613,12 @@ ...@@ -9585,10 +9613,12 @@
}; };
if(bUndoRedo) if(bUndoRedo)
onChangeWorksheetCallback(true); onChangeWorksheetCallback(true);
else else {
this._isLockedCells (new asc_Range(_updateRangeDel.c1, 0, _updateRangeDel.c2, oChangeData.removed = new asc_Range(_updateRangeDel.c1, 0, _updateRangeDel.c2,
gc_nMaxRow0), c_oAscLockTypeElemSubType.DeleteColumns, gc_nMaxRow0);
this._isLockedCells(oChangeData.removed, c_oAscLockTypeElemSubType.DeleteColumns,
onChangeWorksheetCallback); onChangeWorksheetCallback);
}
return; return;
case c_oAscDeleteOptions.DeleteRows: case c_oAscDeleteOptions.DeleteRows:
isCheckChangeAutoFilter = t.autoFilters.isActiveCellsCrossHalfFTable(_updateRangeDel, c_oAscDeleteOptions.DeleteRows, prop, bUndoRedo); isCheckChangeAutoFilter = t.autoFilters.isActiveCellsCrossHalfFTable(_updateRangeDel, c_oAscDeleteOptions.DeleteRows, prop, bUndoRedo);
...@@ -9607,10 +9637,11 @@ ...@@ -9607,10 +9637,11 @@
}; };
if(bUndoRedo) if(bUndoRedo)
onChangeWorksheetCallback(true); onChangeWorksheetCallback(true);
else else {
this._isLockedCells (new asc_Range(0, _updateRangeDel.r1, gc_nMaxCol0, oChangeData.removed = new asc_Range(0, _updateRangeDel.r1, gc_nMaxCol0, _updateRangeDel.r2);
_updateRangeDel.r2), c_oAscLockTypeElemSubType.DeleteRows, this._isLockedCells(oChangeData.removed, c_oAscLockTypeElemSubType.DeleteRows,
onChangeWorksheetCallback); onChangeWorksheetCallback);
}
return; return;
default: return; default: return;
} }
...@@ -10625,7 +10656,7 @@ ...@@ -10625,7 +10656,7 @@
t.handlers.trigger("selectionMathInfoChanged", t.getSelectionMathInfo()); t.handlers.trigger("selectionMathInfoChanged", t.getSelectionMathInfo());
} }
t.objectRender.rebuildChartGraphicObjects(t.activeRange.clone(true)); t.objectRender.rebuildChartGraphicObjects(new CChangeTableData(range, null, null, null));
t.cellCommentator.updateCommentPosition(); t.cellCommentator.updateCommentPosition();
t.handlers.trigger("onDocumentPlaceChanged"); t.handlers.trigger("onDocumentPlaceChanged");
t.draw(lockDraw); t.draw(lockDraw);
......
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