Bug 105066 - Paste special by select bitmap on same cell will become to one blank image frame on sheet.
Summary: Paste special by select bitmap on same cell will become to one blank image f...
Status: RESOLVED DUPLICATE of bug 107529
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.4.2.2 release
Hardware: x86-64 (AMD64) All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2017-01-03 15:29 UTC by odinatlas
Modified: 2024-05-16 14:00 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Bug_Test (64.40 KB, application/vnd.oasis.opendocument.spreadsheet)
2017-01-03 15:42 UTC, odinatlas
Details
Bug_Test_Result (576.46 KB, image/gif)
2017-01-03 15:42 UTC, odinatlas
Details

Note You need to log in before you can comment on or make changes to this bug.
Description odinatlas 2017-01-03 15:29:13 UTC
Description:
Image disappear

Steps to Reproduce:
1.There were tow image on same sheet
2.copy image 1 and paste special by select  bitmap to cell A1
3.then copy image 2 , move to cell A1 by keyboard arrow key
4.paste special by select  bitmap to cell A1, too.
5.two iamge will become to one blank image frame.

Actual Results:  
Image disappear, and become to one blank image frame.

Expected Results:
image 1 shoule be insteaded.


Reproducible: Always

User Profile Reset: No

Additional Info:


User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0
Comment 1 odinatlas 2017-01-03 15:42:13 UTC
Created attachment 130110 [details]
Bug_Test
Comment 2 odinatlas 2017-01-03 15:42:52 UTC
Created attachment 130111 [details]
Bug_Test_Result
Comment 3 Telesto 2017-01-03 22:14:38 UTC
Repro with:
Version: 5.4.0.0.alpha0+
Build ID: 215cbfb460326010737433c2020638e9388a88a4
CPU Threads: 4; OS Version: Windows 6.19; UI Render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2017-01-02_23:58:32
Locale: nl-NL (nl_NL); Calc: CL

and with
Versie: 4.4.6.3 
Build ID: e8938fd3328e95dcf59dd64e7facd2c7d67c704d
Locale: nl_NL
Comment 4 QA Administrators 2018-07-16 02:42:26 UTC Comment hidden (obsolete)
Comment 5 christos 2020-06-16 20:47:09 UTC
Version: 6.4.4.2 (x64)
Build ID: 3d775be2011f3886db32dfd395a6a6d1ca2630ff
CPU threads: 4; OS: Windows 10.0 Build 18363; UI render: default; VCL: win; 
Locale: en-US (en_US); UI-Language: en-US
Calc: threaded
Comment 6 Fiable.biz 2020-07-16 04:21:46 UTC
Why has this bug been marked "worksforme" with no explanation? I can reproduce it with LO on Fedora 32 workstation, 64 bits. It's not the expected behaviour.
Comment 7 Fiable.biz 2020-07-16 04:28:45 UTC
I've just forgotten my LO version: 6.4.4.2
Comment 8 Fiable.biz 2020-07-16 04:31:20 UTC
*** Bug 134042 has been marked as a duplicate of this bug. ***
Comment 9 zzz 2020-07-16 12:24:20 UTC
To developers: Bug 134042 report also contains a test file which I have uploaded, to help debugging.

Additional observations about the max distance (X) between the existing image (A) and the position of dropped image (B) which causes this bug:
(1)In some files, this bug happens even when B is dropped upto around 2 cells apart from image A.
(2)This distance X sometimes depends on Calc's zoom ratio (the slider in the StatusBar). If the symptom happens at 100% zoom, the X may be broader at 80% zoom. But no direct relation found between zoom ratio and distance.
(3)Symptom differs among each image. Multiple images created by the same tool (Windows print-key, Firefox screenshot, IrfanView crop) may behave differently. I could not find what property of the images do makes such differences.
(4)Symptom is reproducible throughout the same session, but once the file is closed and reopened, the symptom often vanish, or happen only at other places. Difficult to create a reproducible file.

My environment:
  LibreOffice Calc Version: 6.4.4.2 (x64)
  Windows 10 Pro 64bit, intel CPU, Japanese mode, 2 displays

Hope this helps.
Comment 10 QA Administrators 2022-07-17 03:29:58 UTC Comment hidden (obsolete)
Comment 11 zzz 2022-07-21 06:13:24 UTC
I am not odinatlas but will report that the problem is still alive and harmful at is was.

