Exemplo n.º 1
0
 public XWPFSDTContent(CT_SdtContentRun sdtRun, IBody part, IRunBody parent)
 {
     foreach (CT_R ctr in sdtRun.GetRList())
     {
         XWPFRun run = new XWPFRun((CT_R)ctr, parent);
         runs.Add(run);
         bodyElements.Add(run);
     }
 }
Exemplo n.º 2
0
 public XWPFSDTContent(CT_SdtContentRun sdtRun, IBody part, IRunBody parent)
 {
     foreach (CT_R ctr in sdtRun.GetRList())
     {
         XWPFRun run = new XWPFRun((CT_R)ctr, parent);
         runs.Add(run);
         bodyElements.Add(run);
     }
 }
Exemplo n.º 3
0
 /**
  * Identifies (in order) the parts of the paragraph /
  *  sub-paragraph that correspond to character text
  *  runs, and builds the appropriate runs for these.
  */
 private void BuildRunsInOrderFromXml(ArrayList items)
 {
     foreach (object o in items)
     {
         if (o is CT_R)
         {
             runs.Add(new XWPFRun((CT_R)o, this));
         }
         if (o is CT_Hyperlink1)
         {
             CT_Hyperlink1 link = (CT_Hyperlink1)o;
             foreach (CT_R r in link.GetRList())
             {
                 runs.Add(new XWPFHyperlinkRun(link, r, this));
             }
         }
         if (o is CT_SdtRun)
         {
             CT_SdtContentRun run = ((CT_SdtRun)o).sdtContent;
             foreach (CT_R r in run.GetRList())
             {
                 runs.Add(new XWPFRun(r, this));
             }
         }
         if (o is CT_RunTrackChange)
         {
             foreach (CT_R r in ((CT_RunTrackChange)o).GetRList())
             {
                 runs.Add(new XWPFRun(r, this));
             }
         }
         if (o is CT_SimpleField)
         {
             foreach (CT_R r in ((CT_SimpleField)o).GetRList())
             {
                 runs.Add(new XWPFRun(r, this));
             }
         }
         if (o is CT_SmartTagRun)
         {
             // Smart Tags can be nested many times.
             // This implementation does not preserve the tagging information
             BuildRunsInOrderFromXml((o as CT_SmartTagRun).Items);
         }
     }
 }