Bug 166790 - "Reinstate change" just removes the change
Summary: "Reinstate change" just removes the change
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
25.8.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Track-Changes
  Show dependency treegraph
 
Reported: 2025-05-30 10:58 UTC by Eyal Rozenberg
Modified: 2025-06-06 06:54 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 Eyal Rozenberg 2025-05-30 10:58:22 UTC
I've noticed the "reinstate change" feature, described here:

https://vmiklos.hu/blog/sw-redline-reinstate.html

so, I tried it on 

Version: 25.8.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: 63597069fbb3209db1b4acd3c3e85b512b5d717c
CPU threads: 4; OS: Linux 6.12; UI render: default; VCL: gtk3
Locale: en-IL (en_IL); UI: en-US

I did the following:

1. New document in Writer
2. Entered "Hello world"
3. Put cursor before the "w"
4. Start tracking changes
5. Typed "goodbye "
6. Right-clicked the "goodbye"
7. Chose "Reinstate Change"

Expected result:

Accepted text is "Hello goodbye world", with "goodbye" marked for deletion.

Actual result:

The "goodbye " is gone.
Comment 1 Telesto 2025-05-30 18:50:58 UTC
Confirm
Version: 25.8.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: 17e8dbead42e2d4b55815b1b7b2846b03d62a15d
CPU threads: 4; OS: Windows 10 X86_64 (build 19045); UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL threaded
Comment 2 Miklos Vajna 2025-06-02 07:08:48 UTC
That's kind of intentional, you are meant to use reinstate only on redlines that is authored by somebody else. So if you have some content, somebody else wants to delete it, then you can press reinstate to introduce it again.

Not sure what's the best way to communicate this better, perhaps disable the action in case the cursor is inside a redline that you yourself authored?
Comment 3 Eyal Rozenberg 2025-06-02 08:19:08 UTC
(In reply to Miklos Vajna from comment #2)
> That's kind of intentional, you are meant to use reinstate only on redlines
> that is authored by somebody else.

Why?

1. That's not what the blog post suggests would happen.

2. Remember that, often, more than one person uses the same LO installation with the same username. This happens on family computers on which different people don't bother to define users of their own, or on office computers where the user is not really associated with anyone in particular.

3. See below

> So if you have some content, somebody
> else wants to delete it, then you can press reinstate to introduce it again.


> Not sure what's the best way to communicate this better, perhaps disable the
> action in case the cursor is inside a redline that you yourself authored?

That would improve consistency; but...

3. Why not just allow treating "your" own changes just like the changes by another person? What you're saying is that, right now, there is no desired action intended for the case of "reinstate"ing your own changes, so much so that you'd be willing to disable it. Well, we can choose such an action, and a better choice of such action is doing the same thing "reinstate" would do to changes by others.

I believe it is better to keep consistency of actions on changes irrespective of authors, than to introduce it with this action. Even if the motivation for the feature is tracked changes by others.
Comment 4 Telesto 2025-06-02 10:17:46 UTC
(In reply to Miklos Vajna from comment #2)
> That's kind of intentional, you are meant to use reinstate only on redlines
> that is authored by somebody else. 

This doesn't apply to the delete case?
1. New document in Writer
2. Entered "Hello world"
3. Start tracking changes
4. Select and delete: Hello
5. Right-click "Hello"
6. Chose "Reinstate Change

I personally more in favor of Eyal. To simply allow reinstate regardless of the author. 
A) Makes the code less complex in my perception. But well I'm not developer, so I might be mistaken
B) Makes testing (QA) less of a hassle. Having the account for author (in manual testing) is quite a cumbersome. 
C) There is no harm done, as far I can see; likely even improvement
D) The reinstate feature might even be used to communicate alternatives options by the author himself? I don't see any objection to this use-case
Comment 5 Miklos Vajna 2025-06-06 06:54:07 UTC
> To simply allow reinstate regardless of the author. 

To be clear, I don't expect we have explicit code to specify this happens in general, just the usual "if you delete from your own insert, that reduces the insert, doesn't create a delete" behavior happens here. I agree that testing is annoying when something only works with 2 authors, so we can consider to make reinstate and reject work differently here.