Bug 53442 - VIEWING: Text range annotation limited to a single paragraph
Summary: VIEWING: Text range annotation limited to a single paragraph
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
4.0.0.0.alpha0+ Master
Hardware: Other All
: medium normal
Assignee: Miklos Vajna
URL:
Whiteboard: BSA target:4.1.0 target:4.0.3
Keywords:
: 61249 (view as bug list)
Depends on: 38244
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-13 15:09 UTC by Alexandre Demers
Modified: 2013-04-19 16:06 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
trivial reproducer (216 bytes, application/rtf)
2013-03-27 16:28 UTC, Miklos Vajna
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandre Demers 2012-08-13 15:09:57 UTC
Problem description: 

Steps to reproduce:
1. Open Writer, type some text in two differents paragraphs.
2. Select text range beginning in one paragraph and ending in the other (multiple paragraph text range).
3. Try to add a comment/annotation.

Current behavior:
Text range annotations are limited to a single paragraph at most.

Expected behavior:
It should be possible to add annotation/comment on multiple paragraph text range. According to ODF 1.2, I don't see any technical restriction not to support it. Related bug 38244 doesn't give any information on this limitation, but Miklos reports it on his blog (http://vmiklos.hu/blog/lo-sw-comment-range).

Platform (if different from the browser):
Platform : all
              
Browser: Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.75 Safari/537.1
Comment 1 Olivier R. 2012-08-16 14:55:17 UTC
Confirmed.
Comment 2 Gerry 2012-11-29 08:46:29 UTC
Is there any chance that this bug gets fixed for LibreOffice 4.0? 

I am very glad that Miklos added the possibility to assign comments to text ranges, but it is IMHO just half a feature if it does not allow to assign it to multiple paragraph text ranges. 

Example scenario: Think for example of bullet point lists in a document (each bullet point is a paragraph) and try to comment - let's say - bullet points number 3 to 5 telling the author that they should be deleted out or changed. This is not possible with the fix to bug 38244.
Comment 3 Michael Meeks 2013-02-21 12:01:42 UTC
It seems to me that if I add an annotation to multiple paragraphs those paragraphs end up rendered grey: ie. the are rendered as a 'field' (the new field support emphatically allows arbitary content - even tables, images etc. AFAIR).

So ... my hope is that the infrastructure is there for creating and rendering multi-paragraph range comments - but of course, it prolly needs some more research & tweaking.
Comment 4 Miklos Vajna 2013-02-22 07:31:55 UTC
Agreed, I checked what's the situation with this, and it seems the document model handles multi-paragraph comments just fine, only layout does not. Of course, once layout handles it, we need to check filters as well, I only checked that docx export handles two paragraphs fine.

So yes, I plan to look into this.
Comment 5 Miklos Vajna 2013-03-27 11:09:14 UTC
For the reference, bug 60769 tracked the ODF filter part of this, I checked that ODF import and OOXML filters handle multi-para comments properly.
Comment 6 Commit Notification 2013-03-27 15:40:21 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

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

fdo#53442 SwTxtPaintInfo::_DrawBackBrush: color multi-para comment ranges



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 7 Miklos Vajna 2013-03-27 16:28:36 UTC
Created attachment 77112 [details]
trivial reproducer

Trivial reproducer, the first line of the comment was gray, not blue.
Comment 8 Miklos Vajna 2013-03-27 16:29:14 UTC
4-0 review: https://gerrit.libreoffice.org/3094
Comment 9 Commit Notification 2013-03-27 17:29: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=acd3b0da305fd6bf52a3d4cb6beb1d5702f68249&h=libreoffice-4-0

fdo#53442 SwTxtPaintInfo::_DrawBackBrush: color multi-para comment ranges


It will be available in LibreOffice 4.0.3.

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 10 manj_k 2013-04-09 14:51:10 UTC
*** Bug 61249 has been marked as a duplicate of this bug. ***
Comment 11 Gerry 2013-04-19 08:56:16 UTC
Added info on this to the 4.1 release notes: https://wiki.documentfoundation.org/ReleaseNotes/4.1#Writer Please cross-check.
Comment 12 Miklos Vajna 2013-04-19 16:06:09 UTC
Looks good, thanks!