EditView, EditEngine

Dante Doménech dante19031999 at gmail.com
Fri Jan 15 21:16:30 UTC 2021


Thank you. I'll give it a try.

El vie, 15 ene 2021 a las 10:20, Caolán McNamara (<caolanm at redhat.com>)
escribió:

> On Fri, 2021-01-15 at 00:02 +0100, Dante Doménech wrote:
> > Hello.
> > LO math uses EditView, EditEngine for the editing box (that box where
> > you write the formula). The questions are:
> > - How can I change the text color of a substr?
> > - How can I change the text background color of a substr?
> > - How can I change the text size of a substr?
>
> You can do this through the EditEngine, e.g.
>
> // setting the text color for a range in EditEngine
> ESelection aSel(nStartPara, nStartChar, nEndPara, nEndChar);
> SfxItemSet aSet(mpEditEngine->GetEmptyItemSet());
> aSet.Put(SvxColorItem(nColor, EE_CHAR_COLOR));
> pEditEngine->QuickSetAttribs(aSet, aSel);
>
> // for background color
> SvxBackgroundColorItem(..., EE_CHAR_BKGCOLOR);
>
> // for the three font category sizes
> SvxFontHeightItem(..., EE_CHAR_FONTHEIGHT));
> SvxFontHeightItem(..., EE_CHAR_FONTHEIGHT_CJK));
> SvxFontHeightItem(..., EE_CHAR_FONTHEIGHT_CTL));
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice/attachments/20210115/99079b46/attachment.htm>


More information about the LibreOffice mailing list