Issue 111812 - Rejecting a 'Insert text section' change over a paragraph also deletes the paragraph
Summary: Rejecting a 'Insert text section' change over a paragraph also deletes the pa...
Status: CONFIRMED
Alias: None
Product: Writer
Classification: Application
Component: editing (show other issues)
Version: OOo 3.1.1
Hardware: All All
: P2 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-25 09:38 UTC by listmanster
Modified: 2017-05-20 11:13 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Document used to simulate the issue, doc with 3 paras and track changes enabled (10.26 KB, application/vnd.oasis.opendocument.text)
2010-05-25 09:44 UTC, listmanster
no flags Details
doc with section inserted over para 2 - rejecting the change will remove the section and also remove the para (10.49 KB, application/vnd.oasis.opendocument.text)
2010-05-25 09:45 UTC, listmanster
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description listmanster 2010-05-25 09:38:35 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.
Comment 1 listmanster 2010-05-25 09:44:08 UTC
Created attachment 69617 [details]
Document used to simulate the issue, doc with 3 paras and track changes enabled
Comment 2 listmanster 2010-05-25 09:45:19 UTC
Created attachment 69619 [details]
doc with section inserted over para 2 - rejecting the change will remove the section and also remove the para
Comment 3 listmanster 2010-05-25 09:46:53 UTC
Also simulated the same problem on OOo 3.2.0

Comment 4 listmanster 2010-05-25 10:47:45 UTC
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>
Comment 5 listmanster 2010-05-25 11:29:31 UTC
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>
Comment 6 eric.savary 2010-05-25 12:27:05 UTC
@MBA: please have a look. No regression.
Comment 7 Marcus 2017-05-20 11:13:10 UTC
Reset assigne to the default "issues@openoffice.apache.org".