Bug 160440 - Paste as bitmap (PNG, BMP) of a chart is incorrect when source is filtered
Summary: Paste as bitmap (PNG, BMP) of a chart is incorrect when source is filtered
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Chart (show other bugs)
Version:
(earliest affected)
4.4.0.3 release
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: implementationError
Depends on:
Blocks: Chart Paste-Special Data-Filter
  Show dependency treegraph
 
Reported: 2024-03-31 07:07 UTC by jollytall
Modified: 2024-04-25 03:53 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Example for incorrect copy/paste (16.67 KB, application/vnd.oasis.opendocument.spreadsheet)
2024-03-31 07:07 UTC, jollytall
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jollytall 2024-03-31 07:07:58 UTC
Created attachment 193413 [details]
Example for incorrect copy/paste

Please see the attached spreadsheet. Just do a filter (e.g. to TRUE only) and then select the chart and anywhere (on the same sheet or LO Writer) paste it as a bitmap image. You can also paste it in a bitmap handling software like gnome-paint.
The problem is that the bitmap renders a chart that includes the filtered out datapoints as well.

Doing more research, I found that:
When the file is saved with the filter on and then the file is loaded (and I guess the chart is rendered freshly with only the filtered data) then the filtered chart is copied/pasted properly. If then I touch the filter (e.g. select all, but also if I just remove the current and add the other value, e.g. unmark TRUE and mark FALSE), then the chart as an object will always be correct, but the copied/pasted image will always be with the unfiltered dataset.

As a side question: Within LO Calc I can choose a paste special as a PNG object (btw. with the same problems as a BMP). However in LO Writer I can only paste it as a BMP, not as a PNG. Why is that?

P.S.  I use this approach, so not the whole object is copied to a text document, but only the image.
Comment 1 Stéphane Guillou (stragu) 2024-04-25 03:53:00 UTC
Thanks for the report. I reproduce in:

Version: 7.6.6.3 (X86_64) / LibreOffice Community
Build ID: d97b2716a9a4a2ce1391dee1765565ea469b0ae7
CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: CL threaded

As well as a recent trunk build:

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 695e8742da850bbb15c2e6d2b5d4c99a0daf4925
CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: gtk3

Already the case in 4.4.0.3, when PNG and BMP paste were made available, so assuming it is an implementation error.

Also an issue on Win11.