Commit e373223a authored by Alexander.Trofimov's avatar Alexander.Trofimov Committed by Alexander.Trofimov

refactoring getSelectionMergeInfo

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@48877 954022d7-b5bf-4e40-9824-e11837661b57
parent 4088627f
......@@ -5589,21 +5589,8 @@
getSelectionMergeInfo: function (options) {
var t = this;
var arn = t.activeRange.clone(true);
var range;
var notEmpty = false;
var r, c;
if (c_oAscSelectionType.RangeMax === t.activeRange.type) {
range = t.model.getRange3(/*arn.r1*/0, /*arn.c1*/0, gc_nMaxRow0, gc_nMaxCol0);
}
else if (c_oAscSelectionType.RangeCol === t.activeRange.type) {
range = t.model.getRange3(/*arn.r1*/0, arn.c1, gc_nMaxRow0, arn.c2);
}
else if (c_oAscSelectionType.RangeRow === t.activeRange.type) {
range = t.model.getRange3(arn.r1, /*arn.c1*/0, arn.r2, gc_nMaxCol0);
}
else {
range = t.model.getRange3(arn.r1, arn.c1, arn.r2, arn.c2);
}
switch (options) {
case c_oAscMergeOptions.Merge:
......@@ -5619,8 +5606,7 @@
}
break;
case c_oAscMergeOptions.MergeAcross:
for (r = arn.r1; r <= arn.r2; ++r)
{
for (r = arn.r1; r <= arn.r2; ++r) {
notEmpty = false;
for (c = arn.c1; c <= arn.c2; ++c) {
if (false === this._isCellEmpty(c, r)) {
......
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