About ESelection

Caolán McNamara caolanm at redhat.com
Tue Jan 19 20:46:17 UTC 2021


On Tue, 2021-01-19 at 14:10 +0100, Dante Doménech wrote:
> The ESselection has this form in opengrok:
> ESelection( sal_Int32 nStPara, sal_Int32 nStPos,
> 120                  sal_Int32 nEPara, sal_Int32 nEPos )
> 121          : nStartPara( nStPara )
> 122          , nStartPos( nStPos )
> 123          , nEndPara( nEPara )
> 124          , nEndPos( nEPos )
> 125          { }
> 
> However there's no documentation about what each field is.
> Does someone know?

An EditEngine can have multiple paragraphs in it, nStartPara and
nEndPara are just the paragraphs the selection starts and ends in and
nStartPos and nEndPos are the character offset of the selection within
the start and end paras, so with an EditEngine of just one paragraph
with text "fooXbar" an ESelection of (0, 3, 0, 4) selection denotes the
selection of "X".



More information about the LibreOffice mailing list