Commit d3dd8358 authored by Ilya Kirillov's avatar Ilya Kirillov

Refactoring Set_CurPosXY -> SetCurPosXY.

parent c0fe6b53
...@@ -1658,32 +1658,32 @@ CDocumentContent.prototype.CollectDocumentStatistics = function(Stats) ...@@ -1658,32 +1658,32 @@ CDocumentContent.prototype.CollectDocumentStatistics = function(Stats)
Element.CollectDocumentStatistics(Stats); Element.CollectDocumentStatistics(Stats);
} }
}; };
CDocumentContent.prototype.Document_CreateFontMap = function(FontMap) CDocumentContent.prototype.Document_CreateFontMap = function(FontMap)
{ {
var Count = this.Content.length; var Count = this.Content.length;
for (var Index = 0; Index < Count; Index++) for (var Index = 0; Index < Count; Index++)
{ {
var Element = this.Content[Index]; var Element = this.Content[Index];
Element.Document_CreateFontMap(FontMap); Element.Document_CreateFontMap(FontMap);
} }
}; };
CDocumentContent.prototype.Document_CreateFontCharMap = function(FontCharMap) CDocumentContent.prototype.Document_CreateFontCharMap = function(FontCharMap)
{ {
var Count = this.Content.length; var Count = this.Content.length;
for (var Index = 0; Index < Count; Index++) for (var Index = 0; Index < Count; Index++)
{ {
var Element = this.Content[Index]; var Element = this.Content[Index];
Element.Document_CreateFontCharMap(FontCharMap); Element.Document_CreateFontCharMap(FontCharMap);
} }
}; };
CDocumentContent.prototype.Document_Get_AllFontNames = function(AllFonts) CDocumentContent.prototype.Document_Get_AllFontNames = function(AllFonts)
{ {
var Count = this.Content.length; var Count = this.Content.length;
for (var Index = 0; Index < Count; Index++) for (var Index = 0; Index < Count; Index++)
{ {
var Element = this.Content[Index]; var Element = this.Content[Index];
Element.Document_Get_AllFontNames(AllFonts); Element.Document_Get_AllFontNames(AllFonts);
} }
}; };
CDocumentContent.prototype.Document_UpdateInterfaceState = function() CDocumentContent.prototype.Document_UpdateInterfaceState = function()
{ {
...@@ -1941,7 +1941,7 @@ CDocumentContent.prototype.MoveCursorToEndPos = function(AddToSelect, StartSelec ...@@ -1941,7 +1941,7 @@ CDocumentContent.prototype.MoveCursorToEndPos = function(AddToSelect, StartSelec
}; };
CDocumentContent.prototype.MoveCursorUpToLastRow = function(X, Y, AddToSelect) CDocumentContent.prototype.MoveCursorUpToLastRow = function(X, Y, AddToSelect)
{ {
this.Set_CurPosXY(X, Y); this.SetCurPosXY(X, Y);
if (true === AddToSelect) if (true === AddToSelect)
{ {
if (true !== this.Selection.Use) if (true !== this.Selection.Use)
...@@ -1999,7 +1999,7 @@ CDocumentContent.prototype.MoveCursorUpToLastRow = function(X, Y, AddToSelect) ...@@ -1999,7 +1999,7 @@ CDocumentContent.prototype.MoveCursorUpToLastRow = function(X, Y, AddToSelect)
}; };
CDocumentContent.prototype.MoveCursorDownToFirstRow = function(X, Y, AddToSelect) CDocumentContent.prototype.MoveCursorDownToFirstRow = function(X, Y, AddToSelect)
{ {
this.Set_CurPosXY(X, Y); this.SetCurPosXY(X, Y);
if (true === AddToSelect) if (true === AddToSelect)
{ {
if (true !== this.Selection.Use) if (true !== this.Selection.Use)
...@@ -3607,10 +3607,10 @@ CDocumentContent.prototype.GetCurPosXY = function() ...@@ -3607,10 +3607,10 @@ CDocumentContent.prototype.GetCurPosXY = function()
{ {
return {X : this.CurPos.RealX, Y : this.CurPos.RealY}; return {X : this.CurPos.RealX, Y : this.CurPos.RealY};
}; };
CDocumentContent.prototype.Set_CurPosXY = function(X, Y) CDocumentContent.prototype.SetCurPosXY = function(X, Y)
{ {
this.CurPos.RealX = X; this.CurPos.RealX = X;
this.CurPos.RealY = Y; this.CurPos.RealY = Y;
}; };
CDocumentContent.prototype.IsSelectionUse = function() CDocumentContent.prototype.IsSelectionUse = function()
{ {
......
...@@ -4866,7 +4866,7 @@ CTable.prototype.Selection_SetEnd = function(X, Y, CurPage, MouseEvent) ...@@ -4866,7 +4866,7 @@ CTable.prototype.Selection_SetEnd = function(X, Y, CurPage, MouseEvent)
} }
var Pos = this.Internal_GetCellByXY(X, Y, CurPage); var Pos = this.Internal_GetCellByXY(X, Y, CurPage);
this.Content[Pos.Row].Get_Cell(Pos.Cell).Content_Set_CurPosXY(X, Y); this.Content[Pos.Row].Get_Cell(Pos.Cell).Content_SetCurPosXY(X, Y);
this.Selection.Data = null; this.Selection.Data = null;
this.Selection.EndPos.Pos = Pos; this.Selection.EndPos.Pos = Pos;
this.Selection.EndPos.X = X; this.Selection.EndPos.X = X;
...@@ -5841,7 +5841,7 @@ CTable.prototype.MoveCursorUp = function(AddToSelect) ...@@ -5841,7 +5841,7 @@ CTable.prototype.MoveCursorUp = function(AddToSelect)
if (null === Cell) if (null === Cell)
return true; return true;
Cell.Content_Set_CurPosXY(X, Y); Cell.Content_SetCurPosXY(X, Y);
this.CurCell = Cell; this.CurCell = Cell;
this.Selection.EndPos.Pos = {Cell : Cell.Index, Row : Cell.Row.Index}; this.Selection.EndPos.Pos = {Cell : Cell.Index, Row : Cell.Row.Index};
} }
...@@ -5869,7 +5869,7 @@ CTable.prototype.MoveCursorUp = function(AddToSelect) ...@@ -5869,7 +5869,7 @@ CTable.prototype.MoveCursorUp = function(AddToSelect)
{ {
this.CurCell = Cell; this.CurCell = Cell;
this.CurCell.Content.MoveCursorToStartPos(); this.CurCell.Content.MoveCursorToStartPos();
this.CurCell.Content_Set_CurPosXY(X, Y); this.CurCell.Content_SetCurPosXY(X, Y);
return false; return false;
} }
...@@ -5932,7 +5932,7 @@ CTable.prototype.MoveCursorUp = function(AddToSelect) ...@@ -5932,7 +5932,7 @@ CTable.prototype.MoveCursorUp = function(AddToSelect)
if (null === Cell) if (null === Cell)
return true; return true;
Cell.Content_Set_CurPosXY(X, Y); Cell.Content_SetCurPosXY(X, Y);
this.CurCell = Cell; this.CurCell = Cell;
this.Selection.EndPos.Pos = {Cell : Cell.Index, Row : Cell.Row.Index}; this.Selection.EndPos.Pos = {Cell : Cell.Index, Row : Cell.Row.Index};
} }
...@@ -6021,7 +6021,7 @@ CTable.prototype.MoveCursorDown = function(AddToSelect) ...@@ -6021,7 +6021,7 @@ CTable.prototype.MoveCursorDown = function(AddToSelect)
if (null === Cell) if (null === Cell)
return true; return true;
Cell.Content_Set_CurPosXY(X, Y); Cell.Content_SetCurPosXY(X, Y);
this.CurCell = Cell; this.CurCell = Cell;
this.Selection.EndPos.Pos = {Cell : Cell.Index, Row : Cell.Row.Index}; this.Selection.EndPos.Pos = {Cell : Cell.Index, Row : Cell.Row.Index};
} }
...@@ -6049,7 +6049,7 @@ CTable.prototype.MoveCursorDown = function(AddToSelect) ...@@ -6049,7 +6049,7 @@ CTable.prototype.MoveCursorDown = function(AddToSelect)
{ {
this.CurCell = Cell; this.CurCell = Cell;
this.CurCell.Content.MoveCursorToStartPos(); this.CurCell.Content.MoveCursorToStartPos();
this.CurCell.Content_Set_CurPosXY(X, Y); this.CurCell.Content_SetCurPosXY(X, Y);
return false; return false;
} }
...@@ -6111,7 +6111,7 @@ CTable.prototype.MoveCursorDown = function(AddToSelect) ...@@ -6111,7 +6111,7 @@ CTable.prototype.MoveCursorDown = function(AddToSelect)
if (null === Cell) if (null === Cell)
return true; return true;
Cell.Content_Set_CurPosXY(X, Y); Cell.Content_SetCurPosXY(X, Y);
this.CurCell = Cell; this.CurCell = Cell;
this.Selection.EndPos.Pos = {Cell : Cell.Index, Row : Cell.Row.Index}; this.Selection.EndPos.Pos = {Cell : Cell.Index, Row : Cell.Row.Index};
} }
...@@ -6233,7 +6233,7 @@ CTable.prototype.MoveCursorUpToLastRow = function(X, Y, AddToSelect) ...@@ -6233,7 +6233,7 @@ CTable.prototype.MoveCursorUpToLastRow = function(X, Y, AddToSelect)
if (null === Cell) if (null === Cell)
return true; return true;
Cell.Content_Set_CurPosXY(X, Y); Cell.Content_SetCurPosXY(X, Y);
this.CurCell = Cell; this.CurCell = Cell;
this.Selection.EndPos.Pos = {Cell : Cell.Index, Row : Cell.Row.Index}; this.Selection.EndPos.Pos = {Cell : Cell.Index, Row : Cell.Row.Index};
this.Internal_Selection_UpdateCells(); this.Internal_Selection_UpdateCells();
...@@ -6252,7 +6252,7 @@ CTable.prototype.MoveCursorUpToLastRow = function(X, Y, AddToSelect) ...@@ -6252,7 +6252,7 @@ CTable.prototype.MoveCursorUpToLastRow = function(X, Y, AddToSelect)
// У последней ячейки у первого параграфа, мы выставим RealX, RealY // У последней ячейки у первого параграфа, мы выставим RealX, RealY
var Cell = this.Content[this.Content.length - 1].Get_Cell(0); var Cell = this.Content[this.Content.length - 1].Get_Cell(0);
Cell.Content_Set_CurPosXY(X, Y); Cell.Content_SetCurPosXY(X, Y);
} }
} }
else else
...@@ -6296,7 +6296,7 @@ CTable.prototype.MoveCursorDownToFirstRow = function(X, Y, AddToSelect) ...@@ -6296,7 +6296,7 @@ CTable.prototype.MoveCursorDownToFirstRow = function(X, Y, AddToSelect)
if (null === Cell) if (null === Cell)
return true; return true;
Cell.Content_Set_CurPosXY(X, Y); Cell.Content_SetCurPosXY(X, Y);
this.CurCell = Cell; this.CurCell = Cell;
this.Selection.EndPos.Pos = {Cell : Cell.Index, Row : Cell.Row.Index}; this.Selection.EndPos.Pos = {Cell : Cell.Index, Row : Cell.Row.Index};
this.Internal_Selection_UpdateCells(); this.Internal_Selection_UpdateCells();
...@@ -6312,7 +6312,7 @@ CTable.prototype.MoveCursorDownToFirstRow = function(X, Y, AddToSelect) ...@@ -6312,7 +6312,7 @@ CTable.prototype.MoveCursorDownToFirstRow = function(X, Y, AddToSelect)
// У последней ячейки у первого параграфа, мы выставим RealX, RealY // У последней ячейки у первого параграфа, мы выставим RealX, RealY
var Cell = this.Content[0].Get_Cell(0); var Cell = this.Content[0].Get_Cell(0);
Cell.Content_Set_CurPosXY(X, Y); Cell.Content_SetCurPosXY(X, Y);
} }
} }
else else
......
...@@ -684,7 +684,7 @@ CTableCell.prototype = ...@@ -684,7 +684,7 @@ CTableCell.prototype =
Content_Reset : function(X, Y, XLimit, YLimit) Content_Reset : function(X, Y, XLimit, YLimit)
{ {
this.Content.Reset( X, Y, XLimit, YLimit ); this.Content.Reset( X, Y, XLimit, YLimit );
this.Content.Set_CurPosXY( X, Y ); this.Content.SetCurPosXY( X, Y );
}, },
Content_Get_PageBounds : function(PageIndex) Content_Get_PageBounds : function(PageIndex)
...@@ -875,7 +875,7 @@ CTableCell.prototype = ...@@ -875,7 +875,7 @@ CTableCell.prototype =
return this.Content.GetCurPosXY(); return this.Content.GetCurPosXY();
}, },
Content_Set_CurPosXY : function(X, Y) Content_SetCurPosXY : function(X, Y)
{ {
var _X = X, _Y = Y; var _X = X, _Y = Y;
var Transform = this.private_GetTextDirectionTransform(); var Transform = this.private_GetTextDirectionTransform();
...@@ -885,7 +885,7 @@ CTableCell.prototype = ...@@ -885,7 +885,7 @@ CTableCell.prototype =
_X = Transform.TransformPointX(X, Y); _X = Transform.TransformPointX(X, Y);
_Y = Transform.TransformPointY(X, Y); _Y = Transform.TransformPointY(X, Y);
} }
return this.Content.Set_CurPosXY(_X, _Y); return this.Content.SetCurPosXY(_X, _Y);
}, },
Content_MoveCursorUpToLastRow : function(X, Y, AddToSelect) Content_MoveCursorUpToLastRow : function(X, Y, AddToSelect)
......
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