public void Write(TextWriter writer)
 {
     writer.Write("<w:r><w:fldChar w:fldCharType=\"begin\" w:fldLock=\"0\" w:dirty=\"0\"/></w:r><w:r><w:rPr><w:noProof/></w:rPr><w:instrText xml:space=\"preserve\"> TC &quot;");
     writer.Write(OpenXmlFieldGenerators.Escape(this._label));
     writer.Write("&quot; \\f C \\l &quot;");
     writer.Write(this._level.ToString(CultureInfo.InvariantCulture));
     writer.Write("&quot; </w:instrText></w:r><w:r><w:fldChar w:fldCharType=\"end\" w:fldLock=\"0\" w:dirty=\"0\"/></w:r>");
 }
            public void Write(TextWriter writer)
            {
                string value = OpenXmlFieldGenerators.BeginInstructions(writer, this._properties);

                writer.Write(this._instructions + "</w:r><w:r>");
                writer.Write(value);
                writer.Write("<w:fldChar w:fldCharType=\"separate\" w:fldLock=\"0\" w:dirty=\"0\"/></w:r><w:r>");
                writer.Write(value);
                writer.Write("<w:t xml:space=\"preserve\">1</w:t></w:r><w:r>");
                writer.Write(value);
                writer.Write("<w:fldChar w:fldCharType=\"end\" w:fldLock=\"0\" w:dirty=\"0\"/></w:r>");
            }
 public void Write(TextWriter writer)
 {
     writer.Write("<w:r><w:fldChar w:fldCharType=\"begin\" w:fldLock=\"0\" w:dirty=\"0\"/></w:r><w:r><w:rPr><w:noProof/></w:rPr>");
     if (this._bookmarkLink)
     {
         writer.Write("<w:instrText xml:space=\"preserve\"> HYPERLINK \\l &quot;");
         writer.Write(OpenXmlBookmarkModel.CleanseBookmarkName(this._target));
     }
     else
     {
         writer.Write("<w:instrText xml:space=\"preserve\"> HYPERLINK &quot;");
         writer.Write(OpenXmlFieldGenerators.Escape(this._target));
     }
     writer.Write("&quot; </w:instrText></w:r><w:r><w:fldChar w:fldCharType=\"separate\" w:fldLock=\"0\" w:dirty=\"0\"/></w:r>");
 }
 public void StartHyperlink(string target, bool bookmarkLink, OpenXmlRunPropertiesModel textStyle)
 {
     this._contents.Add(OpenXmlFieldGenerators.StartHyperlink(target, bookmarkLink));
 }
 public void AddLabel(string label, int level, OpenXmlRunPropertiesModel textStyle)
 {
     this._contents.Add(OpenXmlFieldGenerators.TableOfContentsEntry(label, level));
 }
 public void AddPageCountField(OpenXmlRunPropertiesModel textStyle)
 {
     this._contents.Add(OpenXmlFieldGenerators.PageCountField(textStyle));
 }
 public void EndHyperlink(OpenXmlRunPropertiesModel textStyle)
 {
     this._contents.Add(OpenXmlFieldGenerators.EndHyperlink());
 }