<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        line-height:150%;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
.MsoPapDefault
        {mso-style-type:export-only;
        line-height:150%;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link="#0563C1" vlink="#954F72"><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;line-height:150%;font-family:"Calibri","sans-serif";color:#1F497D'>Hi,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;line-height:150%;font-family:"Calibri","sans-serif";color:#1F497D'>This is regarding <a href="https://www.libreoffice.org/bugzilla/show_bug.cgi?id=65404">this</a> bug that I've reported (I've attached a sample DOCX).<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;line-height:150%;font-family:"Calibri","sans-serif";color:#1F497D'>Apparently – MS Word has 2 types of background mechanisms for characters : Highlighting and Shading.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;line-height:150%;font-family:"Calibri","sans-serif";color:#1F497D'>In case both exist – the 'Highlighting' is what supersedes.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;line-height:150%;font-family:"Calibri","sans-serif";color:#1F497D'>However, both are stored in the DOCX file, so that if a user removes the highlighting – he should see the characters shaded.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;line-height:150%;font-family:"Calibri","sans-serif";color:#1F497D'>Here is an example of the XML:<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;line-height:150%;font-family:"Calibri","sans-serif";color:#1F497D'><img border=0 width=725 height=298 id="Picture_x0020_2" src="cid:image003.jpg@01CE75C0.4DBE2280"></span><span style='font-size:11.0pt;line-height:150%;font-family:"Calibri","sans-serif";color:#1F497D'><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;line-height:150%;font-family:"Calibri","sans-serif";color:#1F497D'>You can see the 'w:shd' and 'w:highlight' nodes.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;line-height:150%;font-family:"Calibri","sans-serif";color:#1F497D'>When LO imports this DOCX – it converts it all to a single 'Brush' for the characters (uses SvxBrushItem).<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;line-height:150%;font-family:"Calibri","sans-serif";color:#1F497D'><br>What is the best approach I should take if I want to support 'Character Highlighting' <b><u>with</u></b> 'Character Shading'?<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;line-height:150%;font-family:"Calibri","sans-serif";color:#1F497D'>Should each text portion have <b>two</b> brushes instead of <b>one</b>? One for 'Character Highlighting' and one for 'Character Shading'?<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;line-height:150%;font-family:"Calibri","sans-serif";color:#1F497D'>What are the implications of this (development-wise)?<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;line-height:150%;font-family:"Calibri","sans-serif";color:#1F497D'>Currently LO has only a single brush for characters…<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;line-height:150%;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;line-height:150%;font-family:"Calibri","sans-serif";color:#1F497D'>Thanks,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;line-height:150%;font-family:"Calibri","sans-serif";color:#1F497D'>Adam<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;line-height:150%;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p></div></body></html>