Issue with Writer Basic

Michael Stahl mstahl at redhat.com
Mon Jun 1 08:41:13 PDT 2015


On 19.05.2015 14:08, Edgar Holst wrote:
> To generate bookmarks, making checks, ..., we are scrolling with Basic
> through the whole document. To protect the visible scrolling and speed
> up the process of checking, we are using the Basic function
> "ThisComponent.lockControllers" and at the end of checking
> "ThisComponent.unlockControllers".
> And here is the Problem. If the document grow up, let me say about 10
> and more pages, pages get lost and information in cells can't be
> checked. If we don't use "lock/unlockControllers" everything works fine,
> but it slow down the process extremly. And if the document has up to 100
> and more pages, "You know what User's say to me, ..."

do you use the document's XTextViewCursor?  it could be faster to create
a new XTextCursor from the document and use that; it would avoid visibly
scrolling the document around at least, even without lockControllers.

you can create a new cursor with

 ThisComponent.getText().createTextCursor()

that said i wouldn't know how much of the slowdown is due to using the
view cursor instead of a plain text cursor, and how much is due to
re-layouting after every modification of the document, which can only be
avoided with lockControllers.



More information about the LibreOffice mailing list