Bug 134404 - Deleting a page break with backspace deleted the image on the previous page
Summary: Deleting a page break with backspace deleted the image on the previous page
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.1.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Michael Stahl (allotropia)
URL:
Whiteboard: target:7.1.0 target:7.0.0.1 target:6.4.6
Keywords:
Depends on:
Blocks: Anchor-and-Text-Wrap
  Show dependency treegraph
 
Reported: 2020-06-29 20:54 UTC by Telesto
Modified: 2021-02-09 14:27 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file (465.55 KB, application/vnd.oasis.opendocument.text)
2020-06-29 20:59 UTC, Telesto
Details
Another example (465.35 KB, application/vnd.oasis.opendocument.text)
2020-06-29 21:32 UTC, Telesto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2020-06-29 20:54:14 UTC
Description:
Deleting a page break with backspace deleted the image on the previous page

Steps to Reproduce:
1. open the attached file
2. Press backspace on the second page -> Image gone
3. CTRL+Z
4. Change the anchor to paragraph -> Image gone (not in 6.0)
5. Change image to character -> Image gone
6. Hoover over the blue page break line -> Delete pagebreak -> image stays (in all cases)

Actual Results:
Image gone

Expected Results:
Image stays.. at least my personal preference


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.1.0.0.alpha0+ (x64)
Build ID: 006c65bbd472cb1d7d44e095714e28190b76be0d
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL
Comment 1 Telesto 2020-06-29 20:59:29 UTC
@Michael,
Another version of the anchor + backspace stuff; you did explain the rules, but still having trouble deciphering them (different terminology/perceptive -> fly's etc..)

So what supposed to happen here in the paradigm..
Comment 2 Telesto 2020-06-29 20:59:43 UTC
Created attachment 162525 [details]
Example file
Comment 3 Telesto 2020-06-29 21:32:22 UTC
Created attachment 162527 [details]
Another example

Bit off topic (as this is a different case).. but like the put it forward here
1. Open the attached file (image anchored to paragraph/ optimal wrap)
2. Press D (or any other letter)
3. Press Enter
4. Backspace -> Image gone, still around

Part 2
5. CTRL+Z CTRL+Z
6. Press Enter
7. Press Enter -
8. Backspace -> image gone (probably already reported)

Part 3
1. Undo everything
2. Change the anchor to character
3. Press Enter below the image -> Image goes down 
4. Press Backspace -> Image gone

Above are all cases with optimal wrap.. 
Switch to page wrap -> Backspace will never delete the image. Delete does (feel quite logical/normal to me)

Same behavior as page wrap with wrap off/ left/ right.
Comment 4 Michael Stahl (allotropia) 2020-06-30 10:44:13 UTC
(In reply to Telesto from comment #3)
> Created attachment 162527 [details]
> Another example
> 
> Bit off topic (as this is a different case).. but like the put it forward
> here
> 1. Open the attached file (image anchored to paragraph/ optimal wrap)
> 2. Press D (or any other letter)
> 3. Press Enter
> 4. Backspace -> Image gone, still around

this should be fixed with https://gerrit.libreoffice.org/c/core/+/97511

everything else is a duplicate of bug 133957 or bug 134007
Comment 5 Commit Notification 2020-06-30 13:07:09 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/17aeb522f566cf225baa5ce524e747089f76728d

tdf#134404 sw: another subtlety with start/end of section (at-para flys)

It will be available in 7.1.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 6 Commit Notification 2020-06-30 15:27:44 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-7-0":

https://git.libreoffice.org/core/commit/9227a7ba84b6c5323d45ff427cb0f90e16530be1

tdf#134404 sw: another subtlety with start/end of section (at-para flys)

It will be available in 7.0.0.1.

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 7 Commit Notification 2020-06-30 21:29:42 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-6-4":

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

tdf#134404 sw: another subtlety with start/end of section (at-para flys)

It will be available in 6.4.6.

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 8 Commit Notification 2020-07-01 07:38:25 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

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

tdf#134404: sw: Add unittest

It will be available in 7.1.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 9 Xisco Faulí 2021-02-09 14:27:13 UTC
I guess we can close this now.

@Michael Stal, thanks for fixing this issue!!