Possible Bug
Posted: Thu Jan 06, 2022 10:16 am
Hello!
I think I might have found a bug.
If I add a new paragraph with
DOCX.Editor.AppendPara
and add no text to this paragraph, the program crashes, when it tries to get a preview going.
Saving the document to a file works just fine.
Example:
DOCX:=TDOCXReadWriteVcl.Create(Nil);
DOCX.Editor.Paras.AppendPara;
DOCX.SaveToFile('C:\Users\Praktikant\Desktop\test.docx');
TfrmPreview.Create(Self).Execute(DOCX.Editor);
DOCX.Free;
This code will save the file just fine, but crash, when trying to show a preview it crashes.
Adding
DOCX.Editor.Paras.Last.AppendPlainText('Example');
before the preview fixes the problem.
Is this intentional?
If so, why?
I think I might have found a bug.
If I add a new paragraph with
DOCX.Editor.AppendPara
and add no text to this paragraph, the program crashes, when it tries to get a preview going.
Saving the document to a file works just fine.
Example:
DOCX:=TDOCXReadWriteVcl.Create(Nil);
DOCX.Editor.Paras.AppendPara;
DOCX.SaveToFile('C:\Users\Praktikant\Desktop\test.docx');
TfrmPreview.Create(Self).Execute(DOCX.Editor);
DOCX.Free;
This code will save the file just fine, but crash, when trying to show a preview it crashes.
Adding
DOCX.Editor.Paras.Last.AppendPlainText('Example');
before the preview fixes the problem.
Is this intentional?
If so, why?