Retest environment:
Version: 7.3.2.2 (x64) / LibreOffice Community
Build ID: 49f2b1bff42cfccbd8f788c8dc32c1c309559be0
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: ja-JP (ja_JP); UI: en-US
Calc: CL

Retest result:
Problem still reproduces 100% (tested 2 times each) for both procedures and test data:
  Bug 105066 odinatlas 2017-01-03 15:29:13 UTC 
  Bug 134042 zzz 2020-06-16 13:47:26 UTC

The procedure description step 3 and 4 in Bug 105066 odinatlas 2017-01-03 15:29:13 UTC is insufficient to follow, so I'll amend it:
1. Open attached Bug_Test.ods. There are two images on the same sheet.
2. Copy image 1 and paste special by select bitmap to cell A1
3-1. Then copy image 2
3-2. Click any cell that have no object over it, to switch LibreCalc's mode to cell-keyboard-navigation-mode.
3-3. Using the keyboard arrow key, move the cell focus to the top-left cell A1, which holds image 1.
4-1. Press the Context menu key.
4-2. Paste image2 by Context menu|Paste Special|Paste Special...|Bitmap Image (BMP)
5. The two images on A1 becomes one blank image frame.

I found that the behaviour depends on the source application software of the second paste ("image2", hereafter). Here, "source" means the source of the image in clipboard.
As a source, LibreCalc is a special case where the problem happens only under limited conditions. For all other apps, the condition is broader.

First, a definition of paste procedure codes used later:
(a1) Ctrl+V method:
  1. Copy image1 from the source software.
  2. Switch to LibreCalc.
  3. Click a cell you want to paste the image to, say, A1.
  4. Paste image1 by Ctrl+V.
  5. Immediately paste it again by Ctrl+V.
(b1) Mouse Context menu Paste method:
  1. Paste image1 by Ctrl+V.
  2. Switch to the source software. Select all and Copy image2 from the source software.
  3. Switch to LibreCalc.
  4. Click any cell that have no object over it, to switch LibreCalc's mode to cell-keyboard-navigation-mode.
  5. Using the keyboard arrow key, move the cell focus to the top-left cell that holds image1.
  6. Right-click on the pasted image1, to open the context menu.
     * Note that BOTH the cell-cursor and the mouse-cursor-at-click must be on image1.
  7. Paste image2 by Context menu|"Paste".
     * No "Paste Special" appears in the context menu for this case.
(b2) Keyboard Context menu Paste method:
  1. Paste image1 by Ctrl+V.
  2. Switch to the source software. Select all and Copy image2 from the source software.
  3. Switch to LibreCalc.
  4. Click any cell that have no object over it, to switch LibreCalc's mode to cell-keyboard-navigation-mode.
  5. Using the keyboard arrow key, move the cell focus to the top-left cell that holds image1.
  6. Press the context menu key, to open the context menu.
  7. Paste image2 by Context menu|"Paste".
(c1) Keyboard Context menu Paste Special method:
  1. Paste image1 by Ctrl+V.
  2. Switch to the source software. Select all and Copy image2 from the source software.
  3. Switch to LibreCalc.
  4. Click any cell that have no object over it, to switch LibreCalc's mode to cell-keyboard-navigation-mode.
  5. Using the keyboard arrow key, move the cell focus to the top-left cell that holds image1.
  6. Press the context menu key, to open the context menu.
  7. Paste image2 by Context menu|Paste Special...|Bitmap Image (BMP)
(c2) Menubar Paste Special method:
  1. Paste image1 by Ctrl+V.
  2. Switch to the source software. Select all and Copy image2 from the source software.
  3. Switch to LibreCalc.
  4. Click any cell that have no object over it, to switch LibreCalc's mode to cell navigation mode.
  5. Using the keyboard arrow key, move the cell focus to the top-left cell that holds image1.
  6. Click the Menubar.
  7. Paste image2 by Menubar Edit|Paste Special|Paste Special...|Bitmap Image (BMP)

Experiment results:

- Source LibreCalc 7.3.2.2:
  (a1) Pastes correctly (two image objects overlayed)
  (b1) Pastes correctly (two image objects overlayed)
  (b2) Pastes correctly (two image objects overlayed)
  (c1) Problem reproduces
  (c2) Problem reproduces

