Bug 169554 - Paste with transpose does not work when pasting to a sheet that has been inserted before the source sheet
Summary: Paste with transpose does not work when pasting to a sheet that has been inse...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
25.8.1.1 release
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:26.2.0 target:25.8.4
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Clipboard
  Show dependency treegraph
 
Reported: 2025-11-19 21:04 UTC by alex
Modified: 2025-12-01 12:08 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
file di test (393.83 KB, application/vnd.oasis.opendocument.spreadsheet)
2025-11-19 21:08 UTC, alex
Details
Video of the bug (4.60 MB, video/mp4)
2025-11-24 22:50 UTC, alex
Details
screencast win11 24H2 (4.17 MB, image/gif)
2025-11-24 23:56 UTC, Saburo
Details
transpose works on a new sheet after active, not on a new sheet before active (5.93 MB, video/mp4)
2025-11-25 11:19 UTC, alex
Details

Note You need to log in before you can comment on or make changes to this bug.
Description alex 2025-11-19 21:04:47 UTC
Description:
soltanto sul documento che allego, Incolla Speciale con Trasponi non funziona (né da Menu, né da Icona, né da clic destro). Il documento contiene 4 fogli, uno dei quali ha 5321 righe, molte delle quali contengono formule. E ci sono molte formule anche negli altri fogli. Questo mi fa pensare che il documento superi un qualche limite di memoria, ma quale? E come scoprirlo?
Solamente spostando ogni foglio in un documento che lo contenga singolarmente, la funzione va a buon fine, anche copiando da un documento all'altro.
Parametri di sistema:
Processore	13th Gen Intel(R) Core(TM) i7-13700K (3.40 GHz)
RAM installata	32,0 GB (31,7 GB utilizzabile)
Tipo sistema	Sistema operativo a 64 bit, processore basato su x64

Purtroppo, non ho la possibilità di provare la funzione con 64GB di memoria.

Steps to Reproduce:
1.Selezionare il foglio "eToro(liste)"
2.Selezionare più celle (Esempio D88:K91)
3.Copia
4.In una cella vuota Fare Incolla Speciale-Trasponi

Actual Results:
Non copia nulla. Nel caso di esempio (copia di 8 righe per 4 colonne), seleziona 8 colonne a partire dalla cella dove la copia doveva essere eseguita e le 8 colonne alla loro sinistra

Expected Results:
incollare la prima riga trasposta sulla prima colonna e le altre tre righe trasposte sulle tre colonne successive


Reproducible: Always


User Profile Reset: Yes

Additional Info:
Version: 25.8.3.2 (X86_64)
Build ID: 8ca8d55c161d602844f5428fa4b58097424e324e
CPU threads: 24; OS: Windows 11 X86_64 (build 26200); UI render: Skia/Vulkan; VCL: win
Locale: it-IT (it_IT); UI: it-IT
Calc: CL threaded
Comment 1 alex 2025-11-19 21:08:11 UTC
Created attachment 204116 [details]
file di test
Comment 2 m_a_riosv 2025-11-20 01:11:45 UTC
Reproducible
Version: 25.8.2.2 (X86_64)
Build ID: d401f2107ccab8f924a8e2df40f573aab7605b6f
CPU threads: 16; OS: Windows 11 X86_64 (build 26200); UI render: Skia/Vulkan; VCL: win
Locale: es-ES (es_ES); UI: en-US
Calc: CL threaded
STILL
Version: 26.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 620(Build:0)
CPU threads: 16; OS: Windows 11 X86_64 (build 26200); UI render: Skia/Vulkan; VCL: win
Locale: es-ES (es_ES); UI: en-US
Calc: threaded

Latest version that works on the ones I have installed.
Version: 25.8.1.0.0+ (X86_64) / LibreOffice Community
Build ID: 00b2dd5faeb43ff50c84139a31892956a6a142d7
CPU threads: 16; OS: Windows 11 X86_64 (build 26200); UI render: Skia/Vulkan; VCL: win
Locale: es-ES (es_ES); UI: en-US
Calc: CL threaded
Comment 3 alex 2025-11-20 10:05:23 UTC
I have new info on this. After m_a_riosv's comment, I uninstalled the current version and clean installed the most recent old version I had on my hd, that is LibreOffice_24.8.3_Win_x86-64.
When I ran it, it autoupdated by itself, without any interaction by me, and finally, after several autoupdates, this is my current version:

Version: 25.2.6.2 (X86_64) / LibreOffice Community
Build ID: 729c5bfe710f5eb71ed3bbde9e06a6065e9c6c5d
CPU threads: 24; OS: Windows 11 X86_64 (10.0 build 26200); UI render: Skia/Vulkan; VCL: win
Locale: it-IT (it_IT); UI: it-IT
Calc: CL threaded

