Bug 134007 - EDITING: Image anchored to paragraph gets removed when removing the paragraph
Summary: EDITING: Image anchored to paragraph gets removed when removing the paragraph
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.1.0.0.alpha0+
Hardware: All All
: low minor
Assignee: Michael Stahl (allotropia)
URL:
Whiteboard: target:7.4.0 target:7.3.5
Keywords: bibisected, bisected, regression
: 135629 (view as bug list)
Depends on:
Blocks: Anchor-and-Text-Wrap
  Show dependency treegraph
 
Reported: 2020-06-15 18:09 UTC by Xisco Faulí
Modified: 2022-06-21 12:10 UTC (History)
4 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 Xisco Faulí 2020-06-15 18:09:31 UTC
Steps to reproduce it:
1. Open sw/qa/extras/uiwriter/data3/tdf132725.odt
2. Go to end of paragraph
3. Use backspace twice

-> Image disappears

Regression introduced by https://cgit.freedesktop.org/libreoffice/core/commit/?id=91b2325808a75174f284c48c8b8afc118fad74e4, later on fixed by https://cgit.freedesktop.org/libreoffice/core/commit/?id=be2f539012d818eaa2d40a9cf199b53d32e1dee4 and reintroduced again by 
https://git.libreoffice.org/core/commit/b314735568c1e9ab8ca52413017425bc2ef12973

See https://gerrit.libreoffice.org/c/core/+/96386 for more information
Comment 1 Xisco Faulí 2020-06-15 18:10:09 UTC Comment hidden (obsolete)
Comment 2 Timur 2020-06-16 06:06:04 UTC
It's not attachment 160388 [details] ? 
I don't see by title why this should be a bug, looks reasonable.
Comment 3 Xisco Faulí 2020-06-16 07:40:00 UTC
(In reply to Timur from comment #2)
> It's not attachment 160388 [details] ? 
> I don't see by title why this should be a bug, looks reasonable.

I'm reporting it because it has always worked in a different way. Also see my description explaining that it was introduced, fixed and reintroduced again.
I'm fine if the behaviour changes but I would like to hear Michael's opinion first
Comment 4 Michael Stahl (allotropia) 2020-06-16 08:57:49 UTC
 be2f539012d818eaa2d40a9cf199b53d32e1dee4 was a regression for this example because it didn't take into account that anchor of at-para fly doesn't have SwIndex.

see https://bugs.documentfoundation.org/show_bug.cgi?id=132321#c20
for my idea of how this should work.

this falls into case 2.

distinguishing between a selection that was created by SelectAll and one that was  created by Backspace key and happens to be the entire section because there's only one character doesn't look easy to implement.
Comment 5 Buovjaga 2021-08-05 16:24:25 UTC
*** Bug 135629 has been marked as a duplicate of this bug. ***
Comment 6 Michael Stahl (allotropia) 2022-06-08 18:31:35 UTC
fixed on master
Comment 7 Michael Stahl (allotropia) 2022-06-21 12:10:01 UTC
notification didn't happen, apparently i need to put all the bugs into subject line:

commit a6832b836e6905362c85d1a90c8779cf7ce821fe
Author:     Michael Stahl <michael.stahl@allotropia.de>
AuthorDate: Tue Jun 7 19:01:24 2022 +0200
Commit:     Michael Stahl <michael.stahl@allotropia.de>
CommitDate: Tue Jun 21 10:03:07 2022 +0200

    tdf#133957 sw: don't delete flys on Backspace/Delete keys
    
    Also fixes: tdf#134007 tdf#138835 tdf#139514