[Libreoffice-ux-advise] Discussion about highlighting (MS compatibility issue)

Zolnai Tamás zolnaitamas2000 at gmail.com
Wed Feb 11 06:43:11 PST 2015

2015-02-10 17:29 GMT+01:00 Michael Stahl <mstahl at redhat.com>:
> On 10.02.2015 15:12, Zolnai Tamás wrote:
>> Second thing, I compared these three kind of character backgrounds and
>> found that LO's character
>> background is closer to MS shading attribute then to MS highlighting, because:
>> - LO's background color is a general attribute for different objects
>> like text range, paragraph, frame, page, cell and so on, and character
>> background is a specialization of it (like shading).
>> - LO's background color and MS shading both has more color to choose
>> from, while MS highlighting allows only 16 colors.
>> - LO's background color and MS shading has a meaning like "fill the
>> selected object's background with a color", while highlight has the
>> meaning like "highlight a text range with a highlighter pen".
>> So IMHO LO background color should be exported as shading to MS file
>> formats and not as highlighting.
>> Only similarity between LO's background color and MS highlighting is
>> the "Highlighting" toolbar button and this is the
>> problem here. Why LO uses an other name for character background on
>> the toolbar and why not use exactly the same
>> name (e.g. as in the menu)? This causes the misconceptions we have here.
> i agree that having 2 different ways to do almost but not exactly the
> same thing in the UI is confusing.
>> So my new plan is:
>> - Remove "Highlighting" toolbar button
>> - Replace it with the existing "Background color" toolbar button (set
>> it as default)
>> - Extend the functionality of this "Background color" button to be
>> able to set character background too (By now it is used for setting
>> paragraph, frame and cell background)
>> With that the toolbar icon of LO's character background will be
>> similar to that which is used in Word for setting MS shading attribute
>> (a paintbucket). This also means we don't need to support highlighting
>> in LO to solve this interoperability problem.
>> With respect to RES_CHRATR_HIGHLIGHT attribute it's still useful to
>> store MS highlighting on a separate attribute so an MS file won't
>> loose shading/highlighting information during a round trip. We can
>> solve that on a transparent way, so the users won't know that we have
>> two kind of character backgrounds behind the scenes.
> actually - why do we need 2 core attributes for this?  if you apply both
> "highlight" and "shading" in Word, one should override the other
> completely in the document view, or how does it work?  can't we just in
> the import filter convert both to the same core item, and if both apply
> to the same text range, then only apply the "higher priority" one?  then
> export it again as the attribute that allows more colors :)

In Word when both shading and highlighting is set to the same text
range, then highlighting covers shading, but
when highlighting is removed later then the shading "under" the
highlighting becomes visible. I can imagine this like
shading is a static part of the document while highlighting is set
temporarily (similar to the comments highlighting).

Other difference between these two attributes in Word is that shading
has effect on automatic font color (automatic
font color is a feature of MS Word which makes the actual font color
changing according to the background color, dark/light background ->
white/black font color), but highlighting has no such interaction with
it. So using only one background
attribute and so convert both shading and highlighting into one
attribute (shading or highlighting) during a round trip can
lead also to font color change (opening in Word).

So I think it's a good idea to handle both attribute separately.

Best Regards,

More information about the Libreoffice-ux-advise mailing list