Fix Bug 49256

This commit is contained in:
Julia Radzhabova 2021-03-26 23:46:57 +03:00
parent 430923570f
commit 0b3d221b5b
3 changed files with 8 additions and 5 deletions

View file

@ -501,6 +501,8 @@ define([
var hyperProps = moveData.get_Hyperlink(); var hyperProps = moveData.get_Hyperlink();
if (!hyperProps) return; if (!hyperProps) return;
ToolTip = (_.isEmpty(hyperProps.get_ToolTip())) ? hyperProps.get_Value() : hyperProps.get_ToolTip(); ToolTip = (_.isEmpty(hyperProps.get_ToolTip())) ? hyperProps.get_Value() : hyperProps.get_ToolTip();
if (ToolTip.length>256)
ToolTip = ToolTip.substr(0, 256) + '...';
} else if (type == Asc.c_oAscMouseMoveDataTypes.Footnote) { } else if (type == Asc.c_oAscMouseMoveDataTypes.Footnote) {
ToolTip = moveData.get_FootnoteText(); ToolTip = moveData.get_FootnoteText();
if (ToolTip.length>1000) if (ToolTip.length>1000)

View file

@ -491,6 +491,8 @@ define([
ToolTip = (_.isEmpty(hyperProps.get_ToolTip())) ? hyperProps.get_Value() : hyperProps.get_ToolTip(); ToolTip = (_.isEmpty(hyperProps.get_ToolTip())) ? hyperProps.get_Value() : hyperProps.get_ToolTip();
ToolTip = Common.Utils.String.htmlEncode(ToolTip); ToolTip = Common.Utils.String.htmlEncode(ToolTip);
if (ToolTip.length>256)
ToolTip = ToolTip.substr(0, 256) + '...';
if (screenTip.tipLength !== ToolTip.length || screenTip.strTip.indexOf(ToolTip)<0 ) { if (screenTip.tipLength !== ToolTip.length || screenTip.strTip.indexOf(ToolTip)<0 ) {
screenTip.toolTip.setTitle(ToolTip + '<br><b>' + me.txtPressLink + '</b>'); screenTip.toolTip.setTitle(ToolTip + '<br><b>' + me.txtPressLink + '</b>');

View file

@ -1114,11 +1114,10 @@ define([
if (props.asc_getType() == Asc.c_oAscHyperlinkType.WebLink) { if (props.asc_getType() == Asc.c_oAscHyperlinkType.WebLink) {
var linkstr = props.asc_getTooltip(); var linkstr = props.asc_getTooltip();
if (linkstr) { linkstr = (linkstr) ? linkstr : props.asc_getHyperlinkUrl();
if (linkstr.length>256)
linkstr = linkstr.substr(0, 256) + '...';
linkstr = Common.Utils.String.htmlEncode(linkstr) + '<br><b>' + me.textCtrlClick + '</b>'; linkstr = Common.Utils.String.htmlEncode(linkstr) + '<br><b>' + me.textCtrlClick + '</b>';
} else {
linkstr = Common.Utils.String.htmlEncode(props.asc_getHyperlinkUrl()) + '<br><b>' + me.textCtrlClick + '</b>';
}
} else { } else {
linkstr = Common.Utils.String.htmlEncode(props.asc_getTooltip() || (props.asc_getLocation())); linkstr = Common.Utils.String.htmlEncode(props.asc_getTooltip() || (props.asc_getLocation()));
linkstr += '<br><b>' + me.textCtrlClick + '</b>'; linkstr += '<br><b>' + me.textCtrlClick + '</b>';