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 a table content from HTML file. The table has boarders, right aligned and has background colors to the rows.. 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 shows different output.We observed boarder and background color and alignment loss. Doc output(.doc) : ------------ Boarders are completely invisible, table is left aligned and background colors are lost . Docx output: Boarders are completely visible but table is left aligned and background colors are lost Please find project.zip for sample program source html and generated output. Let us know if you need more information.
I attached my source project as eclipse project and attached all source content files, template and sample output files. Please follow the below steps: 1) Extract zip file content. 2) Import Libre as java project. 3) Run DocumentGenerator.java by passing full path of template, full path of output file and full path of source html file. Sample arguments: "D:\libre\template.doc" "D:\libre\output1.doc" "D:\libre\source_html.html" 4) template and source html files are part of zip file content. Please let me know if you have need any more information.
Created attachment 126668 [details] Source project and source and output files
(In reply to jvchbabu from comment #0) > We use LibreOffice 5.0.4.2 to create .docx and .doc documents using UNO > Java API. > > Doc output(.doc) : > ------------ > Boarders are completely invisible, table is left aligned and background > colors are lost . > The table alignment set to the left was already in bug 32991
Cloud please look into this bug and provide update. Please let me know if need more information or help in reproducing the issue.
How could you be sure that the problem is on the LibreOffice side and not in your Java code? If the problem is on the LO side, you do not need your Java code to reproduce it. Best regards. JBF
We used the JAVA API provided, then gave you sample program to reproduce the issue. I am not blaming anybody, I just gave data and sample program to reproduce the issue. Could you please let me know if you need more information.
I can safely replicate this bug using Word 2003 to create a .doc file and Word 2016 to create a .docx file where each contain a table that is 1 cell wide and 2 cells deep, where the first cell has a background colour. When opening these files with LibreOffice Writer 5.3.0.3 and exporting as HTML, the background colour is added as a separate style attribute in the <td> so it appears as, for example: <td width="585" valign="top" bgcolor="#d0cece" style="background: #d0cece" style="border: 1px solid #00000a; padding-top: 0cm; padding-bottom: 0cm; padding-left: 0.2cm; padding-right: 0.19cm"> The first style attribute is parsed by browsers, showing the background colour, and the second style attribute, containing the border colour and padding, is ignored. I have attached the files produced by both versions of Word and the HTML output by LibreOffice. When exporting a .odt created using LibreOffice Writer 5.3.0.3 and recreating the above table, the styles appear all in the same style attribute.
Created attachment 131949 [details] doc and docx files created with Word and the exported HTML from LibreOffice
(In reply to Logan B from comment #7) > I can safely replicate this bug using Word 2003 to create a .doc file and > Word 2016 to create a .docx file where each contain a table that is 1 cell > wide and 2 cells deep, where the first cell has a background colour. > > When opening these files with LibreOffice Writer 5.3.0.3 and exporting as > HTML, the background colour is added as a separate style attribute in the > <td> so it appears as, for example: > <td width="585" valign="top" bgcolor="#d0cece" style="background: #d0cece" > style="border: 1px solid #00000a; padding-top: 0cm; padding-bottom: 0cm; > padding-left: 0.2cm; padding-right: 0.19cm"> > The first style attribute is parsed by browsers, showing the background > colour, and the second style attribute, containing the border colour and > padding, is ignored. > > I have attached the files produced by both versions of Word and the HTML > output by LibreOffice. > > When exporting a .odt created using LibreOffice Writer 5.3.0.3 and > recreating the above table, the styles appear all in the same style > attribute. Logan B, In my case I have html content which has table and its background color and boarders. We are trying to generate word(doc and docx files)using this html and observed the below : Doc output(.doc) : ------------ Boarders are completely invisible, table is left aligned and background colors are lost . Docx output: Boarders are completely visible but table is left aligned and background colors are lost. You seems to be tried in reverse of my use case, creating a doc and docx and generating HTML out of it. Please let me know if my understanding is incorrect and we are ready to extend any help in this regard.
** Please read this message in its entirety before responding ** To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year. There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present. If you have time, please do the following: Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/ If the bug is present, please leave a comment that includes the information from Help - About LibreOffice. If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice. Please DO NOT Update the version field Reply via email (please reply directly on the bug tracker) Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case) If you want to do more to help you can test to see if your issue is a REGRESSION. To do so: 1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from http://downloadarchive.documentfoundation.org/libreoffice/old/ 2. Test your bug 3. Leave a comment with your results. 4a. If the bug was present with 3.3 - set version to 'inherited from OOo'; 4b. If the bug was not present in 3.3 - add 'regression' to keyword Feel free to come ask questions or to say hello in our QA chat: https://kiwiirc.com/nextclient/irc.freenode.net/#libreoffice-qa Thank you for helping us make LibreOffice even better for everyone! Warm Regards, QA Team MassPing-UntouchedBug
Dear jvchbabu, To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year. There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present. If you have time, please do the following: Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/ If the bug is present, please leave a comment that includes the information from Help - About LibreOffice. If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice. Please DO NOT Update the version field Reply via email (please reply directly on the bug tracker) Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case) If you want to do more to help you can test to see if your issue is a REGRESSION. To do so: 1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/ 2. Test your bug 3. Leave a comment with your results. 4a. If the bug was present with 3.3 - set version to 'inherited from OOo'; 4b. If the bug was not present in 3.3 - add 'regression' to keyword Feel free to come ask questions or to say hello in our QA chat: https://kiwiirc.com/nextclient/irc.freenode.net/#libreoffice-qa Thank you for helping us make LibreOffice even better for everyone! Warm Regards, QA Team MassPing-UntouchedBug
Dear jvchbabu, To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year. There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present. If you have time, please do the following: Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/ If the bug is present, please leave a comment that includes the information from Help - About LibreOffice. If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice. Please DO NOT Update the version field Reply via email (please reply directly on the bug tracker) Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case) If you want to do more to help you can test to see if your issue is a REGRESSION. To do so: 1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/ 2. Test your bug 3. Leave a comment with your results. 4a. If the bug was present with 3.3 - set version to 'inherited from OOo'; 4b. If the bug was not present in 3.3 - add 'regression' to keyword Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa Thank you for helping us make LibreOffice even better for everyone! Warm Regards, QA Team MassPing-UntouchedBug
Noting that Logan's issue described in comment 7 is resolved (testing with a recent master build). Regarding jvchbabu's original issue, testing importing the source_html with the GUI, which shows true to source, and saving in a different format: - I can reproduce loss of background in DOCX and loss of both background and border in DOC in 5.4.0.3 - I can't reproduce anymore those issues in a recent master build: Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: d88779fc86385dde1215fd28b78a69eacc6b4f97 CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3 Locale: en-AU (en_AU.UTF-8); UI: en-US Calc: threaded Closing as "works for me".