https://bugs.documentfoundation.org/show_bug.cgi?id=100060
Bug ID: 100060
Summary: Formatting loss in replacing bookmark in docx file
using XDocumentInsertable.insertDocumentFromURL method
Product: LibreOffice
Version: 5.0.4.2 release
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: Writer
Assignee: [email protected]
Reporter: [email protected]
Created attachment 125289
--> https://bugs.documentfoundation.org/attachment.cgi?id=125289&action=edit
Source HTML file and generated DOC & DOCX files
We use LibreOffice 5.0.4.2 to create .docx and , .doc documents using UNO Java
API.
We use MS Word 97 filter to produce .doc documents and MS Word 2007 XML to
produce .docx documents.
We have content from HTML file. The text has strong ,em (italic). We have a
bookmark in both .doc and .docx files and used
XDocumentInsertable.insertDocumentFromURL API to insert text from HTML file in
place of bookmark XTextCursor . But generated files doesn't show <em> italic
and shows strong(bold attribute).
Code We used to to Insert HTML file in the document is below:
-------------------------------------------------------------
PropertyValue[] insertArgs = new PropertyValue[1];
insertArgs[0] = "HTML";
// Create the text cursor using the specified textRange
XTextCursor xTextCursor = (com.sun.star.text.XTextCursor)
xtextdocument.getText().createTextCursorByRange(
xTextRange);
// XDocumentInsertable makes it possible to import a document from a
// given URL into this document.
XDocumentInsertable xDocumentInsertable = (XDocumentInsertable)
UnoRuntime.queryInterface(
XDocumentInsertable.class,
xTextCursor);
xDocumentInsertable.insertDocumentFromURL(strFileUrl, insertArgs)
Hence It seems an issue in LibreOffice as it is not applying all attributes
of text in generated files.
--
You are receiving this mail because:
You are the assignee for the bug._______________________________________________
Libreoffice-bugs mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs