Commit 7985af12 authored by Sergey.Luzyanin's avatar Sergey.Luzyanin

Bug 30787 - [TextArt] При клике в текстАрт выделять сразу текст внутри

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@66670 954022d7-b5bf-4e40-9824-e11837661b57
parent 119d3027
......@@ -6455,11 +6455,13 @@ DrawingObjectsController.prototype =
oContent.CurPos.Type = docpostype_Content;
oContent.CurPos.ContentPos = 0;
oShape.bSelectedText = true;
}
else
{
sText = oShape.getTextArtTranslate().DefaultText;
AddToContentFromString(oContent, sText);
oShape.bSelectedText = false;
}
}
else if(this.drawingObjects.cSld)
......@@ -6480,15 +6482,18 @@ DrawingObjectsController.prototype =
oNearestPos = { Paragraph: paragraph, ContentPos: paragraph.Get_ParaContentPos(false, false) };
paragraph.Check_NearestPos(oNearestPos);
oContent.Insert_Content(oSelectedContent, oNearestPos);
oShape.bSelectedText = true;
}
else
{
sText = oShape.getTextArtTranslate().DefaultText;
AddToContentFromString(oContent, sText);
oShape.bSelectedText = false;
}
}
else
{
oShape.bSelectedText = false;
sText = oShape.getTextArtTranslate().DefaultText;
AddToContentFromString(oContent, sText);
}
......
......@@ -2861,7 +2861,7 @@ CShape.prototype =
var dMaxWidthRec = RecalculateDocContentByMaxLine(oDocContent, dMaxWidth, this.bWordShape);
if(!(oBodyPr.vert === nVertTTvert || oBodyPr.vert === nVertTTvert270))
{
if(dMaxWidthRec < w)
if(dMaxWidthRec < w && (!this.bWordShape && !this.bCheckAutoFitFlag))
{
oDocContent.Set_StartPage(0);
oDocContent.Reset(0, 0, w, 20000);
......@@ -2886,7 +2886,7 @@ CShape.prototype =
}
else
{
if(dMaxWidthRec < h)
if(dMaxWidthRec < h && !this.bWordShape)
{
oDocContent.Set_StartPage(0);
oDocContent.Reset(0, 0, h, 20000);
......
......@@ -382,6 +382,9 @@ DrawingObjectsController.prototype.addTextArtFromParams = function(nStyle, dRect
oTextArt.checkDrawingBaseCoords();
this.selectObject(oTextArt, 0);
var oContent = oTextArt.getDocContent();
this.selection.textSelection = oTextArt;
oContent.Select_All();
oTextArt.addToRecalculate();
this.startRecalculate();
};
......
......@@ -4989,7 +4989,15 @@ CPresentation.prototype =
oTextArt.spPr.xfrm.setOffX((this.Slides[this.CurPage].Width - oTextArt.spPr.xfrm.extX)/2);
oTextArt.spPr.xfrm.setOffY((this.Slides[this.CurPage].Height - oTextArt.spPr.xfrm.extY)/2);
this.Slides[this.CurPage].graphicObjects.resetSelection();
this.Slides[this.CurPage].graphicObjects.selectObject(oTextArt, 0);
if(oTextArt.bSelectedText){
this.Slides[this.CurPage].graphicObjects.selectObject(oTextArt, 0);
}
else{
var oContent = oTextArt.getDocContent();
oContent.Content[0].Document_SetThisElementCurrent(false);
this.Select_All();
}
this.Recalculate();
this.Document_UpdateInterfaceState();
}
......
......@@ -3055,7 +3055,14 @@ CDocument.prototype =
this.Remove( 1, true );
this.Paragraph_Add( Drawing );
this.Select_DrawingObject( Drawing.Get_Id() );
if(TextArt.bSelectedText){
this.Select_DrawingObject(Drawing.Get_Id());
}
else{
var oContent = Drawing.GraphicObj.getDocContent();
oContent.Content[0].Document_SetThisElementCurrent(false);
this.Select_All();
}
}
else if ( type_Table == Item.GetType() )
{
......
......@@ -2342,7 +2342,14 @@ CDocumentContent.prototype =
if ( true == this.Selection.Use )
this.Remove( 1, true );
this.Paragraph_Add( Drawing );
this.Select_DrawingObject( Drawing.Get_Id() );
if(TextArt.bSelectedText){
this.Select_DrawingObject(Drawing.Get_Id());
}
else{
var oContent = Drawing.GraphicObj.getDocContent();
oContent.Content[0].Document_SetThisElementCurrent(false);
this.LogicDocument.Select_All();
}
}
else if ( type_Table == Item.GetType() )
{
......
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