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

Доработка Drag-drop текста в автофигурах.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@52070 954022d7-b5bf-4e40-9824-e11837661b57
parent a215a774
......@@ -6972,7 +6972,7 @@ CDocument.prototype =
var bFlowTable = (null === this.DrawingObjects.getTableByXY( X, Y, this.CurPage, this ) ? false : true);
// Сначала посмотрим, попалили мы в текстовый селект (но при этом не в границу таблицы и не более чем одинарным кликом)
if ( MouseEvent.ClickCount <= 1 && false === bTableBorder && true === this.Selection_Check( X, Y, this.CurPage, undefined ) )
if ( MouseEvent.ClickCount <= 1 && false === bTableBorder && ( nInDrawing < 0 || ( nInDrawing === DRAWING_ARRAY_TYPE_BEHIND && true === bInText ) ) && false === bFlowTable && true === this.Selection_Check( X, Y, this.CurPage, undefined ) )
{
// Начинаем передвижение текста
this.DrawingDocument.StartTrackText();
......@@ -7565,18 +7565,14 @@ CDocument.prototype =
// Если надо удаляем выделенную часть
if ( true !== bCopy )
{
this.Remove(1, false, false, false);
}
else
this.Selection_Remove();
this.Selection_Remove();
// Выделение выставляется внутри функции Insert_Content
if ( undefined != Para.Parent )
{
Para.Parent.Insert_Content( DocContent, NearPos );
//Para.Parent.
this.Recalculate();
......@@ -7748,6 +7744,8 @@ CDocument.prototype =
this.Selection.StartPos = DstIndex;
this.Selection.EndPos = DstIndex + ElementsCount - 1;
}
this.CurPos.Type = docpostype_Content;
},
Document_SelectNumbering : function(NumPr)
......
......@@ -3176,7 +3176,7 @@ CGraphicObjects.prototype =
return null;
},
selectionCheck: function( X, Y, Page_Abs )
selectionCheck: function( X, Y, Page_Abs, NearPos )
{
switch (this.curState.id)
{
......@@ -3185,7 +3185,7 @@ CGraphicObjects.prototype =
var textObject = this.curState.textObject;
if(isRealObject(textObject) && isRealObject(textObject.GraphicObj) && typeof textObject.GraphicObj.selectionCheck === "function")
{
return textObject.GraphicObj.selectionCheck(X, Y, Page_Abs);
return textObject.GraphicObj.selectionCheck(X, Y, Page_Abs, NearPos);
}
break;
}
......@@ -3194,7 +3194,7 @@ CGraphicObjects.prototype =
textObject = this.curState.textObject;
if(isRealObject(textObject) && typeof textObject.selectionCheck === "function")
{
return textObject.selectionCheck(X, Y, Page_Abs);
return textObject.selectionCheck(X, Y, Page_Abs, NearPos);
}
break;
}
......
......@@ -3800,16 +3800,16 @@ WordShape.prototype =
this.textBoxContent.Remove(Count, bOnlyText, bRemoveOnlySelection);
},
selectionCheck: function(x, y, pageAbs)
selectionCheck: function(x, y, pageAbs, NearPos)
{
if(this.textBoxContent && this.transformText)
{
if(!this.hitToTextRect(x, y))
if( undefined === NearPos && !this.hitToTextRect(x, y) )
return false;
var t = global_MatrixTransformer.Invert(this.transformText);
var t_x = t.TransformPointX(x, y);
var t_y = t.TransformPointY(x, y);
return this.textBoxContent.Selection_Check(t_x, t_y, pageAbs);
return this.textBoxContent.Selection_Check(t_x, t_y, pageAbs, NearPos);
}
return false;
},
......@@ -4022,6 +4022,7 @@ WordShape.prototype =
}
else /*if(this.parent.elementsManipulator.Document.CurPos.Type == docpostype_FlowObjects ) */
{
this.document.RecalculateCurPos();
this.document.DrawingDocument.UpdateTargetTransform(this.transformText);
this.document.DrawingDocument.TargetShow();
this.document.DrawingDocument.SelectEnabled(false);
......
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