Bug 155645 - Chart distortion when DOCX contains more than 20 charts, especially when exporting to PDF in headless mode
Summary: Chart distortion when DOCX contains more than 20 charts, especially when expo...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.5.0 release
Hardware: All All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:docx
Depends on:
Blocks: DOCX-OLE-Objects
  Show dependency treegraph
 
Reported: 2023-06-02 08:38 UTC by david
Modified: 2025-08-10 03:10 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
DOCX with 21 charts (277.93 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2023-06-02 08:40 UTC, david
Details
PDF export with 21 charts in Headless mode (25.11 KB, application/pdf)
2023-06-02 08:40 UTC, david
Details
DOCX with 20 charts (no issues) (277.93 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2023-06-02 08:41 UTC, david
Details
DOCX with 21 charts (291.17 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2023-06-02 08:44 UTC, david
Details
PDF export with 20 charts (no issues) (21.03 KB, application/pdf)
2023-06-02 08:45 UTC, david
Details

Note You need to log in before you can comment on or make changes to this bug.
Description david 2023-06-02 08:38:43 UTC
Description:
When a DOCX document contains more than 20 charts, the PDF export is not correct: some or all charts are distorted. 

The issue is not the same in all situation:

- It happens every time on all charts in headless mode on Linux (Ubuntu 22.04 LTS and Mac OSX, not tested on Windows) when the document is converted to a PDF.

- It happens sometimes with LibreOffice Writer UI when exporting the DOCX to a PDF.

- It happens sometimes in LibreOffice Writer UI without exporting. Editing the chart fix the chart temporarily.

The issue disappears if we increase the value of OLE_Objects in Advance settings of /org.openoffice.Office.Common/Cache/Writer. This value is 20 by default.

See attached files.

Steps to Reproduce:
1. Create a DOCX with MS Office, add 21 pie charts with default values
2. Open this DOCX file with LibreOffice Writer
3. Export to PDF

Actual Results:
Some or all charts are distorted

Expected Results:
Charts should keep the original aspect ratio


Reproducible: Sometimes


User Profile Reset: Yes

Additional Info:
Version: 7.5.4.1 (X86_64) / LibreOffice Community
Build ID: 3a6a10a8a824826630ea908dcaea93b45a6a0af1
CPU threads: 10; OS: Mac OS X 12.6.5; UI render: default; VCL: osx
Locale: fr-FR (fr_FR.UTF-8); UI: en-US
Calc: threaded
Comment 1 david 2023-06-02 08:40:12 UTC
Created attachment 187657 [details]
DOCX with 21 charts
Comment 2 david 2023-06-02 08:40:54 UTC
Created attachment 187658 [details]
PDF export with 21 charts in Headless mode
Comment 3 david 2023-06-02 08:41:58 UTC
Created attachment 187659 [details]
DOCX with 20 charts (no issues)
Comment 4 david 2023-06-02 08:44:30 UTC
Created attachment 187660 [details]
DOCX with 21 charts
Comment 5 david 2023-06-02 08:45:11 UTC
Created attachment 187661 [details]
PDF export with 20 charts (no issues)
Comment 6 Mike Kaganski 2023-06-02 08:59:34 UTC Comment hidden (noise)
Comment 7 Mike Kaganski 2023-06-02 09:00:04 UTC Comment hidden (noise)
Comment 8 david 2023-06-02 09:13:15 UTC
(In reply to Mike Kaganski from comment #7)
> Ah, I see you described it, sorry for the noise

Yes, I was very happy to find this workaround :) !
I think it is also a good hint to solve the problem for someone who knows this part of the LO code.
Comment 9 Eyal Rozenberg 2023-06-02 10:22:16 UTC
(In reply to david from comment #0)
> Description:
> When a DOCX document contains more than 20 charts, the PDF export is not
> correct: some or all charts are distorted. 

When I open your DOC with 21 charts, most charts (not on the first page) are distorted already, suggesting that if there's a problem at all, it's in the DOC import.

Also, if I open the 20-chart document and add an extra chart, then export - there's no issue with the resulting PDF.

So, either there's something wrong with the DOCX to begin with, or it's an import filter problem.

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 5cd9de202765e243e41416802f3e4486b8a96f16
CPU threads: 4; OS: Linux 6.1; UI render: default; VCL: gtk3
Locale: he-IL (en_IL); UI: en-US
Comment 10 Buovjaga 2023-08-10 10:11:31 UTC
Tested with

--convert-to pdf:writer_pdf_Export --outdir /path/to/dir /path/to/dir/21ChartIssue.docx

and it reliably makes all the charts in attachment 187660 [details] distorted.

Seen in bibisect-linux-50max and oldest of 43all.

Arch Linux 64-bit, X11
Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 2d0268f5ae6061bc96c00481c9ef3547be300b5a
CPU threads: 8; OS: Linux 6.4; UI render: default; VCL: kf5 (cairo+xcb)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded
Built on 10 August 2023
Comment 11 QA Administrators 2025-08-10 03:10:35 UTC
Dear david,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug