Bug 60738 - FORMATTING: Can't format (bold/italic/underline/...) comment text
Summary: FORMATTING: Can't format (bold/italic/underline/...) comment text
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.1.0.0.alpha0+ Master
Hardware: Other Linux (All)
: medium normal
Assignee: Miklos Vajna
URL:
Whiteboard: BSA target:4.1.0 target:4.0.1
Keywords: regression
Depends on:
Blocks: 60710
  Show dependency treegraph
 
Reported: 2013-02-12 16:28 UTC by Jorendc
Modified: 2013-02-18 19:26 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot of grayed out toolbar (71.42 KB, image/png)
2013-02-12 16:28 UTC, Jorendc
Details
test doc. (9.57 KB, application/vnd.oasis.opendocument.text)
2013-02-14 17:20 UTC, Miklos Vajna
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jorendc 2013-02-12 16:28:04 UTC
Created attachment 74697 [details]
Screenshot of grayed out toolbar

Problem description: When you add a comment, you can't format the comment text anymore. The whole toolbar is also grayed out (styles/font/font size/bold/italic/underline/...) (see attached screenshot).

Tested using LibreOffice Version 4.1.0.0.alpha0+ (Build ID: cbc722733bb272b0f26efec09b478bed9a3cdb9); Linux Mint 14 x64

This feature works using LibreOffice 4.0.0.3 rc3 (= release)

Joel also tried to reproduce this behavior, but can't reproduce using a (4 to 5 days) older build LibreOffice Version 4.1.0.0.alpha0+ (Build ID: 80cbc04c2cbe25ebdfe2f22bb2e5ba62728e963) using Bondhi Linux.

Steps to reproduce:
1. Open Writer
2. Type some text
3. Select text
4. Insert > Comment (ctrl+alt+C)
5. Type some text

Current behavior: can't format the text + toolbar grayed out.

Expected behavior: can format text + no grayed out toolbar.

              
Operating System: Linux (Other)
Version: 4.1.0.0.alpha0+ Master
Last worked in: 4.0.0.3 release
Comment 1 Miklos Vajna 2013-02-12 16:31:16 UTC
This is caused by my bd505fdb9f669f365ff39b0ef46f0742c638e333, the SwPaM::HasReadonlySel() part. We need to find a way to detect where the cursor is and not disable editing in case the cursor is in the sidebar.
Comment 2 Miklos Vajna 2013-02-14 17:20:09 UTC
Created attachment 74827 [details]
test doc.

OK, I think I know what's going on here. Here is a simple test document. Requirements:

1) The cursor position between the first field end and the anchor (both are hidden characters) should be read-only.
2) The first annotation should be read-writable, including formatting. Only direct formatting, no styles.
3) It should be possible to delete the first annotation.
4) It should not be possible to edit the second annotation, as it's part of a protected section. (One could argue that commenting a protected section should be possible, my take on that is: it was like this in 3.6, if we change that, that should be a separate change, independent from this bug.)
Comment 3 Miklos Vajna 2013-02-14 17:20:45 UTC
Assign.
Comment 4 Not Assigned 2013-02-14 18:14:40 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

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

fdo#60738 SwPostItMgr: let the cursor know if we're in annotation mode



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 5 Miklos Vajna 2013-02-15 09:11:23 UTC
-4-0 review: https://gerrit.libreoffice.org/2163
Comment 6 Jorendc 2013-02-17 11:25:30 UTC
Verified using LibreOffice Version 4.1.0.0.alpha0+ (Build ID: c16e9f4ed97f65357e9986f46ad88ee9f223799).

Excellent work Miklos!
Comment 7 Not Assigned 2013-02-18 19:26:37 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=806403f366f5cdfbb73438dd4004ed6c8fbd696d&h=libreoffice-4-0

fdo#60738 SwPostItMgr: let the cursor know if we're in annotation mode


It will be available in LibreOffice 4.0.1.

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.