Description: The top-right cell of a table in a Writer document loses its borders when exporting to XHTML. Steps to Reproduce: 1. Create a table in writer (or open example ODT attachment) 2. Export to XHTML (File > Export as... > XHTML) 3. Open exported file in a web browser Actual Results: The top-right cell has no borders. Expected Results: The top-right cell has the same border as the rest of the table. Reproducible: Always User Profile Reset: No Additional Info: Version: 7.2.0.0.alpha1+ / LibreOffice Community Build ID: 4a9eef7849a75ba91806886ea9c96d114c8d56f9 CPU threads: 8; OS: Linux 4.15; UI render: default; VCL: gtk3 Locale: en-AU (en_AU.UTF-8); UI: en-US TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2021-05-22_06:45:25 Calc: threaded
Created attachment 172328 [details] example ODT file with table This bug can be tested with this ODT file: open and export as XHTML.
Created attachment 172329 [details] XHTML exported with LO 7.2 alpha1 Result of XHTML export. The top-right cell has all border widths set to "NaNcm": .Table1_B1 { border-top-width:NaNcm; border-top-style:; border-top-color:; border-left-width:NaNcm; border-left-style:; border-left-color:; border-bottom-width:NaNcm; border-bottom-style:; border-bottom-color:; border-right-width:NaNcm; border-right-style:; border-right-color:; padding:0.097cm; }
7.0.4 and 7.1.3 do not have this issue: border-width is set to "thin" in the the stylesheet. (Interestingly, in these versions, B1 is the only cell that has a general border-width wetting, whereas the three other cells have separate values for specific sides.) Marking as a regression. Wondering if it has anything to do with Bug 95662 (as it is about invalid values for widths in exported XHTML code).
Regression introduced by: https://git.libreoffice.org/core/+/9d3b39cf9fed9a305ac23d1ecaaafc8f7caaeeb0%5E%21/ commit 9d3b39cf9fed9a305ac23d1ecaaafc8f7caaeeb0 [log] author Svante Schubert <svante.schubert@gmail.com> Wed Aug 26 13:44:57 2020 +0200 committer Michael Stahl <michael.stahl@allotropia.de> Tue Mar 02 13:23:17 2021 +0100 tree 5a0242ed7b29b4359467b9de404a1a068741fcc8 parent 3b7f5202cc7f799a692e6dd09e71926336727c25 [diff] HTML XSLT: Missing paragraph BORDER of stand-alone border paragraph (@style:join-border problem) Bisected with: bibisect-linux64-7.2 Adding Cc: to Svante Schubert
After the mentioned commit, there is this problem: measure_conversion.xsl: Find no conversion for to 'cm'! measure_conversion.xsl: Find no conversion for to 'cm'! measure_conversion.xsl: Find no conversion for to 'cm'! measure_conversion.xsl: Find no conversion for to 'cm'! and the output looks like .Table1_B1 { border-top-width:NaNcm; border-top-style:; border-top-color:; border-left-width:NaNcm; border-left-style:; border-left-color:; border-bottom-width:NaNcm; border-bottom-style:; border-bottom-color:; border-right-width:NaNcm; border-right-style:; border-right-color:; padding:0.0382in; } while without the code, it looks like .Table1_B1 { padding:0.0382in; border-width:thin; border-style:solid; border-color:#000000; }
The issue is fixed if this change - <xsl:for-each select="*/@*[name() != 'style:font-size-rel']"> + <xsl:for-each select="*/@*[name() != 'style:font-size-rel'][name() != 'fo:border']"> is removed
Michael Stahl committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/452bf1359dab3cfab9fd6007d68592e9c96382b3 tdf#142483 filter: xhtml: fix substitution of fo:border attribute It will be available in 7.2.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Thank you for your work, Xisco and Michael! Confirmed as fixed with the test document in: Version: 7.2.0.0.alpha1+ / LibreOffice Community Build ID: 452bf1359dab3cfab9fd6007d68592e9c96382b3 CPU threads: 8; OS: Linux 4.15; UI render: default; VCL: gtk3 Locale: en-AU (en_AU.UTF-8); UI: en-US TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2021-06-04_18:12:48 Calc: threaded
Verified in Version: 7.2.0.0.alpha1+ / LibreOffice Community Build ID: ec629c5ee22d02f99d66a5cf975ce239876b7f4d CPU threads: 4; OS: Linux 5.7; UI render: default; VCL: gtk3 Locale: en-US (en_US.UTF-8); UI: en-US Calc: threaded @Michael Stahl, thanks for fixing this issue!!
Xisco Fauli committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/d161c4de0b145b975bc90ce4b0a1ff7c234b676e tdf#142483: sw_xhtmlexport: Add unittest It will be available in 7.2.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.