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

fix bug #30978

При изменении высоты нужно делать update. Только еще и нужно заносить высоту в модель, но тут есть проблемы.
Не всегда можно это в историю заносить (открытие, например). А если не заносить в историю, то при сборке ничего не изменится...

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@67110 954022d7-b5bf-4e40-9824-e11837661b57
parent af85dabf
...@@ -3916,7 +3916,7 @@ Woorksheet.prototype.getRowHeight=function(index){ ...@@ -3916,7 +3916,7 @@ Woorksheet.prototype.getRowHeight=function(index){
else else
return -1; return -1;
}; };
Woorksheet.prototype.setRowHeight=function(height, start, stop, isNoCustom){ Woorksheet.prototype.setRowHeight=function(height, start, stop, isCustom){
if(0 == height) if(0 == height)
return this.setRowHidden(true, start, stop); return this.setRowHidden(true, start, stop);
//start, stop 0 based //start, stop 0 based
...@@ -3940,7 +3940,7 @@ Woorksheet.prototype.setRowHeight=function(height, start, stop, isNoCustom){ ...@@ -3940,7 +3940,7 @@ Woorksheet.prototype.setRowHeight=function(height, start, stop, isNoCustom){
{ {
var oOldProps = row.getHeightProp(); var oOldProps = row.getHeightProp();
row.h = height; row.h = height;
if (!isNoCustom) { if (isCustom) {
row.flags |= g_nRowFlag_CustomHeight; row.flags |= g_nRowFlag_CustomHeight;
} }
row.flags &= ~g_nRowFlag_hd; row.flags &= ~g_nRowFlag_hd;
......
...@@ -709,7 +709,7 @@ ...@@ -709,7 +709,7 @@
if (false === isSuccess) if (false === isSuccess)
return; return;
t.model.setRowHeight(newHeight, row, row); t.model.setRowHeight(newHeight, row, row, true);
t.autoFilters.reDrawFilter(null, row); t.autoFilters.reDrawFilter(null, row);
t._cleanCache(new asc_Range(0, row, t.cols.length - 1, row)); t._cleanCache(new asc_Range(0, row, t.cols.length - 1, row));
t.changeWorksheet("update", {reinitRanges: true}); t.changeWorksheet("update", {reinitRanges: true});
...@@ -4475,8 +4475,9 @@ ...@@ -4475,8 +4475,9 @@
rowInfo.heightReal = rowInfo.height = Math.min(this.maxRowHeight, rowInfo.heightReal = rowInfo.height = Math.min(this.maxRowHeight,
Math.max(rowInfo.height, newHeight)); Math.max(rowInfo.height, newHeight));
if (rowHeight !== rowInfo.height) { if (rowHeight !== rowInfo.height) {
// ToDo нужно по идее всегда выставлять, но тут проблема с тем, что не всегда можно это в историю заносить (открытие, например). А если не заносить в историю, то при сборке ничего не изменится...
if (!rowInfo.isDefaultHeight) if (!rowInfo.isDefaultHeight)
this.model.setRowHeight(rowInfo.height + this.height_1px, row, row); this.model.setRowHeight(rowInfo.height + this.height_1px, row, row, false);
if (angle) { if (angle) {
this._fetchCellCache(col, row).text.textBound = this._fetchCellCache(col, row).text.textBound =
...@@ -9386,7 +9387,7 @@ ...@@ -9386,7 +9387,7 @@
functionModelAction = function () { functionModelAction = function () {
// Приводим к px (чтобы было ровно) // Приводим к px (чтобы было ровно)
val = val / 0.75; val = (val | val) * 0.75; // 0.75 - это размер 1px в pt (можно было 96/72) val = val / 0.75; val = (val | val) * 0.75; // 0.75 - это размер 1px в pt (можно было 96/72)
t.model.setRowHeight(Math.min(val, t.maxRowHeight), checkRange.r1, checkRange.r2); t.model.setRowHeight(Math.min(val, t.maxRowHeight), checkRange.r1, checkRange.r2, true);
isUpdateRows = true; isUpdateRows = true;
fullRecalc = true; fullRecalc = true;
reinitRanges = true; reinitRanges = true;
...@@ -10689,9 +10690,9 @@ ...@@ -10689,9 +10690,9 @@
if (Math.abs(h - this.rows[r].height) > 0.000001 && !this.rows[r].isCustomHeight) { if (Math.abs(h - this.rows[r].height) > 0.000001 && !this.rows[r].isCustomHeight) {
if (!this.rows[r].isDefaultHeight) { if (!this.rows[r].isDefaultHeight) {
this.rows[r].heightReal = this.rows[r].height = Math.min(h, this.maxRowHeight); this.rows[r].heightReal = this.rows[r].height = Math.min(h, this.maxRowHeight);
this.model.setRowHeight(this.rows[r].height + this.height_1px, r, r); this.model.setRowHeight(this.rows[r].height + this.height_1px, r, r, false);
this.isChanged = true;
} }
this.isChanged = true;
} }
if (Math.abs(d - this.rows[r].descender) > 0.000001) { if (Math.abs(d - this.rows[r].descender) > 0.000001) {
this.rows[r].descender = d; this.rows[r].descender = d;
......
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