The writer has a magical problem of automatically adding line breaks to the document

wrap-test.docx (10.9 KB)
There is a rich text box and a table in the document. When using a Python script to set the content of the rich text box, line breaks will be automatically added to the beginning and end of the document. When the table is deleted, the same code will not have this problem. It feels like there is a problem with the underlying structure of LibreOffice. Please refer to the attachment for the document. The code is as follows:doc = XSCRIPTCONTEXT.getDocument() ctl = doc.ContentControls.getByIndex(0) ctl.setString('88899090')