Bug 153562 - Pasting Selected Range to Sheet as BMP or PNG Image, It will be a Chart Image without content.
Summary: Pasting Selected Range to Sheet as BMP or PNG Image, It will be a Chart Image...
Status: RESOLVED DUPLICATE of bug 99969
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.4.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Chart Calc-Images
  Show dependency treegraph
 
Reported: 2023-02-12 06:12 UTC by nobu
Modified: 2024-03-03 01:23 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
sample file (39.20 KB, application/vnd.oasis.opendocument.spreadsheet)
2023-02-12 06:14 UTC, nobu
Details

Note You need to log in before you can comment on or make changes to this bug.
Description nobu 2023-02-12 06:12:20 UTC
Description:
Pasting Selected Range to Sheet as BMP Image, It will be a Chart Image without content.

Steps to Reproduce:
1. Open a new Calc.
2. Create a Chart.
3. Select the range including the chart.
4. Move the cursor somewhere.
5. Paste Image in BMP using PasteDropdownIcon.


Actual Results:
6. The image of the chart without content is pasted.

Expected Results:
6. The image should be the same as the copy source.


Reproducible: Always


User Profile Reset: No

Additional Info:
There is a similar Bug in PNG.

Not Reproduced with before Version 7.1.8.1 64bit, OS:Windows10 64bit
Not Reproduced with before Version 7.4.0.0 alpha1 64bit, OS:Windows10 64bit

Reproducible with Version 7.4.3.2 64bit, OS:Windows10 64bit
Reproducible with Version 7.5.0.3 64bit, OS:Windows10 64bit
Reproducible with Version 7.6.0.0 alpha0 64bit, OS:Windows10 64bit
Comment 1 nobu 2023-02-12 06:14:38 UTC
Created attachment 185329 [details]
sample file
Comment 2 nobu 2023-02-12 15:06:59 UTC
(In reply to nobu from comment #0)

> Steps to Reproduce:
> 3. Select the range including the chart.

3. Copy the range including the chart.
Comment 3 nobu 2023-02-12 22:06:18 UTC
(In reply to nobu from comment #0)

> Additional Info:
> Not Reproduced with before Version 7.4.0.0 alpha1 64bit, OS:Windows10 64bit

This was a mistake.
The following is the right.

Not Reproduced with before Version 7.4.0.0 alpha1 32bit, OS:Windows10 64bit
Comment 4 m_a_riosv 2023-02-13 01:03:48 UTC
What is the range that you select to copy?
Comment 5 m_a_riosv 2023-02-13 01:06:31 UTC
I can't reproduce with
Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 9788a565b3241d1bd62394b9e29c322361d05f80
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US Calc: CL threaded Jumbo
Version: 7.5.0.3 (X86_64) / LibreOffice Community
Build ID: c21113d003cd3efa8c53188764377a8272d9d6de
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US Calc: CL threaded
Comment 6 Ezinne 2023-02-13 07:37:34 UTC
Reproducible in:

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 4a0d671706306661c4a5072ce4769dc47bc65f71
CPU threads: 4; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded


Tested with the sample file using these steps:

1. Open the sample file
2. Select and Copy just the cells within the red rectangle that has the caption "Copy Range."
3. Move to another cell.
4. From the Paste Icon dropdown in the toolbar, Select to paste using the BMP option.
Comment 7 nobu 2023-02-13 07:59:43 UTC
Reproducible with Version 7.4.2.3 64bit, OS:Windows10 64bit

Reproducible with Version 7.4.1.2 64bit, OS:Windows10 64bit

Reproducible with Version 7.4.0.3 64bit, OS:Windows10 64bit
Comment 8 m_a_riosv 2023-02-13 13:00:07 UTC
I see, and reproduce now.

Seems it begun from 7.3.7.2 to 7.4.0.3
Comment 9 nobu 2023-02-13 22:35:23 UTC
Not Reproduced with before Version 7.4.0.0 alpha1 32bit, OS:Windows10 64bit

Version: 7.4.0.0.alpha1 (x86) / LibreOffice Community
Build ID: b871abad383583f02eb49c7e49aeae01f6941072
CPU threads: 4; OS: Windows 10.0 Build 10240; UI render: default; VCL: win
Locale: ja-JP (ja_JP); UI: ja-JP
Calc: threaded

Because the network condition is bad, I am investigating the files that have been downloaded in advance.

I can't investigate because I don't have an installation file
between
Version 7.4.0.0 alpha1 32bit
and
Version 7.4.0.3 64bit
.
Comment 10 raal 2023-02-14 22:38:01 UTC
This seems to have begun at the below commit.
Adding Cc: to Mike Kaganski; Could you possibly take a look at this one?
Thanks
 4be65808a5e58d208a09a982a1916d24fcdf648a is the first bad commit
commit 4be65808a5e58d208a09a982a1916d24fcdf648a
Author: Jenkins Build User <tdf@pollux.tdf>
Date:   Tue May 17 06:32:24 2022 +0200

    source 964e2eaae9d32df201574e6f083acc630fed2f1d

https://git.libreoffice.org/core/+/964e2eaae9d32df201574e6f083acc630fed2f1d
Comment 11 Mike Kaganski 2023-02-23 08:16:57 UTC
Yes, this is a problem.

Note that selecting also the source of the chart data on the spreadsheet would workaround the problem (but then it would paste also those extra selected cells).

I tried to find a way to copy the data source when copying to the clipboard; but that has the same problem of producing more content in the copied document than was needed. And probably, that would also need to handle the secondary references? (I didn't test the latter suspicion.)

Also I tried to change ScChart2DataSequence::ScChart2DataSequence to try to find the source document for clipboard document, and if found, use the data from there; but that breaks the normal paste. Also that fails when one closes the source document after copy, and only then pastes.

Eike: I'm sorry to ask, but maybe you have some advise here, or should the problematic commit better be reverted?
Comment 12 Eike Rathke 2023-02-23 12:38:00 UTC
I consider the usage scenario of bug 142635 (copy-paste chart with data range) more important than this decorated paste as image here, so reverting IMHO is not a solution. Specifically, if instead of a surrounding cell range only the chart was copied it would work as expected.

A solution might be to convert a copy of the chart to one with internal data table before converting to image. No idea what the limitations there are. But then again, why can't we "simply" have a snapshot of the view of the selected range..
Comment 13 Stéphane Guillou (stragu) 2023-03-26 09:19:09 UTC
Introduced by same commit as bug 153685, with different symptoms.
Reproduced in recent master build.

Note that the change in aspect ratio of the red border frame was pre-existing.
Comment 14 Mike Kaganski 2024-03-03 01:23:32 UTC

*** This bug has been marked as a duplicate of bug 99969 ***