Commit 2a807040 authored by Alexey.Musinov's avatar Alexey.Musinov

Merge branch 'develop' of https://github.com/ONLYOFFICE/sdkjs into develop

parents d70433a2 49b84fcf
......@@ -2104,7 +2104,7 @@
getTableIntersectionRange: function(range)
{
var worksheet = this.worksheet;
var res = null;
var res = [];
var tableParts = worksheet.TableParts;
if(tableParts)
......@@ -2113,11 +2113,6 @@
{
if(tableParts[i].Ref.intersection(range))
{
if(res === null)
{
res = [];
}
res.push(worksheet.TableParts[i]);
}
}
......
......@@ -2519,11 +2519,11 @@
/** Рисует фон ячеек в строке */
WorksheetView.prototype._drawRowBG = function ( drawingCtx, row, colStart, colEnd, offsetX, offsetY, oMergedCell ) {
var mergedCells = [];
if ( this.rows[row].height < this.height_1px && null === oMergedCell ) {
return {};
return mergedCells;
}
var mergedCells = [];
var ctx = (undefined === drawingCtx) ? this.drawingCtx : drawingCtx;
for ( var col = colStart; col <= colEnd; ++col ) {
if ( this.cols[col].width < this.width_1px && null === oMergedCell ) {
......@@ -2599,11 +2599,12 @@
/** Рисует текст ячеек в строке */
WorksheetView.prototype._drawRowText = function ( drawingCtx, row, colStart, colEnd, offsetX, offsetY ) {
var mergedCells = [];
if ( this.rows[row].height < this.height_1px ) {
return {};
return mergedCells;
}
var dependentCells = {}, mergedCells = [], i, mc, col;
var dependentCells = {}, i, mc, col;
// draw cells' text
for ( col = colStart; col <= colEnd; ++col ) {
if ( this.cols[col].width < this.width_1px ) {
......@@ -13253,23 +13254,20 @@
t._isLockedCells( range, null, callback );
};
WorksheetView.prototype.af_checkChangeRange = function(range)
{
WorksheetView.prototype.af_checkChangeRange = function(range) {
var res = null;
var ws = this.model;
var intersectionTables = this.model.autoFilters.getTableIntersectionRange(range);
if (0 < intersectionTables.length) {
var tablePart = intersectionTables[0];
if(tablePart)
{
if(range.r1 !== tablePart.Ref.r1)//первая строка таблицы не равно первой строке выделенного диапазона
if (range.r1 !== tablePart.Ref.r1)//первая строка таблицы не равно первой строке выделенного диапазона
{
res = c_oAscError.ID.FTChangeTableRangeError;
}
else if(intersectionTables.length !== 1)//выделено несколько таблиц
} else if (intersectionTables.length !== 1)//выделено несколько таблиц
{
res = c_oAscError.ID.FTRangeIncludedOtherTables;
}
} else {
res = c_oAscError.ID.FTChangeTableRangeError;
}
return res;
......
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