Bug 118418 - Scrolling API?

Caolán McNamara caolanm at redhat.com
Wed Jan 22 17:38:33 UTC 2020


On Mon, 2019-12-16 at 13:10 +0100, Martin Pieuchot wrote:
> I'm looking for help/explanation about the coordinate system and
> scrolling API to use in `SwAccessibleParagraph'.
> 
> I'm currently working on bug #118418 [1], trying to implement
> scrollSubstringTo() and scrollSubstringToPoint() like I did for
> gtk [2] and evince [3].
> 
> The diff below clearly shows that I don't know how to translate a
> character index to coordinates that can be feed to Window's Scroll().
> 
> So here are my questions:
> 
> - Is calling getWindow()'s Scroll() the correct way to realize the
>   scrolling.  If so, the code below doesn't correctly refresh all the
>   text, so what am I missing?
> 
> - What API should I use to convert the coordinates?

I don't know for sure the correct answer, but I feel that for writer
ScrollMDI might be your friend here and that the code should look
something like the attached SwAccessibleParagraph::scrollToPosition
demo. I haven't tested or checked further if its the right approach but
maybe that helps.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-wip-demo-how-I-think-ScrollMDI-could-be-used-here.patch
Type: text/x-patch
Size: 1507 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/libreoffice/attachments/20200122/c15452c5/attachment.bin>


More information about the LibreOffice mailing list