Commit fccfbe7a authored by Ilya.Kirillov's avatar Ilya.Kirillov Committed by Alexander.Trofimov

Исправлены баги при стартовании селекта с помощью Shift+MouseClick.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@61604 954022d7-b5bf-4e40-9824-e11837661b57
parent 7b8f4cd6
......@@ -10311,27 +10311,14 @@ CDocument.prototype =
( (docpostype_DrawingObjects !== this.CurPos.Type && !(docpostype_HdrFtr === this.CurPos.Type && this.HdrFtr.CurHdrFtr && this.HdrFtr.CurHdrFtr.Content.CurPos.Type === docpostype_DrawingObjects))
|| true === this.DrawingObjects.checkTextObject(X, Y, PageIndex) ) )
{
if ( true === this.Is_SelectionUse() )
{
if (true === this.Is_SelectionUse())
this.Selection.Start = false;
this.Selection_SetEnd( X, Y, e );
this.Document_UpdateSelectionState();
return;
}
else
{
var CurPara = this.Get_CurrentParagraph();
this.Start_SelectionFromCurPos();
if ( null !== CurPara )
{
this.Cursor_MoveLeft(true, false);
this.Selection.Start = false;
this.Selection_SetEnd( X, Y, e );
this.Document_UpdateSelectionState();
return;
}
}
this.Selection_SetEnd(X, Y, e);
this.Document_UpdateSelectionState();
return;
}
this.Selection_SetStart( X, Y, e );
......@@ -14515,7 +14502,32 @@ CDocument.prototype.End_SilentMode = function(bUpdate)
this.TurnOn_RecalculateCurPos(bUpdate);
this.TurnOn_InterfaceEvents(bUpdate);
};
//CDocument.prototype.
/*
Начинаем селект с текущей точки. Если селект уже есть, тогда ничего не делаем.
*/
CDocument.prototype.Start_SelectionFromCurPos = function()
{
if (true === this.Is_SelectionUse())
return true;
this.Selection.Use = true;
this.Selection.Start = false;
if (docpostype_HdrFtr === this.CurPos.Type)
{
return this.HdrFtr.Start_SelectionFromCurPos();
}
else if (docpostype_DrawingObjects === this.CurPos.Type)
{
return this.DrawingObject.startSelectionFromCurPos();
}
else //if (docpostype_Content === this.CurPos.Type)
{
this.Selection.StartPos = this.CurPos.ContentPos;
this.Selection.EndPos = this.CurPos.ContentPos;
this.Content[this.CurPos.ContentPos].Start_SelectionFromCurPos();
}
};
//-----------------------------------------------------------------------------------
//
......
......@@ -9256,7 +9256,6 @@ CDocumentContent.prototype.Get_TopElement = function()
return null;
};
CDocumentContent.prototype.Compare_DrawingsLogicPositions = function(CompareObject)
{
for (var Index = 0, Count = this.Content.length; Index < Count; Index++)
......@@ -9268,6 +9267,21 @@ CDocumentContent.prototype.Compare_DrawingsLogicPositions = function(CompareObje
return;
}
};
CDocumentContent.prototype.Start_SelectionFromCurPos = function()
{
if (docpostype_DrawingObjects === this.CurPos.Type)
{
return this.DrawingObject.startSelectionFromCurPos();
}
else //if (docpostype_Content === this.CurPos.Type)
{
this.Selection.Use = true;
this.Selection.Start = false;
this.Selection.StartPos = this.CurPos.ContentPos;
this.Selection.EndPos = this.CurPos.ContentPos;
this.Content[this.CurPos.ContentPos].Start_SelectionFromCurPos();
}
};
function CDocumentContentStartState(DocContent)
{
......
......@@ -913,6 +913,11 @@ CHeaderFooter.prototype =
{
return this.Content.Get_CurrentParagraph();
},
Start_SelectionFromCurPos : function()
{
this.Content.Start_SelectionFromCurPos();
},
//-----------------------------------------------------------------------------------
// Функции для работы с номерами страниц
//-----------------------------------------------------------------------------------
......@@ -2095,6 +2100,12 @@ CHeaderFooterController.prototype =
{
return this.CurHdrFtr.Get_CurrentParagraph();
},
Start_SelectionFromCurPos : function()
{
if (null !== this.CurHdrFtr)
this.CurHdrFtr.Start_SelectionFromCurPos();
},
//-----------------------------------------------------------------------------------
// Внутренние(вспомогательные) функции
//-----------------------------------------------------------------------------------
......
......@@ -12487,6 +12487,16 @@ Paragraph.prototype.Compare_DrawingsLogicPositions = function(CompareObject)
}
};
Paragraph.prototype.Start_SelectionFromCurPos = function()
{
var ContentPos = this.Get_ParaContentPos(false, false);
this.Selection.Use = true;
this.Selection.Start = false;
this.Selection.StartManually = true;
this.Selection.EndManually = true;
this.Set_SelectionContentPos(ContentPos, ContentPos);
};
var pararecalc_0_All = 0;
var pararecalc_0_None = 1;
......
......@@ -19625,6 +19625,18 @@ CTable.prototype.Compare_DrawingsLogicPositions = function(CompareObject)
}
}
};
CTable.prototype.Start_SelectionFromCurPos = function()
{
this.Selection.Use = true;
this.Selection.Type = table_Selection_Text;
this.Selection.CurRow = this.CurCell.Row.Index;
this.Selection.StartPos.Pos = { Cell : this.CurCell.Index, Row : this.CurCell.Row.Index };
this.Selection.EndPos.Pos = { Cell : this.CurCell.Index, Row : this.CurCell.Row.Index };
this.Internal_Selection_UpdateCells();
this.CurCell.Content.Start_SelectionFromCurPos();
};
// Класс CTableRow
function CTableRow(Table, Cols, TableGrid)
......
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