Bug 92222 - FILESAVE: Shapes with Default Line Width Changed on Roundtrip (MSO 2007 theme defaults not preserved)
Summary: FILESAVE: Shapes with Default Line Width Changed on Roundtrip (MSO 2007 theme...
Status: REOPENED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
5.0.0.0.beta1
Hardware: Other All
: medium normal
Assignee: Tibor Nagy
URL:
Whiteboard: target:7.5.0 target:7.4.4
Keywords: filter:pptx
: 151952 (view as bug list)
Depends on:
Blocks: PPTX OOXML-Doc-Themes PPTX-Shapes
  Show dependency treegraph
 
Reported: 2015-06-21 08:03 UTC by Luke
Modified: 2023-07-19 10:54 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
Triangle created in MSO 2007 correctly imported with 2pt line width (32.45 KB, application/vnd.openxmlformats-officedocument.presentationml.presentation)
2018-02-09 20:16 UTC, Luke
Details
Triangle created in MSO 2016 correctly imported with 1 pt line width (29.25 KB, application/vnd.openxmlformats-officedocument.presentationml.presentation)
2018-02-09 20:17 UTC, Luke
Details
We have retested this problem and it seems to be fixed in version 6.1.2. (174.19 KB, image/png)
2018-11-26 09:44 UTC, NISZ LibreOffice Team
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Luke 2015-06-21 08:03:53 UTC
Steps to reproduce:
1. Draw a shape in PowerPoint
2. Save ( ex: attachment 116696 [details] )
3. Open in Impress
4. Save ( ex:  attachment 116697 [details])
5. Close and reopen in Impress

Note the round-tripped file has a thicker line width

This maybe to related to the fact the file is corrupted, Bug 92221
Comment 1 Buovjaga 2015-06-21 16:17:33 UTC
Yep, 0,07 cm instead of 0,04 cm.

Win 7 Pro 64-bit Version: 5.1.0.0.alpha1+
Build ID: 3ecef8cedb215e49237a11607197edc91639bfcd
TinderBox: Win-x86@62-merge-TDF, Branch:MASTER, Time: 2015-06-19_23:16:58
Locale: fi-FI (fi_FI)
Comment 2 Luke 2015-06-21 18:01:27 UTC Comment hidden (obsolete)
Comment 3 QA Administrators 2017-01-03 19:41:58 UTC Comment hidden (obsolete)
Comment 4 Luke 2017-01-04 01:38:44 UTC
.01" -> .03"

Version: 5.4.0.0.alpha0+ (x64)
Build ID: bf80bbb7b75febc2769d6b64e6981224982f8fe2
Comment 5 Luke 2018-02-09 20:16:04 UTC
Created attachment 139744 [details]
Triangle created in MSO 2007 correctly imported with 2pt line width

In the .pptx file, by changing \ppt\theme\theme1.xml

FROM:

<a:ln algn="ctr" cmpd="sng" cap="flat" w="9525">
<a:ln algn="ctr" cmpd="sng" cap="flat" w="25400">
<a:ln algn="ctr" cmpd="sng" cap="flat" w="38100">

TO:
<a:ln algn="ctr" cmpd="sng" cap="flat" w="6350">
<a:ln algn="ctr" cmpd="sng" cap="flat" w="12700">
<a:ln algn="ctr" cmpd="sng" cap="flat" w="19050">

I was able to fix this issue. 


The TO: are the defaults MS Office 2013, and 2016 uses. MS Office 2007 uses the old FROM: defaults. Our pptx importer correctly reads and uses these values, but they are lost on export.
Comment 6 Luke 2018-02-09 20:17:45 UTC
Created attachment 139745 [details]
Triangle created in MSO 2016 correctly imported with 1 pt line width

Here is a 2016 file to compare the theme1.xml
Comment 7 Luke 2018-02-09 20:19:07 UTC Comment hidden (obsolete)
Comment 8 Luke 2018-02-09 20:31:29 UTC Comment hidden (obsolete)
Comment 9 Luke 2018-10-22 20:19:25 UTC
On roundtrip, shapes with the default, 1 pt., line width are still being changed to 2 pt. in
Version: 6.2.0.0.alpha0+ (x64)
Build ID: 5e8cd8683d345b75297994b3f7aab851835eb124

If a manual width is specified, line widths are correctly preserved on roundtrip.
Comment 10 NISZ LibreOffice Team 2018-11-26 09:44:05 UTC Comment hidden (obsolete)
Comment 11 Buovjaga 2018-11-26 09:50:53 UTC Comment hidden (obsolete)
Comment 12 Luke 2019-07-15 14:17:05 UTC
This looks very similar to Bug 92223 which was fixed by remembering the schemes in the theme. 

https://cgit.freedesktop.org/libreoffice/core/commit/?id=c344d74a6961
Comment 13 QA Administrators 2022-09-02 03:39:05 UTC Comment hidden (obsolete)
Comment 14 Stéphane Guillou (stragu) 2022-11-08 11:48:16 UTC
*** Bug 151952 has been marked as a duplicate of this bug. ***
Comment 15 Commit Notification 2022-11-23 09:52:09 UTC
Tibor Nagy committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/25e9766e9b87342b6f1b29dc146d5f33e12157a7

tdf#92222 PPTX export: fix line width of the shape in theme

It will be available in 7.5.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 16 NISZ LibreOffice Team 2022-11-24 09:01:30 UTC
Verified in:
Version: 7.5.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 651658d37bcb3f493942dd5d0b9a0d65c96f105c
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Vulkan; VCL: win
Locale: hu-HU (hu_HU); UI: en-US
Calc: CL threaded
Comment 17 Commit Notification 2022-11-25 11:28:31 UTC
Tibor Nagy committed a patch related to this issue.
It has been pushed to "libreoffice-7-4":

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

tdf#92222 PPTX export: fix line width of the shape in theme

It will be available in 7.4.4.

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 18 Luke 2023-02-06 02:42:50 UTC
@Tibor Nagy
The fix for this breaks files that were created with older versions of MSO. All you've done is change the default from the old standard to the new one? Lines on older MSO files like attachment 139744 [details] are now converted from 2 pts to 1 on roundtrip? 

Did you consider a more general solution?
Comment 19 Luke 2023-02-16 01:34:07 UTC
@Tibor

Did you take a look at
https://cgit.freedesktop.org/libreoffice/core/commit/?id=c344d74a6961

It's the same issue of different color defaults instead of thickness, but solves it by remembering the color scheme from loaded OOXML file.