Date: prev next · Thread: first prev next last
2020 Archives by date, by thread · List index


Martin Pieuchot kirjoitti 17.2.2020 klo 18.21:
On 22/01/20(Wed) 17:38, Caolán McNamara wrote:
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.

It helped, thanks a lot !

Diff below implements scrollSubstringTo()'s SCROLL_ANYWHERE.  I'm
interested in comments and/or suggestions.

Please submit this to gerrit, so people can review it by the usual procedure. Thanks.

Ilmari

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.