Bug 162509 - Weird paste table behavior
Summary: Weird paste table behavior
Status: RESOLVED WONTFIX
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
24.2.5.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Paste Writer-Tables
  Show dependency treegraph
 
Reported: 2024-08-18 07:30 UTC by FishBoneEK
Modified: 2025-01-30 16:21 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
sample document (12.77 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2024-08-18 07:30 UTC, FishBoneEK
Details

Note You need to log in before you can comment on or make changes to this bug.
Description FishBoneEK 2024-08-18 07:30:44 UTC
Created attachment 195888 [details]
sample document

In the uploaded document, if you:
1. Select first table (yes the long one, across several pages)
2. Copy it
3. Paste it after the second table (the small one)

You will find: 
1. Now the long table is pasted after the long table, before the small table, like:
  - long
  - long
  - small

I expect:
1. The long table is pasted after the small one: like
  - long
  - small
  - long
Comment 1 raal 2024-08-26 17:33:33 UTC
Confirm in 25.2, works in 7.3.7 - deleted text "Cannot press Delete here → " and paste table here.
Comment 2 raal 2024-08-26 17:44:25 UTC
This seems to have begun at the below commit in bibisect repository/OS linux-64-24.2.
Adding Cc: to Michael Stahl ; Could you possibly take a look at this one?
Thanks
 db54c9bd01a48724280f89a9a81a0fcd13008f7b is the first bad commit
commit db54c9bd01a48724280f89a9a81a0fcd13008f7b
Author: Jenkins Build User <tdf@maggie.tdf>
Date:   Fri Apr 12 09:33:51 2024 +0200

    source 6d3b6db240a826113a40df8cb6168816aef3441c

164741: sw: SelectAll of section with RES_PAGEDESC corner-case | https://gerrit.libreoffice.org/c/core/+/164741
Comment 3 Michael Stahl (allotropia) 2025-01-30 16:21:01 UTC
i'm not sure if this is even a bug.

the "small" table is a floating object that is anchored to the paragraph that contains "Cannot press Delete here → " and is positioned *above* the paragraph.

select this object, right click Properties, Position and Size, set Position Vertical to Bottom, By Page text area ... now the table is *below* the paragraph and pasting the other table should put it *before* the paragraph, right?

what changed in the commit from comment #2 is just that a table will be pasted before the paragraph where the cursor is, where previously it would be pasted after the paragraph where the cursor is - i don't see any advantage to either option as such.

(also, previously it would crash if you don't first delete all the text in the target paragraph, and if you do change the positioning as described above and paste you get 2 tables overlapping each other...)

the copying code does not take positioning of floating objects into account and i think it should not because that would be too complicated, and what should it do with a paragraph that has 2 floating objects, one above and one below...

so IMHO this one is WONTFIX