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

Откатил правки бага http://bugzserver/show_bug.cgi?id=17134 (ревизия 46518)

Поправил баг http://bugzserver/show_bug.cgi?id=17134 (в setSelection мы теперь ищем не offset диапазона, а активной ячейки)

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@49662 954022d7-b5bf-4e40-9824-e11837661b57
parent 009d7741
...@@ -1660,7 +1660,7 @@ ...@@ -1660,7 +1660,7 @@
if (!t.hasFocus) {t.setFocus(true);} if (!t.hasFocus) {t.setFocus(true);}
if (!(event.altKey && event.shiftKey)) { if (!(event.altKey && event.shiftKey)) {
if (event.altKey) if (event.altKey)
t._addNewLine() t._addNewLine();
else { else {
if (false === t.handlers.trigger("isGlobalLockEditCell")) if (false === t.handlers.trigger("isGlobalLockEditCell"))
tryCloseEditor() tryCloseEditor()
......
...@@ -243,7 +243,7 @@ ...@@ -243,7 +243,7 @@
}); });
this.model.handlers.add("showWorksheet", function (wsId) { this.model.handlers.add("showWorksheet", function (wsId) {
self.showWorksheetById(wsId); self.showWorksheetById(wsId);
var ws = self.getWorksheetById(wsId) var ws = self.getWorksheetById(wsId);
self.handlers.trigger("asc_onActiveSheetChanged", ws.model.getIndex()); self.handlers.trigger("asc_onActiveSheetChanged", ws.model.getIndex());
}); });
this.model.handlers.add("setSelection", function () { this.model.handlers.add("setSelection", function () {
......
...@@ -5542,14 +5542,10 @@ ...@@ -5542,14 +5542,10 @@
} }
var arn = ar.clone(true); var arn = ar.clone(true);
var isMC = this._isMergedCells(arn); var isMC = this._isMergedCells(arn);
// var adjustRight = ar.c2 >= vr.c2 || ar.c1 >= vr.c2 && isMC; var adjustRight = ar.c2 >= vr.c2 || ar.c1 >= vr.c2 && isMC;
var adjustRight = ar.startCol >= vr.c2; var adjustBottom = ar.r2 >= vr.r2 || ar.r1 >= vr.r2 && isMC;
// var adjustBottom = ar.r2 >= vr.r2 || ar.r1 >= vr.r2 && isMC; var incX = ar.c1 < vr.c1 && isMC ? arn.c1 - vr.c1 : ar.c2 < vr.c1 ? ar.c2 - vr.c1 : 0;
var adjustBottom = ar.startRow >= vr.r2; var incY = ar.r1 < vr.r1 && isMC ? arn.r1 - vr.r1 : ar.r2 < vr.r1 ? ar.r2 - vr.r1 : 0;
// var incX = ar.c1 < vr.c1 && isMC ? arn.c1 - vr.c1 : ar.c2 < vr.c1 ? ar.c2 - vr.c1 : 0;
var incX = ar.startCol < vr.c1 && isMC ? arn.c1 - vr.c1 : ar.startCol < vr.c1 ? ar.startCol - vr.c1 : 0;
// var incY = ar.r1 < vr.r1 && isMC ? arn.r1 - vr.r1 : ar.r2 < vr.r1 ? ar.r2 - vr.r1 : 0;
var incY = ar.startRow < vr.r1 && isMC ? arn.r1 - vr.r1 : ar.startRow < vr.r1 ? ar.startRow - vr.r1 : 0;
if (adjustRight) { if (adjustRight) {
while ( this._isColDrawnPartially(isMC ? arn.c2 : ar.c2, vr.c1 + incX) ) {++incX;} while ( this._isColDrawnPartially(isMC ? arn.c2 : ar.c2, vr.c1 + incX) ) {++incX;}
...@@ -5732,8 +5728,7 @@ ...@@ -5732,8 +5728,7 @@
cell_info.halign = horAlign; cell_info.halign = horAlign;
cell_info.valign = vertAlign; cell_info.valign = vertAlign;
} } else {
else {
cell_info.halign = c.getAlignHorizontalByValue().toLowerCase(); cell_info.halign = c.getAlignHorizontalByValue().toLowerCase();
cell_info.valign = c.getAlignVertical().toLowerCase(); cell_info.valign = c.getAlignVertical().toLowerCase();
} }
...@@ -5898,7 +5893,7 @@ ...@@ -5898,7 +5893,7 @@
this._trigger("selectionNameChanged", this.getSelectionName(/*bRangeText*/false)); this._trigger("selectionNameChanged", this.getSelectionName(/*bRangeText*/false));
this._trigger("selectionChanged", this.getSelectionInfo()); this._trigger("selectionChanged", this.getSelectionInfo());
return this._calcActiveRangeOffset(); return this._calcActiveCellOffset();
}, },
changeSelectionStartPoint: function (x, y, isCoord, isSelectMode) { changeSelectionStartPoint: function (x, y, isCoord, isSelectMode) {
......
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