Commit 6c8a7d40 authored by Alexander.Trofimov's avatar Alexander.Trofimov

restore cells

parent 4616b950
$(function(){ $(function(){
// Import
var CellFormat = AscCommon.CellFormat;
var fGetFormatedText = function(aFormated) var fGetFormatedText = function(aFormated)
{ {
var res = ""; var res = "";
......
...@@ -196,19 +196,19 @@ var c_oAscChangeFilterOptions = { ...@@ -196,19 +196,19 @@ var c_oAscChangeFilterOptions = {
}; };
var c_oAscChangeSelectionFormatTable = { var c_oAscChangeSelectionFormatTable = {
all: 1, all: 1,
data: 2, data: 2,
row: 3, row: 3,
column: 4 column: 4
}; };
var c_oAscChangeTableStyleInfo = { var c_oAscChangeTableStyleInfo = {
columnFirst: 1, columnFirst: 1,
columnLast: 2, columnLast: 2,
columnBanded: 3, columnBanded: 3,
rowHeader: 4, rowHeader: 4,
rowTotal: 5, rowTotal: 5,
rowBanded: 6, rowBanded: 6,
filterButton: 7 filterButton: 7
}; };
...@@ -484,6 +484,4 @@ var c_oAscPopUpSelectorType = { ...@@ -484,6 +484,4 @@ var c_oAscPopUpSelectorType = {
prot['Func'] = prot.Func; prot['Func'] = prot.Func;
prot['Range'] = prot.Range; prot['Range'] = prot.Range;
prot['Table'] = prot.Table; prot['Table'] = prot.Table;
window['Asc']['c_oAscChangeSelectionFormatTable'] = c_oAscChangeSelectionFormatTable;
window['Asc']['c_oAscChangeTableStyleInfo'] = c_oAscChangeTableStyleInfo;
})(window); })(window);
(
/**
* @param {Window} window
* @param {undefined} undefined
*/
function (window, undefined) {
function getEmptyWorkbook() { function getEmptyWorkbook() {
return "XLSY;v2;5958;BAKAAgAAA7kDAAAEzAMAAABaBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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BvAGQAATBXBQD7AF4AAAD6AKCGAQD7AFIAAAADTQAAAPoADvsARAAAAAIAAAABGgAAAPoABwAAAGEAOgBzAGgAYQBkAGUAASBOAAD7ARwAAAD6AAgAAABhADoAcwBhAHQATQBvAGQAARjkAwD7AksAAAD6AAD7AEIAAAD6AAUAAAA1ADAAMAAwADAAAQYAAAAtADgAMAAwADAAMAACBQAAADUAMAAwADAAMAADBgAAADEAOAAwADAAMAAwAPsAIgEAAAQdAQAA+gEB+wDIAAAAAgAAAABcAAAA+gAAAAAA+wBQAAAAA0sAAAD6AA77AEIAAAACAAAAARgAAAD6AAYAAABhADoAdABpAG4AdAABgDgBAPsBHAAAAPoACAAAAGEAOgBzAGEAdABNAG8AZAAB4JMEAPsAXgAAAPoAoIYBAPsAUgAAAANNAAAA+gAO+wBEAAAAAgAAAAEaAAAA+gAHAAAAYQA6AHMAaABhAGQAZQABMHUAAPsBHAAAAPoACAAAAGEAOgBzAGEAdABNAG8AZAABQA0DAPsCRwAAAPoAAPsAPgAAAPoABQAAADUAMAAwADAAMAABBQAAADUAMAAwADAAMAACBQAAADUAMAAwADAAMAADBQAAADUAMAAwADAAMAD7BAQAAAAAAAAA";
} }
......
This diff is collapsed.
...@@ -3179,70 +3179,70 @@ function Woorksheet(wb, _index, sId){ ...@@ -3179,70 +3179,70 @@ function Woorksheet(wb, _index, sId){
this.oAllCol = null; this.oAllCol = null;
this.aComments = []; this.aComments = [];
this.aCommentsCoords = []; this.aCommentsCoords = [];
var oThis = this; var oThis = this;
this.mergeManager = new RangeDataManager(function(data, from, to) { this.mergeManager = new RangeDataManager(function(data, from, to){
if (History.Is_On() && (null != from || null != to)) { if(History.Is_On() && (null != from || null != to))
if (null != from) { {
from = from.clone(); if(null != from)
} from = from.clone();
if (null != to) if(null != to)
to = to.clone(); to = to.clone();
var oHistoryRange = from; var oHistoryRange = from;
if (null == oHistoryRange) if(null == oHistoryRange)
oHistoryRange = to; oHistoryRange = to;
History.Add(AscCommonExcel.g_oUndoRedoWorksheet, AscCH.historyitem_Worksheet_ChangeMerge, oThis.getId(), oHistoryRange, new UndoRedoData_FromTo(new UndoRedoData_BBox(from), new UndoRedoData_BBox(to))); History.Add(AscCommonExcel.g_oUndoRedoWorksheet, AscCH.historyitem_Worksheet_ChangeMerge, oThis.getId(), oHistoryRange, new UndoRedoData_FromTo(new UndoRedoData_BBox(from), new UndoRedoData_BBox(to)));
} }
//расширяем границы //расширяем границы
if (null != to) { if(null != to){
if (to.r2 >= oThis.nRowsCount) if(to.r2 >= oThis.nRowsCount)
oThis.nRowsCount = to.r2 + 1; oThis.nRowsCount = to.r2 + 1;
if (to.c2 >= oThis.nColsCount) if(to.c2 >= oThis.nColsCount)
oThis.nColsCount = to.c2 + 1; oThis.nColsCount = to.c2 + 1;
} }
}); });
this.hyperlinkManager = new RangeDataManager(function(data, from, to, oChangeParam) { this.hyperlinkManager = new RangeDataManager(function(data, from, to, oChangeParam){
if (History.Is_On() && (null != from || null != to)) { if(History.Is_On() && (null != from || null != to))
if (null != from) {
from = from.clone(); if(null != from)
if (null != to) from = from.clone();
to = to.clone(); if(null != to)
var oHistoryRange = from; to = to.clone();
if (null == oHistoryRange) var oHistoryRange = from;
oHistoryRange = to; if(null == oHistoryRange)
var oHistoryData = null; oHistoryRange = to;
if (null == from || null == to) var oHistoryData = null;
oHistoryData = data.clone(); if(null == from || null == to)
oHistoryData = data.clone();
History.Add(AscCommonExcel.g_oUndoRedoWorksheet, AscCH.historyitem_Worksheet_ChangeHyperlink, oThis.getId(), oHistoryRange, new AscCommonExcel.UndoRedoData_FromToHyperlink(from, to, oHistoryData)); History.Add(AscCommonExcel.g_oUndoRedoWorksheet, AscCH.historyitem_Worksheet_ChangeHyperlink, oThis.getId(), oHistoryRange, new AscCommonExcel.UndoRedoData_FromToHyperlink(from, to, oHistoryData));
} }
if (null != to) if (null != to)
data.Ref = oThis.getRange3(to.r1, to.c1, to.r2, to.c2); else if (oChangeParam && oChangeParam.removeStyle && data.Ref = oThis.getRange3(to.r1, to.c1, to.r2, to.c2);
null != data.Ref) else if (oChangeParam && oChangeParam.removeStyle && null != data.Ref)
data.Ref.cleanFormat(); data.Ref.cleanFormat();
//расширяем границы //расширяем границы
if (null != to) { if(null != to){
if (to.r2 >= oThis.nRowsCount) if(to.r2 >= oThis.nRowsCount)
oThis.nRowsCount = to.r2 + 1; oThis.nRowsCount = to.r2 + 1;
if (to.c2 >= oThis.nColsCount) if(to.c2 >= oThis.nColsCount)
oThis.nColsCount = to.c2 + 1; oThis.nColsCount = to.c2 + 1;
} }
}); });
this.hyperlinkManager.setDependenceManager(this.mergeManager); this.hyperlinkManager.setDependenceManager(this.mergeManager);
this.DrawingDocument = new AscCommon.CDrawingDocument(); this.DrawingDocument = new AscCommon.CDrawingDocument();
this.sheetViews = []; this.sheetViews = [];
this.aConditionalFormatting = []; this.aConditionalFormatting = [];
this.sheetPr = null; this.sheetPr = null;
this.aFormulaExt = null; this.aFormulaExt = null;
this.autoFilters = AscCommonExcel.AutoFilters !== undefined ? new AscCommonExcel.AutoFilters(this) : null; this.autoFilters = AscCommonExcel.AutoFilters !== undefined ? new AscCommonExcel.AutoFilters(this) : null;
this.sparklineGroups = new sparklineGroups();
this.oDrawingOjectsManager = new DrawingObjectsManager(this); this.oDrawingOjectsManager = new DrawingObjectsManager(this);
this.contentChanges = new AscCommon.CContentChanges(); this.contentChanges = new AscCommon.CContentChanges();
this.aSparklineGroups = []; this.aSparklineGroups = [];
/*handlers*/ /*handlers*/
this.handlers = null; this.handlers = null;
} }
Woorksheet.prototype.addContentChanges = function(changes) Woorksheet.prototype.addContentChanges = function(changes)
...@@ -4141,7 +4141,7 @@ Woorksheet.prototype._insertColsBefore=function(index, count){ ...@@ -4141,7 +4141,7 @@ Woorksheet.prototype._insertColsBefore=function(index, count){
} }
this.autoFilters.insertColumn( "insCells", new Asc.Range(index, 0, index + count - 1, gc_nMaxRow0), c_oAscInsertOptions.InsertColumns ); this.autoFilters.insertColumn( "insCells", new Asc.Range(index, 0, index + count - 1, gc_nMaxRow0), c_oAscInsertOptions.InsertColumns );
this.workbook.unLockDraw(); this.workbook.unLockDraw();
this.workbook.buildRecalc(); this.workbook.buildRecalc();
...@@ -8622,27 +8622,27 @@ Range.prototype.sort=function(nOption, nStartCol, sortColor){ ...@@ -8622,27 +8622,27 @@ Range.prototype.sort=function(nOption, nStartCol, sortColor){
{ {
if(nLastRow0 < nRow0) if(nLastRow0 < nRow0)
nLastRow0 = nRow0; nLastRow0 = nRow0;
var val = oCell.getValueWithoutFormat(); var val = oCell.getValueWithoutFormat();
//for sort color //for sort color
var colorFillCell, colorsTextCell = null; var colorFillCell, colorsTextCell = null;
if(colorFill) if(colorFill)
{ {
var styleCell = oCell.getStyle(); var styleCell = oCell.getStyle();
colorFillCell = styleCell !== null && styleCell.fill ? styleCell.fill.bg : null; colorFillCell = styleCell !== null && styleCell.fill ? styleCell.fill.bg : null;
} }
else if(colorText) else if(colorText)
{ {
var value2 = oCell.getValue2(); var value2 = oCell.getValue2();
for(var n = 0; n < value2.length; n++) for(var n = 0; n < value2.length; n++)
{ {
if(null === colorsTextCell) if(null === colorsTextCell)
{ {
colorsTextCell = []; colorsTextCell = [];
} }
colorsTextCell.push(value2[n].format.c); colorsTextCell.push(value2[n].format.c);
} }
} }
var nNumber = null; var nNumber = null;
...@@ -8655,10 +8655,10 @@ Range.prototype.sort=function(nOption, nStartCol, sortColor){ ...@@ -8655,10 +8655,10 @@ Range.prototype.sort=function(nOption, nStartCol, sortColor){
else else
sText = val; sText = val;
aSortElems.push({row: nRow0, num: nNumber, text: sText, colorFill: colorFillCell, colorsText: colorsTextCell}); aSortElems.push({row: nRow0, num: nNumber, text: sText, colorFill: colorFillCell, colorsText: colorsTextCell});
} }
else if(isSortColor) else if(isSortColor)
{ {
aSortElems.push({row: nRow0, num: nNumber, text: sText, colorFill: colorFillCell, colorsText: colorsTextCell}); aSortElems.push({row: nRow0, num: nNumber, text: sText, colorFill: colorFillCell, colorsText: colorsTextCell});
} }
} }
} }
...@@ -8687,77 +8687,77 @@ Range.prototype.sort=function(nOption, nStartCol, sortColor){ ...@@ -8687,77 +8687,77 @@ Range.prototype.sort=function(nOption, nStartCol, sortColor){
} }
function strcmp ( str1, str2 ) { function strcmp ( str1, str2 ) {
return ( ( str1 == str2 ) ? 0 : ( ( str1 > str2 ) ? 1 : -1 ) ); return ( ( str1 == str2 ) ? 0 : ( ( str1 > str2 ) ? 1 : -1 ) );
} }
//color sort //color sort
var colorFillCmp = function(color1, color2) var colorFillCmp = function(color1, color2)
{ {
var res = false; var res = false;
//TODO возможно так сравнивать не правильно, позже пересмотреть //TODO возможно так сравнивать не правильно, позже пересмотреть
if(colorFill) if(colorFill)
{ {
res = (color1 !== null && color2 !== null && color1.rgb === color2.rgb) || (color1 === color2) ? true : false; res = (color1 !== null && color2 !== null && color1.rgb === color2.rgb) || (color1 === color2) ? true : false;
} }
else if(colorText && color1 && color1.length) else if(colorText && color1 && color1.length)
{ {
for(var n = 0; n < color1.length; n++) for(var n = 0; n < color1.length; n++)
{ {
if(color1[n] && color2 !== null && color1[n].rgb === color2.rgb) if(color1[n] && color2 !== null && color1[n].rgb === color2.rgb)
{ {
res = true; res = true;
break; break;
} }
} }
} }
return res; return res;
}; };
if(isSortColor) if(isSortColor)
{ {
var newArrayNeedColor = []; var newArrayNeedColor = [];
var newArrayAnotherColor = []; var newArrayAnotherColor = [];
for(var i = 0; i < aSortElems.length; i++) for(var i = 0; i < aSortElems.length; i++)
{ {
var color = colorFill ? aSortElems[i].colorFill : aSortElems[i].colorsText; var color = colorFill ? aSortElems[i].colorFill : aSortElems[i].colorsText;
if(colorFillCmp(color, sortColor)) if(colorFillCmp(color, sortColor))
{ {
newArrayNeedColor.push(aSortElems[i]); newArrayNeedColor.push(aSortElems[i]);
} }
else else
{ {
newArrayAnotherColor.push(aSortElems[i]); newArrayAnotherColor.push(aSortElems[i]);
} }
} }
aSortElems = newArrayNeedColor.concat(newArrayAnotherColor); aSortElems = newArrayNeedColor.concat(newArrayAnotherColor);
} }
else else
{ {
aSortElems.sort(function(a, b){ aSortElems.sort(function(a, b){
var res = 0; var res = 0;
if(null != a.text) if(null != a.text)
{ {
if(null != b.text) if(null != b.text)
res = strcmp(a.text.toUpperCase(), b.text.toUpperCase()); res = strcmp(a.text.toUpperCase(), b.text.toUpperCase());
else else
res = 1; res = 1;
} }
else if(null != a.num) else if(null != a.num)
{ {
if(null != b.num) if(null != b.num)
res = a.num - b.num; res = a.num - b.num;
else else
res = -1; res = -1;
} }
if(0 == res) if(0 == res)
res = a.row - b.row; res = a.row - b.row;
else if(!bAscent) else if(!bAscent)
res = -res; res = -res;
return res; return res;
}); });
} }
//проверяем что это не пустая операция //проверяем что это не пустая операция
......
"use strict"; "use strict";
( (
/** /**
* @param {jQuery} $ * @param {jQuery} $
...@@ -455,7 +455,7 @@ ...@@ -455,7 +455,7 @@
History.EndTransaction(); History.EndTransaction();
}; };
addFilterCallBack(true); addFilterCallBack(true);
}, },
...@@ -1600,7 +1600,7 @@ ...@@ -1600,7 +1600,7 @@
{activeCells: cellIdRange, type: type, cellId: cellId, displayName: displayName}, null, curFilter.Ref); {activeCells: cellIdRange, type: type, cellId: cellId, displayName: displayName}, null, curFilter.Ref);
History.EndTransaction(); History.EndTransaction();
}; };
var onSortColorAutoFilterCallback = function(type) var onSortColorAutoFilterCallback = function(type)
{ {
...@@ -1615,9 +1615,9 @@ ...@@ -1615,9 +1615,9 @@
curFilter.SortState = new SortState(); curFilter.SortState = new SortState();
curFilter.SortState.Ref = new Asc.Range(startCol, curFilter.Ref.r1, startCol, maxFilterRow); curFilter.SortState.Ref = new Asc.Range(startCol, curFilter.Ref.r1, startCol, maxFilterRow);
curFilter.SortState.SortConditions = []; curFilter.SortState.SortConditions = [];
curFilter.SortState.SortConditions[0] = new SortCondition(); curFilter.SortState.SortConditions[0] = new AscCommonExcel.SortCondition();
} }
curFilter.SortState.SortConditions[0] = new SortCondition(); curFilter.SortState.SortConditions[0] = new AscCommonExcel.SortCondition();
var cellIdRange = new Asc.Range(startCol, filterRef.r1, startCol, filterRef.r1); var cellIdRange = new Asc.Range(startCol, filterRef.r1, startCol, filterRef.r1);
...@@ -1663,13 +1663,13 @@ ...@@ -1663,13 +1663,13 @@
} }
} }
}, },
getPropForSort: function(cellId, activeRange, displayName) getPropForSort: function(cellId, activeRange, displayName)
{ {
var worksheet = this.worksheet; var worksheet = this.worksheet;
var t = this; var t = this;
var curFilter, sortRange, filterRef, startCol, maxFilterRow; var curFilter, sortRange, filterRef, startCol, maxFilterRow;
var isCellIdString = false; var isCellIdString = false;
if(cellId !== undefined && cellId != "" && typeof cellId == 'string') if(cellId !== undefined && cellId != "" && typeof cellId == 'string')
{ {
...@@ -1766,7 +1766,7 @@ ...@@ -1766,7 +1766,7 @@
{ {
return this._cleanFilterColumnsAndSortState(tablePart, activeCell); return this._cleanFilterColumnsAndSortState(tablePart, activeCell);
} }
} }
} }
else else
{ {
...@@ -1925,7 +1925,7 @@ ...@@ -1925,7 +1925,7 @@
//проверяем покрывает ли диапазон хотя бы один автофильтр //проверяем покрывает ли диапазон хотя бы один автофильтр
var worksheet = this.worksheet; var worksheet = this.worksheet;
var isUpdate = null; var isUpdate = null;
var bUndoChanges = worksheet.workbook.bUndoChanges; var bUndoChanges = worksheet.workbook.bUndoChanges;
var bRedoChanges = worksheet.workbook.bRedoChanges; var bRedoChanges = worksheet.workbook.bRedoChanges;
...@@ -2001,20 +2001,20 @@ ...@@ -2001,20 +2001,20 @@
this._cleanStyleTable(oCurFilter[i].Ref); this._cleanStyleTable(oCurFilter[i].Ref);
this._setColorStyleTable(findFilters[i].Ref, findFilters[i]); this._setColorStyleTable(findFilters[i].Ref, findFilters[i]);
} }
if(!bUndoChanges && !bRedoChanges ) if(!bUndoChanges && !bRedoChanges )
{ {
if(!addRedo && !data) if(!addRedo && !data)
{ {
this._addHistoryObj(oCurFilter, AscCH.historyitem_AutoFilter_Move, {arnTo: arnTo, arnFrom: arnFrom, activeCells: activeRange}); this._addHistoryObj(oCurFilter, AscCH.historyitem_AutoFilter_Move, {arnTo: arnTo, arnFrom: arnFrom, activeCells: activeRange});
addRedo = true; addRedo = true;
} }
else if(!data && addRedo) else if(!data && addRedo)
this._addHistoryObj(oCurFilter, AscCH.historyitem_AutoFilter_Move, null, null, null, null, activeRange); this._addHistoryObj(oCurFilter, AscCH.historyitem_AutoFilter_Move, null, null, null, null, activeRange);
}
} }
} }
} }
}
var arnToRange = new Asc.Range(arnTo.c1, arnTo.r1, arnTo.c2, arnTo.r2); var arnToRange = new Asc.Range(arnTo.c1, arnTo.r1, arnTo.c2, arnTo.r2);
var intersectionRangeWithTableParts = this._intersectionRangeWithTableParts(arnToRange); var intersectionRangeWithTableParts = this._intersectionRangeWithTableParts(arnToRange);
...@@ -3658,7 +3658,7 @@ ...@@ -3658,7 +3658,7 @@
//filter current button //filter current button
var checkValue = isDateTimeFormat ? val : text; var checkValue = isDateTimeFormat ? val : text;
if (!currentFilterColumn.Top10 && !currentFilterColumn.CustomFiltersObj && if (!currentFilterColumn.Top10 && !currentFilterColumn.CustomFiltersObj &&
!currentFilterColumn.ColorFilter && !currentFilterColumn.isHideValue(checkValue, isDateTimeFormat, null, cell)) !currentFilterColumn.ColorFilter && !currentFilterColumn.isHideValue(checkValue, isDateTimeFormat))
{ {
if(isOpenHiddenRows) if(isOpenHiddenRows)
worksheet.setRowHidden(false, i, i); worksheet.setRowHidden(false, i, i);
......
...@@ -5401,14 +5401,14 @@ ...@@ -5401,14 +5401,14 @@
} }
}; };
WorksheetView.prototype.prepareDepCells = function(se) { WorksheetView.prototype.prepareDepCells = function ( se ) {
var activeCell = this.activeRange, mc = this.model.getMergedByCell( activeCell.startRow, activeCell.startCol ), c1 = mc ? mc.c1 : activeCell.startCol, r1 = mc ? mc.r1 : activeCell.startRow, c = this._getVisibleCell( c1, r1 ), nodes = (se == AscCommonExcel.c_oAscDrawDepOptions.Master) ? this.model.workbook.dependencyFormulas.getMasterNodes( this.model.getId(), c.getName() ) : this.model.workbook.dependencyFormulas.getSlaveNodes( this.model.getId(), c.getName() ); var activeCell = this.activeRange, mc = this.model.getMergedByCell( activeCell.startRow, activeCell.startCol ), c1 = mc ? mc.c1 : activeCell.startCol, r1 = mc ? mc.r1 : activeCell.startRow, c = this._getVisibleCell( c1, r1 ), nodes = (se == AscCommonExcel.c_oAscDrawDepOptions.Master) ? this.model.workbook.dependencyFormulas.getMasterNodes( this.model.getId(), c.getName() ) : this.model.workbook.dependencyFormulas.getSlaveNodes( this.model.getId(), c.getName() );
if (!nodes) { if ( !nodes ) {
return; return;
} }
if (!this.depDrawCells) { if ( !this.depDrawCells ) {
this.depDrawCells = {}; this.depDrawCells = {};
} }
...@@ -5420,9 +5420,9 @@ ...@@ -5420,9 +5420,9 @@
else { else {
var to = {}, to1, id = AscCommonExcel.getVertexId( this.model.getId(), c.getName() ); var to = {}, to1, id = AscCommonExcel.getVertexId( this.model.getId(), c.getName() );
to[AscCommonExcel.getVertexId( this.model.getId(), c.getName() )] = this.model.workbook.dependencyFormulas.getNode( this.model.getId(), c.getName() ); to[AscCommonExcel.getVertexId( this.model.getId(), c.getName() )] = this.model.workbook.dependencyFormulas.getNode( this.model.getId(), c.getName() );
to1 = this.model.workbook.dependencyFormulas.getNode(this.model.getId(), c.getName()); to1 = this.model.workbook.dependencyFormulas.getNode( this.model.getId(), c.getName() );
for (var id2 in nodes) { for ( var id2 in nodes ) {
if (this.depDrawCells[id2]) { if ( this.depDrawCells[id2] ) {
$.extend( this.depDrawCells[id2].to, to ) $.extend( this.depDrawCells[id2].to, to )
} }
else { else {
...@@ -8767,7 +8767,7 @@ ...@@ -8767,7 +8767,7 @@
this.handlers.trigger( "onErrorEvent", c_oAscError.ID.CannotMoveRange, c_oAscError.Level.NoCritical ); this.handlers.trigger( "onErrorEvent", c_oAscError.ID.CannotMoveRange, c_oAscError.Level.NoCritical );
this._cleanSelectionMoveRange(); this._cleanSelectionMoveRange();
} }
else if ( resmove === -1 && this.af_isCheckMoveRange( arnFrom, arnTo ) ) { else if (resmove === -1) {
var t = this; var t = this;
this.model.workbook.handlers.trigger( "asc_onConfirmAction", Asc.c_oAscConfirm.ConfirmReplaceRange, function ( can ) { this.model.workbook.handlers.trigger( "asc_onConfirmAction", Asc.c_oAscConfirm.ConfirmReplaceRange, function ( can ) {
if ( can ) { if ( can ) {
...@@ -8821,7 +8821,7 @@ ...@@ -8821,7 +8821,7 @@
t.model._moveRange( arnFrom, arnTo, copyRange ); t.model._moveRange( arnFrom, arnTo, copyRange );
t.cellCommentator.moveRangeComments( arnFrom, arnTo ); t.cellCommentator.moveRangeComments( arnFrom, arnTo );
t.objectRender.moveRangeDrawingObject( arnFrom, arnTo ); t.objectRender.moveRangeDrawingObject( arnFrom, arnTo );
// Вызываем функцию пересчета для заголовков форматированной таблицы // Вызываем функцию пересчета для заголовков форматированной таблицы
t.model.autoFilters.renameTableColumn( arnFrom ); t.model.autoFilters.renameTableColumn( arnFrom );
t.model.autoFilters.renameTableColumn( arnTo ); t.model.autoFilters.renameTableColumn( arnTo );
...@@ -11811,7 +11811,7 @@ ...@@ -11811,7 +11811,7 @@
var t = this; var t = this;
var ar = t.activeRange.clone( true ); var ar = t.activeRange.clone( true );
var isChangeAutoFilterToTablePart = function(addFormatTableOptionsObj) var isChangeAutoFilterToTablePart = function(addFormatTableOptionsObj)
{ {
var res = false; var res = false;
...@@ -11870,7 +11870,7 @@ ...@@ -11870,7 +11870,7 @@
if(styleName === null) if(styleName === null)
{ {
addFilterCallBack(); addFilterCallBack();
} }
else else
{ {
var filterInfo = t.model.autoFilters._getFilterInfoByAddTableProps(ar, addFormatTableOptionsObj); var filterInfo = t.model.autoFilters._getFilterInfoByAddTableProps(ar, addFormatTableOptionsObj);
...@@ -11929,7 +11929,7 @@ ...@@ -11929,7 +11929,7 @@
t.af_drawButtons(filterRange); t.af_drawButtons(filterRange);
t._onUpdateFormatTable(filterRange, false, true); t._onUpdateFormatTable(filterRange, false, true);
} }
t._isLockedCells(filterRange, /*subType*/null, deleteFilterCallBack); t._isLockedCells(filterRange, /*subType*/null, deleteFilterCallBack);
...@@ -11940,7 +11940,7 @@ ...@@ -11940,7 +11940,7 @@
{ {
History.Create_NewPoint(); History.Create_NewPoint();
History.StartTransaction(); History.StartTransaction();
t.model.autoFilters.addAutoFilter( null, ar); t.model.autoFilters.addAutoFilter( null, ar);
t._onUpdateFormatTable(filterRange, false, true); t._onUpdateFormatTable(filterRange, false, true);
...@@ -12201,7 +12201,7 @@ ...@@ -12201,7 +12201,7 @@
return; return;
} }
var sortProps = t.model.autoFilters.getPropForSort(cellId, ar, displayName); var sortProps = t.model.autoFilters.getPropForSort(cellId, ar, displayName);
var onSortAutoFilterCallBack = function() var onSortAutoFilterCallBack = function()
{ {
History.Create_NewPoint(); History.Create_NewPoint();
...@@ -12215,7 +12215,7 @@ ...@@ -12215,7 +12215,7 @@
t._onUpdateFormatTable(sortProps.sortRange.bbox, false); t._onUpdateFormatTable(sortProps.sortRange.bbox, false);
History.EndTransaction(); History.EndTransaction();
}; };
if(null === sortProps) if(null === sortProps)
{ {
...@@ -12387,7 +12387,7 @@ ...@@ -12387,7 +12387,7 @@
} }
return arrResult; return arrResult;
}; };
WorksheetView.prototype.af_setStyleAfterOpen = function() WorksheetView.prototype.af_setStyleAfterOpen = function()
{ {
var worksheet = this.model; var worksheet = this.model;
......
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