Bug 100060 - Formatting loss in replacing bookmark in DOC and DOCX file using XDocumentInsertable.insertDocumentFromURL method
Summary: Formatting loss in replacing bookmark in DOC and DOCX file using XDocumentIns...
Status: RESOLVED DUPLICATE of bug 100132
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.0.4.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-26 06:53 UTC by jvchbabu
Modified: 2016-09-26 10:28 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Source HTML file and generated DOC & DOCX files (15.27 KB, application/zip)
2016-05-26 06:53 UTC, jvchbabu
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jvchbabu 2016-05-26 06:53:18 UTC
Created attachment 125289 [details]
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.
Comment 1 jvchbabu 2016-05-26 06:55:04 UTC Comment hidden (no-value)
Comment 2 Buovjaga 2016-05-26 13:11:08 UTC
(In reply to jvchbabu from comment #1)
> Please let me know if you need more details, we can provide them. Please
> confirm whether this  an existing issue or is it fixed in latest version.

Please use a daily build to confirm: http://dev-builds.libreoffice.org/daily/master/?C=M;O=A
Comment 3 jvchbabu 2016-09-20 09:47:39 UTC Comment hidden (no-value)
Comment 4 Cor Nouws 2016-09-26 10:28:53 UTC

*** This bug has been marked as a duplicate of bug 100132 ***