Bug 163907 - Pasting Selected Range to Sheet as BMP or PNG Image, Size is larger
Summary: Pasting Selected Range to Sheet as BMP or PNG Image, Size is larger
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
24.8.2.1 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Paste
  Show dependency treegraph
 
Reported: 2024-11-14 23:39 UTC by nobu
Modified: 2025-05-26 08:22 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description nobu 2024-11-14 23:39:58 UTC
Description:
Pasting Selected Range to Sheet as BMP or PNG Image, Size is larger.

Steps to Reproduce:
1. Open a new Calc.
2. Select Range [A1:C3] & Insert border line.
3. Select Range [A1:C3] & Copy.
4. Move the cursor somewhere.
5. Paste Image in PNG or BMP using Paste-Dropdown-Icon.

Actual Results:
6. An image larger than the original range will be pasted.

Expected Results:
6. An image of the same size as the original range will be pasted.


Reproducible: Always


User Profile Reset: No

Additional Info:

The problem of pasting large images has existed since before “Version: 24.2.7.2”, but now even larger images can be pasted.

Reproducible with
Version: 24.8.3.1 (X86_64) / LibreOffice Community
Build ID: 65412f067af443213e726c93f137ccc85c9a1e06
CPU threads: 2; OS: Windows 10 X86_64 (10.0 build 19045); UI render: Skia/Raster; VCL: win
Locale: ja-JP (ja_JP); UI: ja-JP
Calc: threaded

Reproducible with
Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 491d6ef7f297206b99ce01d4f2d00c75719ef243
CPU threads: 2; OS: Windows 10 X86_64 (10.0 build 19045); UI render: Skia/Raster; VCL: win
Locale: ja-JP (ja_JP); UI: ja-JP
Calc: threaded
Comment 1 m_a_riosv 2024-11-15 00:33:49 UTC
Testing a bit, it seems that the system options for screen zoom, affects how it is done.
At 100% zoom it copies the same size as with the system tool [Shift+Win+S].
I haven't tested it, but it's possible that having a different screen resolution than the default also influences the issue.
Comment 2 Samuel Carleial 2024-11-21 20:45:34 UTC
I could reproduce the problem in my system as well (MacOS)

== testing ==
Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 3287deb82ef0ee2048f733ae981961f527888727
CPU threads: 8; OS: macOS 13.7; UI render: Skia/Metal; VCL: osx
Locale: pt-BR (pt_BR.UTF-8); UI: en-US
Calc: threaded

Version: 24.8.2.1 (X86_64) / LibreOffice Community
Build ID: 0f794b6e29741098670a3b95d60478a65d05ef13
CPU threads: 8; OS: macOS 13.7; UI render: Skia/Metal; VCL: osx
Locale: pt-BR (pt_BR.UTF-8); UI: en-US
Calc: threaded
Comment 3 m_a_riosv 2024-11-21 22:06:00 UTC
Let's mark it as NEW for macOS.
Comment 4 BogdanB 2024-11-30 16:35:34 UTC
(In reply to m_a_riosv from comment #3)
> Let's mark it as NEW for macOS.

Why is just macOS, when was reported first by a Windows user?
Comment 5 m_a_riosv 2024-11-30 22:01:37 UTC
Change it then.
Comment 6 nobu 2025-05-26 04:11:49 UTC
Not reproducible with
Version: 24.2.7.2 (X86_64) / LibreOffice Community
Build ID: ee3885777aa7032db5a9b65deec9457448a91162
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Vulkan; VCL: win
Locale: en-US (ja_JP); UI: en-US
Calc: default

Reproducible with
[2025-05-23]
Version: 25.8.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: 3158b14e0b26875300a8098bc117a5e69b76f48f
CPU threads: 4; OS: Windows 10 X86_64 (build 19045); UI render: Skia/Raster; VCL: win
Locale: en-US (ja_JP); UI: en-US
Calc: CL threaded
Comment 7 Saburo 2025-05-26 08:22:14 UTC
This is inconsistent with comment 2,From here, it grows by one row and column.

Version: 24.8.3.0.0+ (X86_64) / LibreOffice Community
Build ID: 93f85da83c394b84d14f9d03aa2987ab5b26fca6

author	Noel Grandin
commit 93f85da83c394b84d14f9d03aa2987ab5b26fca6

tdf#139152 Exporting Image or Drawing to PNG is missing metada
implement this in a similar fashion to how export to JPEG does it. Add a
new method to calculate pixels-per-meter, because that is how PNG stores
the values internally

Change-Id: I1e4cd5a36af22e52a7c52f5b3bc2407f8523ef9f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175636

adding to CC:Noel Grandin