AdvancedCompareOptions

AdvancedCompareOptions class

Allows to set advanced compare options.

public class AdvancedCompareOptions

Constructors

NameDescription
AdvancedCompareOptions()The default constructor.

Properties

NameDescription
IgnoreDmlUniqueId { get; set; }Specifies whether to ignore difference in DrawingML unique Id.
IgnoreStoreItemId { get; set; }Specifies whether to ignore difference in StructuredDocumentTag store item Id.

Remarks

These options have no equivalence in Microsoft Word and might help to produce more precise comparison result.

Examples

Shows how to compare SDT with same content but different store item id.

Document docA = new Document(MyDir + "Document with SDT 1.docx");
Document docB = new Document(MyDir + "Document with SDT 2.docx");

// Configure options to compare SDT with same content but different store item id.
CompareOptions compareOptions = new CompareOptions();
compareOptions.AdvancedOptions.IgnoreStoreItemId = false;

docA.Compare(docB, "user", DateTime.Now, compareOptions);
Assert.AreEqual(8, docA.Revisions.Count);

compareOptions.AdvancedOptions.IgnoreStoreItemId = true;

docA.Revisions.RejectAll();
docA.Compare(docB, "user", DateTime.Now, compareOptions);
Assert.AreEqual(0, docA.Revisions.Count);

See Also