Commit 7c561059 authored by Sergey.Luzyanin's avatar Sergey.Luzyanin Committed by Alexander.Trofimov

Bug 24434 - Гиперссылка не вставляется в автофигуру

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@57298 954022d7-b5bf-4e40-9824-e11837661b57
parent 229233a1
......@@ -487,18 +487,32 @@ DrawingObjectsController.prototype =
}
else
{
if(this.document)
var ret = {objectId: object.Get_Id(), cursorType: "text"};
var content = object.getDocContent();
var invert_transform_text = object.invertTransformText, tx, ty;
if(content && invert_transform_text)
{
var content = object.getDocContent();
var invert_transform_text = object.invertTransformText, tx, ty;
if(content && invert_transform_text)
tx = invert_transform_text.TransformPointX(x, y);
ty = invert_transform_text.TransformPointY(x, y);
if(this.document)
{
tx = invert_transform_text.TransformPointX(x, y);
ty = invert_transform_text.TransformPointY(x, y);
content.Update_CursorType(tx, ty, pageIndex);
}
else if(this.drawingObjects)
{
var hit_paragraph = content.Internal_GetContentPosByXY(tx, ty, 0);
var par = content.Content[hit_paragraph];
if(isRealObject(par))
{
var check_hyperlink = par.Check_Hyperlink(tx, ty, 0);
if(isRealObject(check_hyperlink))
{
ret.hyperlink = check_hyperlink;
}
}
}
}
return {objectId: object.Get_Id(), cursorType: "text"};
return ret;
}
},
......
......@@ -930,6 +930,13 @@ TextAddState.prototype =
this.drawingObjects.updateSelectionState();
this.drawingObjects.drawingObjects.sendGraphicObjectProps();
this.drawingObjects.changeCurrentState(new NullState(this.drawingObjects));
this.drawingObjects.handleEventMode = HANDLE_EVENT_MODE_CURSOR;
var cursor_type = this.drawingObjects.onMouseDown(e, x, y, pageIndex);
if(cursor_type.hyperlink)
{
this.drawingObjects.drawingObjects.showDrawingObjects(true);
}
this.drawingObjects.handleEventMode = HANDLE_EVENT_MODE_HANDLE;
}
};
......
......@@ -5712,7 +5712,7 @@
lockRangePosTop = drawingInfo.object.getVisibleTopOffset(true);
}
if (drawingInfo.hyperlink instanceof ParaHyperlinkStart) {
if (drawingInfo.hyperlink instanceof ParaHyperlink) {
oHyperlink = new Hyperlink();
oHyperlink.Tooltip = drawingInfo.hyperlink.ToolTip;
var spl = drawingInfo.hyperlink.Value.split("!");
......
......@@ -7128,13 +7128,15 @@ CDocumentContent.prototype =
if ( null != this.Selection.Data && true === this.Selection.Data.Hyperlink )
{
editor.sync_HyperlinkClickCallback( this.Selection.Data.Value.Get_Value() );
editor && editor.sync_HyperlinkClickCallback( this.Selection.Data.Value.Get_Value() );
this.Selection.Data.Value.Set_Visited( true );
for ( var PageIdx = Item.Get_StartPage_Absolute(); PageIdx < Item.Get_StartPage_Absolute() + Item.Pages.length; PageIdx++ )
this.DrawingDocument.OnRecalculatePage( PageIdx, this.DrawingDocument.m_oLogicDocument.Pages[PageIdx] );
this.DrawingDocument.OnEndRecalculate(false, true);
if(this.DrawingDocument.m_oLogicDocument)
{
for ( var PageIdx = Item.Get_StartPage_Absolute(); PageIdx < Item.Get_StartPage_Absolute() + Item.Pages.length; PageIdx++ )
this.DrawingDocument.OnRecalculatePage( PageIdx, this.DrawingDocument.m_oLogicDocument.Pages[PageIdx] );
this.DrawingDocument.OnEndRecalculate(false, true);
}
}
}
else
......
......@@ -6317,6 +6317,10 @@ Paragraph.prototype =
TextPr.Color = null;
TextPr.Underline = null;
TextPr.RStyle = editor ? editor.WordControl.m_oLogicDocument.Get_Styles().Get_Default_Hyperlink() : null;
if(!this.bFromDocument)
{
TextPr.Unifill = CreateUniFillSchemeColorWidthTint(11, 0);
}
Hyperlink.Apply_TextPr( TextPr, undefined, false );
}
else if ( null !== HyperProps.Text && "" !== HyperProps.Text )
......
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