Issue 46421

Summary: regression: deleting paragraph break also deletes picture
Product: Writer Reporter: norbert2 <norbert.notz>
Component: codeAssignee: eric.savary
Status: CLOSED FIXED QA Contact: issues@sw <issues>
Severity: Trivial    
Priority: P3 CC: issues
Version: 680m87   
Target Milestone: ---   
Hardware: All   
OS: All   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---
Issue Depends on:    
Issue Blocks: 48350, 50025    
Description Flags
WRiter document
Daniels partly fix, causes problems in undoing changes in connection with sections none

Description norbert2 2005-03-31 16:34:00 UTC
hi, please...

- open the attaches writer document (with built 1.1.4 and a 2.0 beta built)

- place the cursor left before "Im Bild A"

- press BACKSPACE:

while 1.1.4 correctly keeps the picture, m87 deletes it!

(You may also have a look at issue 44438.)
Comment 1 norbert2 2005-03-31 16:34:34 UTC
Created attachment 24478 [details]
WRiter document
Comment 2 michael.ruess 2005-04-01 07:52:59 UTC
MRU->OD: delecting the break (with "Backspace" key) between second and third
paragraph will also delete the graphic. 
Using "Delete" key will work fine.
Comment 3 michael.ruess 2005-04-01 08:49:01 UTC
forgot to reassign.
Comment 4 Oliver-Rainer Wittmann 2005-04-01 08:59:16 UTC
OD->DVO: Please take over - I think this is your playground ;-)
Comment 5 Oliver-Rainer Wittmann 2005-04-28 11:01:01 UTC
issue 48350 depends on this issue
Comment 6 openoffice 2005-05-04 17:56:21 UTC
dvo: Fixed in CWS dvoqbfix4.

The problem is in SwUndoSaveCntnt, where content-anchored frames are handled
when content is being deleted. There have been several changes regressions
(#i34486#, #i30452#) which probably originate from a change necessary for
#111827#, with each fix fixing parts of the problems, but leaving others. The
current fix has been discussed with hb, od, tra, and myself; hopefully we have
now covered all relevant cases.

At the core of the issue is how to handle paragraph-anchored frames when their
paragraph is being deleted. Depending on how this happens, the graphic must be
re-anchored or deleted. With the various mostly-fixed-but-partly-buggy versions
since the original change, this would not happen correctly, or even nothing
would happen at all. In this particular case, the graphics should have been
re-anchored, but was deleted instead. This is now fixed.

Whoever touches this again, please be careful. :-)

Note: 'Backspace' in the description for this bug deletes the paragraph the
graphic is anchored to. That is, it joins the two paragraphs, which technically
means the first one gets the deleted. Which is the one with the graphics. Also
note that which one gets deleted does NOT influence which formatting 'wins'
during a join. That's a different matter. I.e. there is a difference between
which paragraphs get deleted physically and logically.

dvo->testing: Please make sure the referenced issues are fixed as well. Also
test 'funny' combinations of deleting and anchored objects, if possible.
Comment 7 stefan.baltzer 2005-07-06 11:07:28 UTC
SBA->TRA: As discussed, target set to OOo 2.0
Comment 8 tino.rachui 2005-07-07 10:08:29 UTC
Created attachment 27757 [details]
Daniels partly fix, causes problems in undoing changes in connection with sections
Comment 9 tino.rachui 2005-07-07 12:33:50 UTC
TRA: Retargeted to OOo 2.0.1 after consultation with ES. Reason: the proposed
fix causes a regression in another functionality. 

Reminder for TRA:
To reproduce the regression introduced by the proposed fix:
1. Open bugdoc
2. Mark paragraph 1 and insert a section. Paragraph 1 is is now in a section.
Make sure that there is only one paragraph in the section. 
3. Place cursor before "Im Bild A"
4. Press backspace
5. Undo the change -> Graphic disappears!

re-open issue and reassign to
Comment 10 tino.rachui 2005-07-07 12:33:58 UTC
reassign to
Comment 11 tino.rachui 2005-07-07 12:34:06 UTC
reset resolution to FIXED
Comment 12 tino.rachui 2005-07-07 12:35:07 UTC
Comment 13 tino.rachui 2005-07-07 12:36:06 UTC
Comment 14 tino.rachui 2005-07-26 13:51:58 UTC
*** Issue 50025 has been marked as a duplicate of this issue. ***
Comment 15 Oliver Specht 2005-08-02 08:18:46 UTC
*** Issue 51256 has been marked as a duplicate of this issue. ***
Comment 16 tino.rachui 2005-08-23 14:59:39 UTC
Fixed on cws swqpp1bfixes
Comment 17 tino.rachui 2005-08-23 15:12:01 UTC
See also #i53665# for another bug in this area.
Comment 18 tino.rachui 2005-08-25 11:16:45 UTC

re-open issue and reassign to
Comment 19 tino.rachui 2005-08-25 11:17:00 UTC
reassign to
Comment 20 tino.rachui 2005-08-25 11:17:06 UTC
reset resolution to FIXED
Comment 21 eric.savary 2005-09-19 10:00:42 UTC
Regression described by TRA is still not fixed -> see issue 54499.
Comment 22 eric.savary 2005-09-19 10:01:38 UTC
Verified in cws swqpp1bfixes
Comment 23 eric.savary 2005-10-17 13:21:36 UTC