Using this version on my workstation, the function is now working on the very same document attached. Although I retrograded the program, there is no data loss, no error and all macros still work on the document which was saved on the 25.8.3.2 version.

Taking into account that I got to the 25.8.3.2 version by multiple autoupdates and I can't remember how many years ago my first clean install happened, I assume that some intermediate autoupdate corrupted my (and m_a_riosv's) config in a way that profile reset can't fix.

I'm not flagging it solved yet, because it apparently still needs investigation.
Thanks m_a_riosv.
Comment 4 Saburo 2025-11-21 11:37:32 UTC
bibisected with win64-25.8 56982a8a4edec32e5a24f4c772a01c8978a8f13e is the first bad commit
    source 12f068d1f8740ba67ad4c9f3de85198157214c15

commit 12f068d1f8740ba67ad4c9f3de85198157214c15
author	Xisco Fauli <xiscofauli@libreoffice.org>

tdf#167075: init doc shell before pasting as png/bmp (take 2)

---
adding CC: Xisco Fauli

List things that may be relevant
Win11 25H2
clip history ([win] + [v] key)
Comment 5 Xisco Faulí 2025-11-24 11:35:16 UTC
Translated using Google:

Steps to Reproduce:
1. Select the "eToro(lists)" sheet
2. Select multiple cells (Example: D88:K91)
3. Copy
4. In an empty cell, select Paste Special-Transpose

Actual Results:
Does not copy anything. In the example (copying 8 rows by 4 columns), select 8 columns starting from the cell where the copy was to be made and the 8 columns to their left.

Expected Results:
Paste the first transposed row to the first column and the other three transposed rows to the next three columns.
Comment 6 Xisco Faulí 2025-11-24 11:42:49 UTC
unfortunately I can't reproduce it in

Version: 25.8.2.2 (X86_64)
Build ID: d401f2107ccab8f924a8e2df40f573aab7605b6f
CPU threads: 4; OS: Windows 10 X86_64 (build 19045); UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US
Calc: threaded

Could someone please attach a screencast showing how to reproduce the issue ?
Comment 7 nutka 2025-11-24 19:51:39 UTC
I can't reproduce it in: 25.2.7.2, 25.8.1.1, 25.8.2.2 and 25.8.3.2

Version: 25.8.3.2 (X86_64)
Build ID: 8ca8d55c161d602844f5428fa4b58097424e324e
CPU threads: 8; OS: Windows 11 X86_64 (build 26200); UI render: Skia/Raster; VCL: win
Locale: it-IT (fr_FR); UI: it-IT
Calc: threaded
Comment 8 alex 2025-11-24 22:50:21 UTC
Created attachment 204264 [details]
Video of the bug

Attached
Comment 9 Saburo 2025-11-24 23:56:56 UTC
Created attachment 204266 [details]
screencast win11 24H2
Comment 10 Xisco Faulí 2025-11-25 10:01:58 UTC
thank you both for the screencast but I can't find the way to reproduce it here, either on Linux or Windows...
Comment 11 alex 2025-11-25 11:19:02 UTC
Created attachment 204274 [details]
transpose works on a new sheet after active, not on a new sheet before active

today I had more time to experiment. I found another case when transpose doesn't work. The video is clear but this is what happens:

