On Mon, 11 Apr 2016 09:00:06 -0700
"Dennis E. Hamilton" <dennis.hamil...@acm.org> wrote:

> > -----Original Message-----
> > From: Rory O'Farrell [mailto:ofarr...@iol.ie]
> > Sent: Monday, April 11, 2016 00:52
> > To: dev@openoffice.apache.org
> > Subject: Background colour for OO Comments
> > 
> > 
> > Comments applied to text in OpenOffice take different background colours
> > depending on the author of the comment.  Presumably OO makes some
> > analysis of the Author of the comment and modifies the background colour
> > applied to that comment in light of that analysis.  Would someone
> > familiar with the code kindly point me to the code for the mechanism, or
> > better still, quote the (hopefully small) section of code responsible?
> [orcmid] 
> 
> If you save the document and open it later, is the coloration preserved 
> consistently?

Coloration seems to be consistent on all my trial examples, going back (in 
earlier versions) about 18 months

> 
> If you make up a brief ODT that has multiple colorations, upload it as an 
> attachment on a bugzilla issue on the topic (feature request, I think) and we 
> can dig into the ODT to see whether there are any clues in the ODF, whether 
> settings or in the annotation data itself.  Oh, also include the colors you 
> see in case other viewers see them differently.  A screen shot along with the 
> document would be helpful.
> 
> The particular colors might not be preserved when different users view the 
> document, or even when you view it later yourself from time to time.  The 
> assignment of colors may be related to order of comments and you would want 
> to rule that out.

The colorations do not seem to be related to order of comments.  They seem to 
be related to the name of the OO User, perhaps derived by some algorithm from 
that. In the case of my extension, the categories are given by substitution of 
a pseudo User. In testing, if I forced a category to be my OO User name, the 
background colour was visually identical to a standard Comment.

It might not matter if the colorations changed from one installation to 
another, in the event that a file was being edited on multiple machines by 
multiple (collaborative) users, so long as each category/PseudoUser had a 
unique colour on that installation, as the purpose of the colour is to allow 
simple recognition of a class of comments.

A quick test just now on three linux (Xubuntu 15.10/16.04) computers and one 
Win XP computer showed that, by visual inspection on non colour calibrated 
monitors, the background colour on all comments (7 different categories) was 
consistent from installation to installation.
 
> Also, there are provisions in ODF for quite a bit of styling on annotations 
> (the comments), including in the paragraph text that is the body of the 
> comment itself.  It would take some experimentation to see what of those are 
> recognized (and preserved) by OpenOffice Writer and useful for your purposes.

As these Comments (I think I'm going to use a variation of Annotations) are 
using the underlying standard OO mechanism for Comments, I see no reason why 
they should not honour the supported styling for comments built into OO.  On my 
preliminary tests they do so, including the ability to insert a working 
hyperlink.

The initial extension offers the facility to mark a selection and attach the 
annotation to that selection.  It uses a Post-it yellow as selection marker.  
My thought was that if I could decide the colour OO would choose for the 
Comment (based on Category/PseudoUser), I might change the selection marker to 
match that. But without that, the extension is nearly functional - a little 
more tweaking and remove of tracing code needed.


Rory


> 
> > 
> > I am working on a modification to AnnotationTool extension
> > http://en.ooo-info.org/documentation/annotation_tool.html
> > to suit my document composition and revision methods.  I regularly flag
> > locations in a document with a Comment indicating the revision to be
> > applied there.  All such Comments have the same colour background which
> > means Comments for different purposes are all visually identical.
> > 
> > I am modifying the above extension so I can insert Comments into a
> > document, indicating what revision/review is required at that location
> > (selected from a small list of predefined choices, such as Check,
> > Revise, Source?, Date?...) and each comment in one of those predefined
> > choices shows in a different background colour, making review of them
> > very straightforward.  Knowledge of the mechanism for allocation of
> > background code to Comments may be helpful.
> > 
> > I hope to have a first release of this later this week.
> > 
> > 
> > Aside: I have noticed an anomaly in subscribing to the dev ML. I have
> > sent this message several times from my standard email account and it
> > has not come through to the dev ML, although my replies to queries on
> > the dev list come through immediately.  So I am hijacking an existing
> > thread (changing subject, of course) to see if this version of my query
> > will come through. Apologies for any duplication or odd threading.
> [orcmid] 
> 
> You hit the list just fine with this one.
> 
> Interesting.  I haven't seen any posts from you on this topic.  Are you using 
> one of the list readers or are you always using the list directly?
> > 
> > --
> > Rory O'Farrell <ofarr...@iol.ie>
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
> > For additional commands, e-mail: dev-h...@openoffice.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
> For additional commands, e-mail: dev-h...@openoffice.apache.org
> 
> 


-- 
Rory O'Farrell <ofarr...@iol.ie>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
For additional commands, e-mail: dev-h...@openoffice.apache.org

Reply via email to