Bug 134053 - FILEOPEN PPTX: dotted line shows as solid
Summary: FILEOPEN PPTX: dotted line shows as solid
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
5.2 all versions
Hardware: All All
: medium normal
Assignee: Regina Henschel
URL:
Whiteboard: target:7.1.0 target:7.0.0.1 target:7.2.0
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-16 22:21 UTC by Gerald Pfeifer
Modified: 2021-05-06 09:24 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample slide (PPTX) (595.06 KB, application/vnd.ms-powerpoint)
2020-06-16 22:21 UTC, Gerald Pfeifer
Details
How it looks in LibreOffice (solid line) (7.44 KB, image/png)
2020-06-16 22:22 UTC, Gerald Pfeifer
Details
This is how it looks in Office 365 (8.73 KB, image/png)
2020-06-16 22:22 UTC, Gerald Pfeifer
Details
How it looks in LibreOffice 7.1 at 440% (10.87 KB, image/png)
2020-06-17 14:17 UTC, Xisco Faulí
Details
How it looks in LibreOffice 5.2 at 440% (12.82 KB, image/png)
2020-06-17 14:22 UTC, Xisco Faulí
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gerald Pfeifer 2020-06-16 22:21:36 UTC
Created attachment 162081 [details]
Sample slide (PPTX)

Observe how the vertical line in the center/at the top appears dotted in
Office 365 and solid in Impress (6.4.4.2 and 7.1.0.0.alpha0+).
Comment 1 Gerald Pfeifer 2020-06-16 22:22:09 UTC
Created attachment 162082 [details]
How it looks in LibreOffice (solid line)
Comment 2 Gerald Pfeifer 2020-06-16 22:22:30 UTC
Created attachment 162083 [details]
This is how it looks in Office 365
Comment 3 Xisco Faulí 2020-06-17 14:17:43 UTC
Created attachment 162119 [details]
How it looks in LibreOffice 7.1 at 440%
Comment 4 Xisco Faulí 2020-06-17 14:18:08 UTC
Reproduced in

Version: 7.1.0.0.alpha0+
Build ID: 27381dc1b76e4aee5459b3d85e6fc5919d2b8f98
CPU threads: 4; OS: Linux 4.19; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 5 Xisco Faulí 2020-06-17 14:22:23 UTC
Created attachment 162120 [details]
How it looks in LibreOffice 5.2 at 440%
Comment 6 Xisco Faulí 2020-06-17 14:22:58 UTC
In previous versions it looks different but don't think it's pefect either
Comment 7 Regina Henschel 2020-06-17 23:14:17 UTC
The reason of the problem is the cap style "round".

The dash style in PowerPoint is a prstDash "sysDot". This is defined to have one dash in 100% line width and one space in 100% line width. If the cap style is set to "round", then Ms Office takes the rounding from the dash. So in this case the square becomes a circle.

But in ODF the line cap is added to the dash and the place for that cap is taken from the space. So gives rounded dashes that touch each other in this case.

You can get nice rounded dots in LibreOffice with setting the dash length to 1% and the space length to 200%. Such dash style would be exported as custDash. But PowerPoint has no UI for such user defined dash styles. If the dash style is unchanged it will be exported as prstDash again and you get the same dash as before in PowerPoint.

Workaround: Always use cap style "flat" in PowerPoint and LibreOffice.

The export as custDash seems to have the error, that is does not write the % sign, which is needed in custDash.

Would it be acceptable to use a custDash, although PowerPoint has no UI for it?
Comment 8 Regina Henschel 2020-06-19 22:08:48 UTC
I will look, whether I can tweak dash lengths on import and export.
Comment 9 Regina Henschel 2020-06-20 15:09:12 UTC
Proposed patch is in https://gerrit.libreoffice.org/c/core/+/96769.

But I have currently no idea for a unit test. I would need to load a MS Office document with preset and custom dash style and examine how long the dashes are. First thoughts are to convert to metafile and break that up, or convert to Bézier curve and split that. But I don't know how to do that in a unit test.
Comment 10 Commit Notification 2020-06-22 08:43:39 UTC
Regina Henschel committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/3f3b50015e4fd9efc3459612a70409fca49cf390

tdf#134053 tweak dash and space length for ooxml

It will be available in 7.1.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.
Comment 11 Commit Notification 2020-06-23 14:59:31 UTC
Regina Henschel committed a patch related to this issue.
It has been pushed to "libreoffice-7-0":

https://git.libreoffice.org/core/commit/1cbdc101c72309a97e9ee09c77f4fd36fbd71314

tdf#134053 tweak dash and space length for ooxml

It will be available in 7.0.0.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.
Comment 12 Gerald Pfeifer 2020-06-25 22:52:17 UTC
(In reply to Regina Henschel from comment #7)
> Workaround: Always use cap style "flat" in PowerPoint and LibreOffice.
> 
> The export as custDash seems to have the error, that is does not write the %
> sign, which is needed in custDash.
> 
> Would it be acceptable to use a custDash, although PowerPoint has no UI for
> it?

Thank you, Regina! That is a significant improvement, and this being part
of a standard template (in my case) importing/exporting it properly is what
matters most, not the ability to then change the style in PowerPoint.
Comment 13 Commit Notification 2021-05-06 09:24:33 UTC
Luboš Luňák committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/32f2d2f7f99f73203294a91a9b432fd0c3fc7f99

a unittest for my cairocanvas fix for tdf#134053

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.