瀏覽代碼

Fixed a bug in Paragraph.AppendHyperlink(h) that caused any custom formatting to be applied to the runs before the Hyperlink instead of the Hyperlink itself. The below is now possible

Paragraph p = document.InsertParagraph();
p.Append("Check out this ").Color(Color.Red).AppendHyperlink(h).Color(Color.Green).Append(", it's really cool").Color(Color.Blue);
master
coffeycathal_cp 15 年之前
父節點
當前提交
37a584e15f
共有 3 個文件被更改,包括 2 次插入1 次删除
  1. 1
    1
      DocX/Paragraph.cs
  2. 1
    0
      DocX/_Enumerations.cs
  3. 二進制
      DocX/bin/Debug/DocX.dll

+ 1
- 1
DocX/Paragraph.cs 查看文件

@@ -1891,7 +1891,7 @@ namespace Novacode
Xml.Add(h.Xml);
Xml.Elements().Last().SetAttributeValue(DocX.r + "id", rel.Id);
this.runs = Xml.Elements(XName.Get("r", DocX.w.NamespaceName)).Reverse().Take(h.Xml.Elements(XName.Get("r", DocX.w.NamespaceName)).Count()).ToList();
this.runs = Xml.Elements().Last().Elements(XName.Get("r", DocX.w.NamespaceName)).ToList();
BuildRunLookup(Xml);
return this;

+ 1
- 0
DocX/_Enumerations.cs 查看文件

@@ -5,6 +5,7 @@ using System.Text;
namespace Novacode
{
public enum Orientation { Portrait, Landscape };
public enum XmlDocument { Main, HeaderOdd, HeaderEven, HeaderFirst, FooterOdd, FooterEven, FooterFirst };
public enum MatchFormattingOptions { ExactMatch, SubsetMatch};
public enum Script { superscript, subscript, none }

二進制
DocX/bin/Debug/DocX.dll 查看文件


Loading…
取消
儲存