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
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.
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.)
Assign.
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.
-4-0 review: https://gerrit.libreoffice.org/2163
Verified using LibreOffice Version 4.1.0.0.alpha0+ (Build ID: c16e9f4ed97f65357e9986f46ad88ee9f223799). Excellent work Miklos!
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.