public static bool AddHyperlink(ITsStrBldr strBldr, int ws, string sLinkText, string sUrl,
FwStyleSheet stylesheet)
{
var hyperlinkStyle = stylesheet.FindStyle(StyleServices.Hyperlink);
if (hyperlinkStyle == null)
return false;
if (stylesheet != null && stylesheet.Cache != null && stylesheet.Cache.ProjectId != null)
sUrl = FwLinkArgs.FixSilfwUrlForCurrentProject(sUrl, stylesheet.Cache.ProjectId.Name,
stylesheet.Cache.ProjectId.ServerName);
int ichStart = strBldr.Length;
strBldr.Replace(ichStart, ichStart, sLinkText, StyleUtils.CharStyleTextProps(null, ws));
StringServices.MarkTextInBldrAsHyperlink(strBldr, ichStart, strBldr.Length,
sUrl, hyperlinkStyle);
return true;
}
#endregion