- Source IrfanView 4.58 32 bit:
  (a1) Problem reproduces
  (b1) Problem reproduces
  (b2) Problem reproduces
  (c1) Problem reproduces
  (c2) Problem reproduces

- Source Microsoft Paint bundled with Windows 10 21H2:
  (a1) Problem reproduces
  (b1) Problem reproduces
  (b2) Problem reproduces
  (c1) Problem reproduces
  (c2) Problem reproduces
  * In Microsoft Paint, don't forget to "select all" before copying.

- Source GIMP 2.10.28:
  (a1) Problem reproduces
  (b1) Problem reproduces
  (b2) Problem reproduces
  (c1) Problem reproduces
  (c2) Problem reproduces
  * Sidenote: the size of image1 pasted from GIMP is slightly larger than the original image1 in Bug_Test.ods

- Source LibreDraw 7.3.2.2:
  (a1) Pastes correctly (two image objects overlayed)
  (b1) Pastes correctly (two image objects overlayed)
  (b2) Pastes correctly (two image objects overlayed)
  (c1) Problem reproduces
  (c2) Problem reproduces

- Source Google Chrome 103.0.5060.134 (Official Build) (64 bit)
  https://www.libreoffice.org/themes/libreofficenew/img/logo.png in https://www.libreoffice.org/
  (a1) Problem reproduces
  (b1) Problem reproduces
  (b2) Problem reproduces
  (c1) Problem reproduces
  (c2) Problem reproduces

- Source Firefox 98.0.2 (64-bit):
  https://www.libreoffice.org/themes/libreofficenew/img/logo.png in https://www.libreoffice.org/
  * fail to paste from Firefox due to Bug 134031 - "[EDITING]Images copied from Firefox won't paste" (which is marked RESOLVED but actually is an alive and remaining problem)

So this Bug 105066's title is too specific ("Paste special"), and the test file is too forgiving, thus will cause underestimation of the whole problem.
I will revoke Bug 134042 because it addresses problems that Bug 105066 does not: The range of cases is broader for sources other than LibreCalc. This means that it has an additional issue in intersoftware clipboard handling.
Comment 12 zzz 2022-07-24 04:52:38 UTC
Added Bug 107529 to See also. Same symptom, different reproduction procedure.
Comment 13 Stéphane Guillou (stragu) 2024-05-03 03:43:56 UTC
Tempted to close this as duplicate of (younger) bug 107529 (because it has been bibisected). However, Telesto reports reproducing in an earlier version in comment 3: 4.4.6.3 on Windows. I can't confirm that on Linux, I always get to 5.0 being the earliest.

Are you still able to double-check 4.4 vs 5.0 with comment 0 steps, Telesto?
Comment 14 Stéphane Guillou (stragu) 2024-05-03 03:51:18 UTC
(In reply to Stéphane Guillou (stragu) from comment #13)
> I can't confirm that on Linux, I always
> get to 5.0 being the earliest.
Actually, I can, using the "Bitmap" option in Paste Special, with the linux-64-releases bibisect repo checked out at libreoffice-4.4.6.3 and the gen VCL plugin:

Version: 4.4.6.3
Build ID: e8938fd3328e95dcf59dd64e7facd2c7d67c704d
Locale: en_AU.UTF-8

Will have a closer look at why there's a difference.
Comment 15 Stéphane Guillou (stragu) 2024-05-03 04:07:17 UTC
Bibisected with linux-64-releases to first affected release libreoffice-4.4.2.1. Also reproduced at that version with bug 107529 steps.
Need a closer bibisect, Henry's fixes might be related: https://wiki.documentfoundation.org/Releases/4.4.2/RC1
Comment 16 Stéphane Guillou (stragu) 2024-05-16 14:00:48 UTC
Using linux-50max repo, and comment 0 steps, same bibisect result as bug 107529 comment 3; first bad build [3efb3f9793bf3cd8aefe4671e95b723cd99a991f] which is:

commit ab00ac3e88e0a28d0e38c5968c23014a6a8fb194
author	Zolnai Tamás 	Sat Feb 21 19:48:33 2015 +0100
committer	Zolnai Tamás 	Sun Feb 22 11:59:20 2015 +0100
More improvements of graphic cache size handling

... which was cherrypicked to 4.4.2 as c31c3ea7afcb7dbe711c338ecceb072eadcc1012.

Let's mark as duplicate, bug 105066 is cleaner.

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