Description: When exporting a Calc document to PDF using the command-line option `--convert-to pdf`, any dashed or dotted lines are incorrectly rendered as solid lines in the resulting PDF. Line styles are not preserved. Steps to Reproduce: 1. Prepare a Calc (or Excel) file that contains cells with dashed or dotted lines. 2. Export it using: `soffice --headless --convert-to pdf filename.xlsx` 3. Open the generated PDF. Actual Results: Dashed and dotted lines are converted to solid lines. Expected Results: Dashed and dotted lines should retain their original line styles in the exported PDF. Reproducible: Always User Profile Reset: No Additional Info: The issue appears to originate from the graphic stroke reading logic. A minimal fix is shown below: ``` diff --git a/vcl/source/gdi/graphictools.cxx b/vcl/source/gdi/graphictools.cxx index c0aeed2b0290..52f5e915fd14 100644 --- a/vcl/source/gdi/graphictools.cxx +++ b/vcl/source/gdi/graphictools.cxx @@ -149,7 +149,7 @@ SvStream& ReadSvtGraphicStroke( SvStream& rIStm, SvtGraphicStroke& rClass ) sal_uInt32 nSize; rIStm.ReadUInt32( nSize ); rClass.maDashArray.resize(nSize); - for (double dash : rClass.maDashArray) + for (double& dash : rClass.maDashArray) rIStm.ReadDouble(dash); return rIStm; ```
Created attachment 204571 [details] Sample ODS file to reproduce the issue This file demonstrates the issue: dashed/dotted lines are exported as solid lines when using `--convert-to pdf`.
Created attachment 204583 [details] test low dashed pdf disappearance - win-10x64 - 25.8.3.2 vs 26.2.0.0-b1 can't test for this 'Dashed and dotted lines are converted to solid lines' but There is definitely a problem with the dashed lines when creating a PDF.
reproduce Version: 26.2.0.0.beta1 (AARCH64) Build ID: 1ff380402efe713308d6f0e5c815a6e3a1b3b67c CPU threads: 8; OS: macOS 13.1; UI render: Skia/Raster; VCL: osx Locale: ja-JP (ja_JP.UTF-8); UI: en-US Calc: threaded bibisected with mac64-26.2 commit 93d9464d91e4436ed1e51b1db400a3ea647a570e author Nam Bui tdf#145538 Use range based for loops Used ranged-based for loops on rClass.maDashArray in WriteSvtGraphicStroke() and ReadSvtGraphicStroke(). *** adding CC: Nam Bui please, take a look?
Some PDF readers may not display the lines. (In reply to shinbird from comment #0) > diff --git a/vcl/source/gdi/graphictools.cxx > b/vcl/source/gdi/graphictools.cxx > index c0aeed2b0290..52f5e915fd14 100644 > --- a/vcl/source/gdi/graphictools.cxx > +++ b/vcl/source/gdi/graphictools.cxx > @@ -149,7 +149,7 @@ SvStream& ReadSvtGraphicStroke( SvStream& rIStm, > SvtGraphicStroke& rClass ) > sal_uInt32 nSize; > rIStm.ReadUInt32( nSize ); > rClass.maDashArray.resize(nSize); > - for (double dash : rClass.maDashArray) > + for (double& dash : rClass.maDashArray) > rIStm.ReadDouble(dash); > > return rIStm; > ``` The above fix seems to be correct. Could you please submit a corresponding change to Gerrit? https://wiki.documentfoundation.org/Development/GetInvolved
@shinbird If you have difficulty sending the patch, would you like me to send it for you? Please reply.
I'm currently setting up my environment, but it may take a bit of time. I expect to be able to submit the patch within a few days. However, if this needs to be addressed sooner, I would appreciate it if you could submit it on my behalf.
https://gerrit.libreoffice.org/c/core/+/197373
Masayuki Iizuka committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/561c7438870685baf94cad28b220dcc6a15c6ac1 tdf#169933 Fix unwanted conversion of dashed and dotted lines It will be available in 26.8.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.
Masayuki Iizuka committed a patch related to this issue. It has been pushed to "libreoffice-26-2": https://git.libreoffice.org/core/commit/3d0a8eb2580e52906ed1a72a0bbaecbb6df18976 tdf#169933 Fix unwanted conversion of dashed and dotted lines It will be available in 26.2.1. 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.
Masayuki Iizuka committed a patch related to this issue. It has been pushed to "libreoffice-26-2-0": https://git.libreoffice.org/core/commit/602cb51fd96689daa095f6f7928b28327fcb9ebb tdf#169933 Fix unwanted conversion of dashed and dotted lines It will be available in 26.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.