Description: In Draw, when trying to break or convert an SVG imported image, dashed lines become solid lines. This issue was introduced in LibreOffice 7.1 and is still there in LibreOffice 7.5. Steps to Reproduce: 1. In Draw (7.1.x or later), open the attached file test.svg (or use Insert / Image) 2. Select the imported (or inserted) image and right click on it, then select one of the following menu items: Break, Convert / To Curve, To Polygon, To Contour Actual Results: The dashed lines become solid lines. Expected Results: The dashed lines should not change to solid lines. Reproducible: Always User Profile Reset: Yes Additional Info: I tested with LibreOffice 7.0.6.2 and the issue is not there. So the bug was introduced somewhere in the 7.1.x versions. The issue is present in LibreOffice 7.5.3.2. The issue affects TexMaths users that create tikz / pstricks drawings. LibreOffice version: Version: 7.1.8.1 / LibreOffice Community Build ID: e1f30c802c3269a1d052614453f260e49458c82c CPU threads: 48; OS: Linux 5.19; UI render: default; VCL: gtk3 Locale: fr-FR (fr_FR.UTF-8); UI: en-US Calc: CL System: Ubuntu 22.04.2 LTS, 64 bits
Created attachment 187163 [details] SVG image with dashed lines
Confirmed with in recent master: Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: b10417eb1e5a4a6959e7fc1cdd9819e5b09d39a4 CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3 Locale: en-AU (en_AU.UTF-8); UI: en-US Calc: threaded Original SVG shows 4 dashed segments, as shown in Firefox, GNOME Image Viewer and Inkscape. Inkscape shows a custom dashed line styles using 7.5002 / 7.5002 pattern. LO's imported SVG looks correct, until using Break, which converts to solid lines. Bibisected with linux-64-7.1 repo to first bad commit a8c7987e61bdb4f12f3a84f5df92c1315525f6f7 which points to core commit b71d9a6d15cfb8a50afdea5ac064f40d84c561f8 which is a cherrypick of: commit b71d9a6d15cfb8a50afdea5ac064f40d84c561f8 author Luboš Luňák <l.lunak@collabora.com> Tue Apr 27 11:44:48 2021 +0200 committer Luboš Luňák <l.lunak@collabora.com> Thu Apr 29 16:05:53 2021 +0200 do not apply line dashing in drawinglayer (tdf#136957) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114710 Miklos, do you know by any chance someone who might be able to look at this?
I did some investigations with the faulty patch. For that, I added a more interesting example document for Impress, that is impress-test.odp. In that document, I simply inserted the SVG image lines.svg (produced using Inkscape) that contains a line with a solid part and a dash part. Looking at the patch https://git.libreoffice.org/core/commit/b71d9a6d15cfb8a50afdea5ac064f40d84c561f8, I found the following: 1. In Impress, opening impress-test.odp and breaking the line makes the dashed part solid. Looking at the patch (the vclmetafileprocessor2d.c part), we see that the graphic object is analyzed in processPolygonStrokePrimitive2D() and the LineInfo structure is set up with dash properties. A comment in the patch says for the LineInfo structure that "// This will be used by setupStrokeAttributes() in cppcanvas." But setupStrokeAttributes() in implrenderer.cxx is not called. So the line dashing is not done. 2. In Impress, opening impress-test.odp and doing Slideshow / Start From First Slide makes the dashed part of the line correctly appearing as dashed. This was indeed the purpose of the patch to fix the issue with wrong line dashing in slideshow mode (see bug #136957). In that case, I found that processPolygonStrokePrimitive2D() is also called and the LineInfo structure is set with dash properties. But now, setupStrokeAttributes() in implrenderer.cxx is called, and the line dashing is correctly done. So, to sum up: - when breaking / converting a dashed line (from an SVG imported image) setupStrokeAttributes() is not called and dashed lines are rendered as solid - when showing the SVG imported image in a slideshow setupStrokeAttributes() is called and dashed lines are correctly rendered I don't have the skills to fix the bug myself, but perhaps these findings could help some developer to fix it?
Created attachment 187264 [details] New example document for Impress
Created attachment 187265 [details] SVG simple image
Perhaps the author of the patch could solve this bug? Could someone contact him? This bug has an impact on the TexMaths extension (LaTeX equations in LibreOffice). Thanks!
Increasing the priority as it's a regression that affects a long-standing, currently maintained extension. Xisco, with Roland's pointers, do you know who might be able to help? Or are you interested yourself?
Export to SVG also affected, which can be tested with attachment 184620 [details].
*** Bug 146527 has been marked as a duplicate of this bug. ***
Dotted line export affected too, see duplicate bug 146527. (Marked older one as dupe because there's more info here.)
*** Bug 148179 has been marked as a duplicate of this bug. ***
(In reply to Stéphane Guillou (stragu) from comment #2) > Miklos, do you know by any chance someone who might be able to look at this? Sorry, I didn't notice this question earlier. I'll ask around.
*** Bug 157821 has been marked as a duplicate of this bug. ***
(In reply to Stéphane Guillou (stragu) from comment #2) > Bibisected with linux-64-7.1 repo to first bad commit > a8c7987e61bdb4f12f3a84f5df92c1315525f6f7 which points to core commit > b71d9a6d15cfb8a50afdea5ac064f40d84c561f8 which is a cherrypick of [...] The 7.1 commit is actually 57595773df9f89245457443a3def786fa0e70a69. Bug 156160 has the same cause.
*** Bug 156160 has been marked as a duplicate of this bug. ***