-New document with 1 sheet (therefore file size doesn't count)
-insert whatever text
-copy n rows + y cols
-transpose in same sheet = it works
-new sheet after the original one
-same copy+transpose in new sheet (after) = it works
-new sheet before the original one
-same copy+transpose in new sheet (before) = it doesn't work

I also tried changing the options in order to have a new document with 3 sheets, but the transpose works until I create a sheet before the original ones, then it fails.
I hope this can help you understand what the matter is.

I'm still using most recent vsn:
Version: 25.8.3.2 (X86_64)
Build ID: 8ca8d55c161d602844f5428fa4b58097424e324e
CPU threads: 24; OS: Windows 11 X86_64 (build 26200); UI render: Skia/Vulkan; VCL: win
Locale: it-IT (it_IT); UI: it-IT
Calc: CL threaded

Thank you all.
Comment 12 Xisco Faulí 2025-11-25 11:29:35 UTC
Hi Alex,
thank you very much for providing further details. Even with those steps, I can't reproduce the issue...
Comment 13 Buovjaga 2025-11-26 16:37:58 UTC
(In reply to alex from comment #11)
> -New document with 1 sheet (therefore file size doesn't count)
> -insert whatever text
> -copy n rows + y cols
> -new sheet before the original one
> -same copy+transpose in new sheet (before) = it doesn't work

I simplified the steps. Xisco: the important thing is that you first insert the new sheet, then go back to the source sheet and copy the data. It works fine, if I have the stuff in the clipboard while inserting the new sheet and paste transpose to it immediately
Comment 14 Xisco Faulí 2025-11-26 19:37:13 UTC
(In reply to Buovjaga from comment #13)
> (In reply to alex from comment #11)
> > -New document with 1 sheet (therefore file size doesn't count)
> > -insert whatever text
> > -copy n rows + y cols
> > -new sheet before the original one
> > -same copy+transpose in new sheet (before) = it doesn't work
> 
> I simplified the steps. Xisco: the important thing is that you first insert
> the new sheet, then go back to the source sheet and copy the data. It works
> fine, if I have the stuff in the clipboard while inserting the new sheet and
> paste transpose to it immediately

even with those steps, I can't reproduce it.
@Ilmari, a few questions:
- Which Windows version are you using ?
- Do you also reproduce it on Linux?
- Can you confirm it's caused by 12f068d1f8740ba67ad4c9f3de85198157214c15 ?
Comment 15 Buovjaga 2025-11-26 19:49:44 UTC
(In reply to Xisco Faulí from comment #14)
> even with those steps, I can't reproduce it.
> @Ilmari, a few questions:
> - Which Windows version are you using ?

Windows 11

> - Do you also reproduce it on Linux?

Now that you ask, yes, with all UIs.

> - Can you confirm it's caused by 12f068d1f8740ba67ad4c9f3de85198157214c15 ?

Yes, checked with 26.2 repo, source commit 671564bce4541244ad3d67b5b98899321176231e binary 4e0162bc2ccad4745406b2d061c295181b25231d
Comment 16 nutka 2025-11-27 03:51:19 UTC
In Windows 11, the issue occurs when clipboard history is enabled.
Comment 17 Buovjaga 2025-11-27 11:10:49 UTC
(In reply to nutka from comment #16)
> In Windows 11, the issue occurs when clipboard history is enabled.

I saw the issue even though the clipboard history was off.
Comment 18 Commit Notification 2025-11-27 21:08:21 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/ea940b7985921883f8f75009186cae24846b1bd4

tdf#169554: Revert "tdf#167075: init doc shell before pasting as png/bmp (take 2)"

It will be available in 26.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 19 alex 2025-11-28 14:59:42 UTC
I installed this
LibreOfficeDev_25.8.4.0.0_Win_x86-64.msi

from here
Index of /daily/libreoffice-25-8/Win-x86_64@tb73-TDF/2025-11-28_04.09.44/

Is this the right version to test it on?

Version: 25.8.4.0.0+ (X86_64) / LibreOffice Community
Build ID: 9aed505475b5ce85c9cd6c1baaec4c70d0cb6cc0
CPU threads: 24; OS: Windows 11 X86_64 (build 26200); UI render: Skia/Vulkan; VCL: win
Locale: it-IT (it_IT); UI: it-IT
Calc: CL threaded

I ask because in my case it still does not work, both in the case I attached (cmt #8) and on my originally attached document (cmt #1).

Before trying, I disinstalled 25.8.3.2 and renamed the C:\Program Files\LibreOffice (as LibreOffice.save) and the C:\Users\***********\AppData\Roaming\LibreOffice (as LibreOffice.save) to be sure to use only the new version.
I'm not attaching anything because it still behaves as in my previous attachments.

Thank you everybody.
Comment 20 Xisco Faulí 2025-11-28 15:03:38 UTC
no, it's not in libreoffice-25-8 branch yet. you need to download master from https://dev-builds.libreoffice.org/daily/master/current.html
Comment 21 alex 2025-11-28 16:32:01 UTC
YES, IT'S OK NOW!
Thank you Xisco and everybody who helped.
Comment 22 nutka 2025-11-28 17:28:48 UTC
It's OK.
Comment 23 Commit Notification 2025-12-01 12:07:17 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "libreoffice-25-8":

https://git.libreoffice.org/core/commit/894dbe5208bb40b7be11f1880f42c6efaf5a76c4

tdf#169554: Revert "tdf#167075: init doc shell before pasting as png/bmp

It will be available in 25.8.4.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 24 Commit Notification 2025-12-01 12:08:26 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "libreoffice-25-8":

https://git.libreoffice.org/core/commit/30af0dfd29c1e3c70ae30e2123b7549323870c12

tdf#168850, tdf#167075, tdf#169554: Revert "ScViewData: pass ScDocShell by ref"

It will be available in 25.8.4.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.