Commit 446b426a authored by Igor.Zotov's avatar Igor.Zotov Committed by Alexander.Trofimov

http://bugzserver/show_bug.cgi?id=28042 - Потеря свойств гиперссылки...

http://bugzserver/show_bug.cgi?id=28042 -  Потеря свойств гиперссылки скопированной со стороннего сайта после ее вставки

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@60286 954022d7-b5bf-4e40-9824-e11837661b57
parent eb206d8a
...@@ -6929,6 +6929,7 @@ PasteProcessor.prototype = ...@@ -6929,6 +6929,7 @@ PasteProcessor.prototype =
} }
var bHyperlink = false; var bHyperlink = false;
var isPasteHyperlink = null;
if("a" == sChildNodeName) if("a" == sChildNodeName)
{ {
var href = child.href; var href = child.href;
...@@ -6948,12 +6949,27 @@ PasteProcessor.prototype = ...@@ -6948,12 +6949,27 @@ PasteProcessor.prototype =
this.oDocument = shape.txBody.content; this.oDocument = shape.txBody.content;
var Pos = ( true == this.oDocument.Selection.Use ? this.oDocument.Selection.StartPos : this.oDocument.CurPos.ContentPos ); var Pos = ( true == this.oDocument.Selection.Use ? this.oDocument.Selection.StartPos : this.oDocument.CurPos.ContentPos );
var HyperProps = new CHyperlinkProperty({ Text: null, Value: href, ToolTip: title}); isPasteHyperlink = node.getElementsByTagName('img');
this.oDocument.Content[Pos].Hyperlink_Add( HyperProps );
var text = null;
if(isPasteHyperlink && isPasteHyperlink.length)
isPasteHyperlink = null;
else
{
text = child.innerText;
}
if(isPasteHyperlink)
{
var HyperProps = new CHyperlinkProperty({ Text: text, Value: href, ToolTip: title});
this.oDocument.Content[Pos].Hyperlink_Add( HyperProps );
}
} }
} }
bAddParagraph = this._ExecutePresentation(child, Common_CopyObj(pPr), false, bAddParagraph, bIsBlockChild || bInBlock, arrShapes, arrImages, arrTables); if(!isPasteHyperlink)
bAddParagraph = this._ExecutePresentation(child, Common_CopyObj(pPr), false, bAddParagraph, bIsBlockChild || bInBlock, arrShapes, arrImages, arrTables);
if(bIsBlockChild) if(bIsBlockChild)
bAddParagraph = true; bAddParagraph = true;
} }
...@@ -6961,7 +6977,7 @@ PasteProcessor.prototype = ...@@ -6961,7 +6977,7 @@ PasteProcessor.prototype =
{ {
//this._Commit_Br(2, node, pPr);//word ���������� 2 ��������� br //this._Commit_Br(2, node, pPr);//word ���������� 2 ��������� br
} }
return; return bAddParagraph;
}, },
_StartExecuteTablePresentation : function(node, pPr, arrShapes, arrImages, arrTables) _StartExecuteTablePresentation : function(node, pPr, arrShapes, arrImages, arrTables)
......
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