Function to scroll to a certain position

classic Classic list List threaded Threaded
3 messages Options
jan-3 jan-3
Reply | Threaded
Open this post in threaded view
|

Function to scroll to a certain position

Hello Libreoffice Devs,

I’m looking for a function to scroll to a certain (cursor?) position in
a Writer Document and could not find it yet.


What I already did:

- Reading the UNO API docs (it is probably in there, but I did not find it)
- Looked at https://github.com/XRoemer/Organon source, which certainly
has such a function, but I was not able to locate it, either.

Dos anybody know how to jump to a position (ideally with an example for it)?

Kind Regards,
 Jan
_________________

PS.: I am new to the list and extensions dev, so my questions may be a
bit noob-ish. I’m UX desiger/researcher and code in Python and
Javascript (and a bit R, but that does not bind to UNO).

PPS: What this is for:
I’d like to write an extension which allows to jump to positions in a
document where a certain character+[some text] appears – like a #hashtag.
The extensions purpose would be easing the tagging (also called
"coding") of text snippets by providing an overview where such tags (in
for of a "hashtag" are set. In the document, it would look like:

  Participant 1: "I love working with libreoffice and zotero" #love
#extension #bibliography

The extension would list the quote and the tag (in the sidebar,
probably) and would allow to jump to its position on click (like in a
list of search results).
_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice
Heiko Tietze-2 Heiko Tietze-2
Reply | Threaded
Open this post in threaded view
|

Re: Function to scroll to a certain position

How about using bookmarks? Insert > bookmark... adds a node to the Navigator (F5) under bookmarks. Might be easier to handle than cursor positions. Unfortunately I cannot help with actual code ;-).

On 03/04/2017 10:21 PM, jan wrote:
> I’m looking for a function to scroll to a certain (cursor?) position in
> a Writer Document and could not find it yet.


_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice

signature.asc (499 bytes) Download Attachment
jan-3 jan-3
Reply | Threaded
Open this post in threaded view
|

Re: Function to scroll to a certain position

Am 04.03.2017 um 22:45 schrieb Heiko Tietze:
> How about using bookmarks? Insert > bookmark... adds a node to the Navigator (F5) under bookmarks. Might be easier to handle than cursor positions. Unfortunately I cannot help with actual code ;-).
>
> On 03/04/2017 10:21 PM, jan wrote:
>> I’m looking for a function to scroll to a certain (cursor?) position in
>> a Writer Document and could not find it yet.

Yes, I also had this idea – it is most likely to be much easier to add
the bookmarks than writing some own abstraction of a similar function.
On the other hand, UX wise it is nice if I could control the scrolling
(and other functionality) instead of misusing (?) build in functions.

(On the other hand, qualitative data analysis with a text processor is a
hack already, though a pretty established one ;) )

Jan

_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice