Commit b25aa0e3 authored by Anna.Pavlova's avatar Anna.Pavlova Committed by Alexander.Trofimov

Поправила баг : при копировании и вставке формул в таблицах ну учитывалось...

Поправила баг : при копировании и вставке формул в таблицах ну учитывалось смещение, поэтому было неправильное позиционирование

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@62341 954022d7-b5bf-4e40-9824-e11837661b57
parent 6c51b912
...@@ -1100,17 +1100,7 @@ ParaMath.prototype.Is_BrkBinBefore = function() ...@@ -1100,17 +1100,7 @@ ParaMath.prototype.Is_BrkBinBefore = function()
}; };
ParaMath.prototype.Shift_Range = function(Dx, Dy, _CurLine, _CurRange) ParaMath.prototype.Shift_Range = function(Dx, Dy, _CurLine, _CurRange)
{ {
var CurLine = _CurLine - this.StartLine; this.Root.Shift_Range(Dx, Dy, _CurLine, _CurRange);
var CurRange = ( 0 === CurLine ? _CurRange - this.StartRange : _CurRange );
var StartPos = this.protected_GetRangeStartPos(CurLine, CurRange);
var EndPos = this.protected_GetRangeEndPos(CurLine, CurRange);
if ( EndPos >= 1 )
{
this.X += Dx;
this.Y += Dy;
}
}; };
//----------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------
// Функция для работы с формулой // Функция для работы с формулой
......
...@@ -2039,6 +2039,7 @@ CMathBase.prototype.private_UpdatePosOnRemove = CMathContent.prototype.private ...@@ -2039,6 +2039,7 @@ CMathBase.prototype.private_UpdatePosOnRemove = CMathContent.prototype.private
CMathBase.prototype.private_CorrectSelectionPos = CMathContent.prototype.private_CorrectSelectionPos; CMathBase.prototype.private_CorrectSelectionPos = CMathContent.prototype.private_CorrectSelectionPos;
CMathBase.prototype.private_CorrectSelectionPos = CMathContent.prototype.private_CorrectSelectionPos; CMathBase.prototype.private_CorrectSelectionPos = CMathContent.prototype.private_CorrectSelectionPos;
CMathBase.prototype.private_SetNeedResize = CMathContent.prototype.private_SetNeedResize; CMathBase.prototype.private_SetNeedResize = CMathContent.prototype.private_SetNeedResize;
CMathBase.prototype.Shift_Range = CMathContent.prototype.Shift_Range;
CMathBase.prototype.private_CorrectCurPos = function() CMathBase.prototype.private_CorrectCurPos = function()
{ {
if (this.CurPos > this.Content.length - 1) if (this.CurPos > this.Content.length - 1)
...@@ -2161,6 +2162,11 @@ CMathBounds.prototype.SetPos = function(Line, Pos, PRSA) ...@@ -2161,6 +2162,11 @@ CMathBounds.prototype.SetPos = function(Line, Pos, PRSA)
this.CheckLineBound(Line); this.CheckLineBound(Line);
this.Bounds[Line].SetPos(Pos, PRSA); this.Bounds[Line].SetPos(Pos, PRSA);
}; };
CMathBounds.prototype.ShiftPos = function(Line, Dx, Dy)
{
this.CheckLineBound(Line);
this.Bounds[Line].ShiftPos(Line, Dx, Dy);
};
CMathBounds.prototype.GetPos = function(Line) CMathBounds.prototype.GetPos = function(Line)
{ {
var Pos = new CMathPosition(); var Pos = new CMathPosition();
...@@ -2219,6 +2225,11 @@ CMathBoundsMeasures.prototype.SetPos = function(Pos, PRSA) ...@@ -2219,6 +2225,11 @@ CMathBoundsMeasures.prototype.SetPos = function(Pos, PRSA)
this.X = PRSA.X + Pos.x; this.X = PRSA.X + Pos.x;
this.Y = PRSA.Y + Pos.y - this.Asc; this.Y = PRSA.Y + Pos.y - this.Asc;
}; };
CMathBoundsMeasures.prototype.ShiftPos = function(Line, Dx, Dy)
{
this.X += Dx;
this.Y += Dy;
};
CMathBoundsMeasures.prototype.GetX = function() CMathBoundsMeasures.prototype.GetX = function()
{ {
return this.X; return this.X;
......
...@@ -999,6 +999,15 @@ CMathContent.prototype.setPosition = function(pos, PRSA, Line, Range, Page) ...@@ -999,6 +999,15 @@ CMathContent.prototype.setPosition = function(pos, PRSA, Line, Range, Page)
this.Content[i].setPosition(pos, PRSA, Line, Range, Page); this.Content[i].setPosition(pos, PRSA, Line, Range, Page);
} }
}; };
CMathContent.prototype.Shift_Range = function(Dx, Dy, _CurLine, _CurRange)
{
var CurLine = _CurLine - this.StartLine;
var CurRange = ( 0 === CurLine ? _CurRange - this.StartRange : _CurRange );
this.Bounds.ShiftPos(CurLine, Dx, Dy);
CMathContent.superclass.Shift_Range.call(this, Dx, Dy, _CurLine, _CurRange);
};
CMathContent.prototype.old_setPosition = function(pos) CMathContent.prototype.old_setPosition = function(pos)
{ {
this.pos.x = pos.x; this.pos.x = pos.x;
......
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