public static string RetrieveListItem(WmlDocument document,
                                       XElement paragraph, string bulletReplacementString)
 {
     using (OpenXmlMemoryStreamDocument streamDoc = new OpenXmlMemoryStreamDocument(document))
     {
         using (WordprocessingDocument wdoc = streamDoc.GetWordprocessingDocument())
         {
             return(RetrieveListItem(wdoc, paragraph, bulletReplacementString));
         }
     }
 }
 public static WmlDocument SimplifyMarkup(WmlDocument doc, SimplifyMarkupSettings settings)
 {
     using (OpenXmlMemoryStreamDocument streamDoc = new OpenXmlMemoryStreamDocument(doc))
     {
         using (WordprocessingDocument document = streamDoc.GetWordprocessingDocument())
         {
             SimplifyMarkup(document, settings);
         }
         return streamDoc.GetModifiedWmlDocument();
     }
 }
 public static string RetrieveListItem(WmlDocument document,
     XElement paragraph, string bulletReplacementString)
 {
     using (OpenXmlMemoryStreamDocument streamDoc = new OpenXmlMemoryStreamDocument(document))
     {
         using (WordprocessingDocument wdoc = streamDoc.GetWordprocessingDocument())
         {
             return RetrieveListItem(wdoc, paragraph, bulletReplacementString);
         }
     }
 }
Exemple #4
0
 public static WmlDocument SimplifyMarkup(WmlDocument doc, SimplifyMarkupSettings settings)
 {
     using (OpenXmlMemoryStreamDocument streamDoc = new OpenXmlMemoryStreamDocument(doc))
     {
         using (WordprocessingDocument document = streamDoc.GetWordprocessingDocument())
         {
             SimplifyMarkup(document, settings);
         }
         return(streamDoc.GetModifiedWmlDocument());
     }
 }
 public static bool HasTrackedRevisions(WmlDocument document)
 {
     using (OpenXmlMemoryStreamDocument streamDoc = new OpenXmlMemoryStreamDocument(document))
     {
         using (WordprocessingDocument wdoc = streamDoc.GetWordprocessingDocument())
         {
             return RevisionAccepter.HasTrackedRevisions(wdoc);
         }
     }
 }
 public static WmlDocument AcceptRevisions(WmlDocument document)
 {
     using (OpenXmlMemoryStreamDocument streamDoc = new OpenXmlMemoryStreamDocument(document))
     {
         using (WordprocessingDocument doc = streamDoc.GetWordprocessingDocument())
         {
             AcceptRevisions(doc);
         }
         return streamDoc.GetModifiedWmlDocument();
     }
 }