My application under Windows 10-64 bits, use Docx
to read .docx Word documents and analyze their contents.
Thus it accesses to paragraphs and "MagicText
" contained therein.
Each MagicText contains a "formatting
" field, sometimes Null (Nothing in VB.Net).
A "formatting" contains a series of fields, such as Bold
My application tests Bold and Italic, which are typically Boolean. Good.
In the previous version I used Docx (V220.127.116.11) these two fields were never null.
In V18.104.22.168 version I just installed, woe, with the same input documents these fields can be null which crash the application ...
This regression requires first test if the field is initialized before assigning its value.
example in VB.Net:
Public ReadOnly CurrentFormat As Formatting = Magic.formatting
Public ReadOnly Property __IsBold__ As Boolean
If (CurrentFormat Is Nothing) Then Return False
Return IIf(CurrentFormat.Bold Is Nothing, False, CurrentFormat.Bold)
In general, why typed fields of "formatting" (especially boolean) they take a Null value?
Thank you for your reply.