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: NEW
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: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Anchor-and-Text-Wrap
  Show dependency treegraph
 
Reported: 2020-06-15 18:09 UTC by Xisco Faulí
Modified: 2020-08-01 14:17 UTC (History)
2 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.