<div dir="ltr">Thank you. I'll give it a try.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">El vie, 15 ene 2021 a las 10:20, Caolán McNamara (<<a href="mailto:caolanm@redhat.com">caolanm@redhat.com</a>>) escribió:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Fri, 2021-01-15 at 00:02 +0100, Dante Doménech wrote:<br>
> Hello.<br>
> LO math uses EditView, EditEngine for the editing box (that box where<br>
> you write the formula). The questions are:<br>
> - How can I change the text color of a substr?<br>
> - How can I change the text background color of a substr?<br>
> - How can I change the text size of a substr?<br>
<br>
You can do this through the EditEngine, e.g.<br>
<br>
// setting the text color for a range in EditEngine<br>
ESelection aSel(nStartPara, nStartChar, nEndPara, nEndChar);<br>
SfxItemSet aSet(mpEditEngine->GetEmptyItemSet());<br>
aSet.Put(SvxColorItem(nColor, EE_CHAR_COLOR));<br>
pEditEngine->QuickSetAttribs(aSet, aSel);<br>
<br>
// for background color<br>
SvxBackgroundColorItem(..., EE_CHAR_BKGCOLOR);<br>
<br>
// for the three font category sizes<br>
SvxFontHeightItem(..., EE_CHAR_FONTHEIGHT));<br>
SvxFontHeightItem(..., EE_CHAR_FONTHEIGHT_CJK));<br>
SvxFontHeightItem(..., EE_CHAR_FONTHEIGHT_CTL));<br>
<br>
<br>
</blockquote></div>