Apache OpenOffice (AOO) Bugzilla – Issue 111812
Rejecting a 'Insert text section' change over a paragraph also deletes the paragraph
Last modified: 2017-05-20 11:13:10 UTC
Rejecting a change results in loss of data in a writer document. To duplicate this problem do the following: 1) create a new writer document. 2) add three paragraphs of text to it 3) Enable edit->changes->record to enable track changes on the document 3) select the text of the 2nd paragraph, and add a new section insert->section over the pargraph. 4) the paragraph is now within a section. Note that the paragraph existed before the track changes were enabled. 5) Now go to edit->changes->accept/reject and reject the 'insertion' change that added the section in (3). Expected Behavior : the section gets deleted but the pargraph within the section does not get deleted and is restored to its original state. Actual Behavior : BOTH the section and the paragraph within it are deleted.
Created attachment 69617 [details] Document used to simulate the issue, doc with 3 paras and track changes enabled
Created attachment 69619 [details] doc with section inserted over para 2 - rejecting the change will remove the section and also remove the para
Also simulated the same problem on OOo 3.2.0
The problem seems to lie in the track change implementation for inserting sections , ideally it should be implemented with 2 sets of insert change marks to indicate the the starting of the section - and the ending of the section : This is how the change is recorded currently :: <text:change-start text:change-id="ct-1422418760"/> <text:section text:style-name="Sect1" text:name="Section1"> <text:p text:style-name="P1"> But presently I had my first bit of objective information. </text:p> </text:section> <text:p text:style-name="P1"> <text:change-end text:change-id="ct-1422418760"/> </text:p> This is how perhaps it should have been recorded :: <text:change-start text:change-id="ct-1422418760"/> <text:section text:style-name="Sect1" text:name="Section1"> <text:change-end text:change-id="ct-1422418760"/> <text:p text:style-name="P1"> But presently I had my first bit of objective information. </text:p> <text:change-start text:change-id="ct-1422418761"/> </text:section> <text:p text:style-name="P1"> <text:change-end text:change-id="ct-1422418761"/> </text:p>
On further thought the right way to implement the change mark is to add a deletion change (to delete the paragraph) and a insert change (to insert a section with a paragraph -- the same paragraph that was deleted) : Presently :: <text:change-start text:change-id="ct-1422418760"/> <text:section text:style-name="Sect1" text:name="Section1"> <text:p text:style-name="P1"> But presently I had my first bit of objective information. </text:p> </text:section> <text:p text:style-name="P1"> <text:change-end text:change-id="ct-1422418760"/> </text:p> Suggested :: <text:change text:change-id="ct-1422418760" /> <== this is the deletion change recording the deleted paragraph <text:change-start text:change-id="ct-1422418761"/> <text:section text:style-name="Sect1" text:name="Section1"> <text:p text:style-name="P1"> But presently I had my first bit of objective information. </text:p> </text:section> <text:p text:style-name="P1"> <text:change-end text:change-id="ct-1422418761"/> </text:p>
@MBA: please have a look. No regression.
Reset assigne to the default "issues@openoffice.apache.org".