WarningSource

WarningSource enumeration

Specifies the module that produces a warning during document loading or saving.

public enum WarningSource

Values

NameValueDescription
Unknown0The warning source is not specified.
Layout1Module that builds a document layout.
DrawingML2Module that renders DrawingML shapes.
OfficeMath3Module that renders OfficeMath.
Shapes4Module that renders ordinary shapes.
Metafile5Module that renders metafiles.
Xps6Module that renders XPS.
Pdf7Module that renders PDF.
Image8Module that renders images.
Docx9Module that reads/writes DOCX files.
Doc10Module that reads/writes binary DOC files.
Text11Module that reads/writes plaintext files.
Rtf12Module that reads/writes RTF files.
WordML13Module that reads/writes WML files.
Nrx14Common modules that are shared between DOCX/WML reader/writer modules.
Odt15Module that reads/writes ODT files.
Html16Module that reads/writes HTML/MHTML files.
Validator17Module that verifies model consistency and validity.
Xaml18Module that reads/writes Xaml files.
Svm19Module that reads Svm files.
MathML20Module that reads W3C MathML files.
Font21Module that reads font files.
Svg22Module that reads SVG files.
Markdown23Module that reads/writes Markdown files.
Chm24Module that reads CHM files.
Epub25Module that reads/writes EPUB files.
Xml26Module that reads XML files.
Xlsx27Module that writes XLSX files.

Examples

Shows how to work with the warning source.

Document doc = new Document(MyDir + "Emphases markdown warning.docx");

WarningInfoCollection warnings = new WarningInfoCollection();
doc.WarningCallback = warnings;
doc.Save(ArtifactsDir + "DocumentBuilder.EmphasesWarningSourceMarkdown.md");

foreach (WarningInfo warningInfo in warnings)
{
    if (warningInfo.Source == WarningSource.Markdown)
        Assert.AreEqual("The (*, 0:11) cannot be properly written into Markdown.", warningInfo.Description);
}

See Also