Bug 53487 - [Notes] Weird interaction of notes/comments with undo. Insert/Comment is grayed out.
Summary: [Notes] Weird interaction of notes/comments with undo. Insert/Comment is gray...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.0.0.0.alpha0+ Master
Hardware: Other All
: low normal
Assignee: Miklos Vajna
QA Contact:
URL:
Whiteboard: BSA target:4.1.0 target:4.0.0.2
Keywords: regression
Depends on:
Blocks:
 
Reported: 2012-08-14 11:12 UTC by s-joyemusequna
Modified: 2013-01-14 10:16 UTC (History)
3 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 s-joyemusequna 2012-08-14 11:12:16 UTC
Problem description: 

Steps to reproduce:
1. Write the text "This is a comment."
2. Mark the word "comment". 
3. Insert a comment (Insert/Comment).
4. Press undo-button in the toolbar (or Edit/Undo).
5. Mark the word "comment" again. It is not possible to insert a comment anymore to this word. Insert/Comment is grayed out.

Mark "a comment". This works. You can insert a comment now. Press undo-button in the toolbar (or Edit/Undo). Now it is impossible to insert a comment to "comment" and "a comment".

Mark the "mm"-sequence and insert a comment. This works, but the sequence "ent." after that has gray background. 

Current behavior: undo broken

Expected behavior: undo works

Platform (if different from the browser): 
              
Browser: Mozilla/5.0 (Windows NT 6.0; WOW64; rv:14.0) Gecko/20100101 Firefox/14.0.1
Comment 1 Joel Madero 2012-12-06 22:40:39 UTC
Confirmed, quite annoying and a regression.

Marking:
New (Confirmed)

Normal (can prevent high quality work under specific scenario)

Low (there isn't a workaround but you can insert a comment just slightly off of the same spot and it works fine, furthermore situation of adding a comment, then undoing the comment, then wanting to put another comment there seems pretty rare)

Whiteboard: regression

Also note that if you go to insert it's not just comment that is grayed out, it's really everything in there. Undo is clearly borked with comments
Comment 2 Miklos Vajna 2013-01-11 12:23:06 UTC
Indeed, so if a textrange comment is inserted, and one just clicks away (so the comment gets removed as it has no content), that works; but in case undo is used, only the comment is removed, the underlying fieldmark is not.

I'll look into this.
Comment 3 Not Assigned 2013-01-11 16:49:13 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=f132eaa5a6ec6fd3051442bda9caf94a3341c680

fdo#53487 SwUndoInsert: take care of fieldmarks when deleting field chars



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 4 Miklos Vajna 2013-01-11 17:45:37 UTC
Fixed in master, marking as resolved.

-4-0 review: https://gerrit.libreoffice.org/1652
Comment 5 Not Assigned 2013-01-14 10:16:11 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-4-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=b825f95fa100f2a54032ec5a1ff51de0db17ea1d&h=libreoffice-4-0

fdo#53487 SwUndoInsert: take care of fieldmarks when deleting field chars


It will be available in LibreOffice 4.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.