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 = ...@@ -487,18 +487,32 @@ DrawingObjectsController.prototype =
} }
else else
{ {
if(this.document) var ret = {objectId: object.Get_Id(), cursorType: "text"};
{
var content = object.getDocContent(); var content = object.getDocContent();
var invert_transform_text = object.invertTransformText, tx, ty; var invert_transform_text = object.invertTransformText, tx, ty;
if(content && invert_transform_text) if(content && invert_transform_text)
{ {
tx = invert_transform_text.TransformPointX(x, y); tx = invert_transform_text.TransformPointX(x, y);
ty = invert_transform_text.TransformPointY(x, y); ty = invert_transform_text.TransformPointY(x, y);
if(this.document)
{
content.Update_CursorType(tx, ty, pageIndex); 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 = ...@@ -930,6 +930,13 @@ TextAddState.prototype =
this.drawingObjects.updateSelectionState(); this.drawingObjects.updateSelectionState();
this.drawingObjects.drawingObjects.sendGraphicObjectProps(); this.drawingObjects.drawingObjects.sendGraphicObjectProps();
this.drawingObjects.changeCurrentState(new NullState(this.drawingObjects)); 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 @@ ...@@ -5712,7 +5712,7 @@
lockRangePosTop = drawingInfo.object.getVisibleTopOffset(true); lockRangePosTop = drawingInfo.object.getVisibleTopOffset(true);
} }
if (drawingInfo.hyperlink instanceof ParaHyperlinkStart) { if (drawingInfo.hyperlink instanceof ParaHyperlink) {
oHyperlink = new Hyperlink(); oHyperlink = new Hyperlink();
oHyperlink.Tooltip = drawingInfo.hyperlink.ToolTip; oHyperlink.Tooltip = drawingInfo.hyperlink.ToolTip;
var spl = drawingInfo.hyperlink.Value.split("!"); var spl = drawingInfo.hyperlink.Value.split("!");
......
...@@ -7128,15 +7128,17 @@ CDocumentContent.prototype = ...@@ -7128,15 +7128,17 @@ CDocumentContent.prototype =
if ( null != this.Selection.Data && true === this.Selection.Data.Hyperlink ) 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 ); this.Selection.Data.Value.Set_Visited( true );
if(this.DrawingDocument.m_oLogicDocument)
{
for ( var PageIdx = Item.Get_StartPage_Absolute(); PageIdx < Item.Get_StartPage_Absolute() + Item.Pages.length; PageIdx++ ) 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.OnRecalculatePage( PageIdx, this.DrawingDocument.m_oLogicDocument.Pages[PageIdx] );
this.DrawingDocument.OnEndRecalculate(false, true); this.DrawingDocument.OnEndRecalculate(false, true);
} }
} }
}
else else
{ {
this.Selection.Use = true; this.Selection.Use = true;
......
...@@ -6317,6 +6317,10 @@ Paragraph.prototype = ...@@ -6317,6 +6317,10 @@ Paragraph.prototype =
TextPr.Color = null; TextPr.Color = null;
TextPr.Underline = null; TextPr.Underline = null;
TextPr.RStyle = editor ? editor.WordControl.m_oLogicDocument.Get_Styles().Get_Default_Hyperlink() : 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 ); Hyperlink.Apply_TextPr( TextPr, undefined, false );
} }
else if ( null !== HyperProps.Text && "" !== HyperProps.Text ) 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