Batch document updates and UI refreshes

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

Batch document updates and UI refreshes

I am modifying many properties of document styles, using the
XPropertySet interface, that means that there are many consecutive calls
to setPropertyValue(), and that generate some bliking on the document
while changes are being made.

Is there a way to run document modifications inside a block of code
where documents visual updates are delayed to the end of the block? or
what is the best way to make document updates in one go, without
triggering temporary events?.

Thanks in advance
_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice
Michael Stahl-2 Michael Stahl-2
Reply | Threaded
Open this post in threaded view
|

Re: Batch document updates and UI refreshes

On 12.03.2018 18:31, Robert Marcano wrote:
> I am modifying many properties of document styles, using the
> XPropertySet interface, that means that there are many consecutive calls
> to setPropertyValue(), and that generate some bliking on the document
> while changes are being made.
>
> Is there a way to run document modifications inside a block of code
> where documents visual updates are delayed to the end of the block? or
> what is the best way to make document updates in one go, without
> triggering temporary events?.

try XModel::lockControllers/unlockControllers, it should delay the view
update until unlock.
_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice
Robert Marcano Robert Marcano
Reply | Threaded
Open this post in threaded view
|

Re: Batch document updates and UI refreshes

On 03/13/2018 04:15 PM, Michael Stahl wrote:

> On 12.03.2018 18:31, Robert Marcano wrote:
>> I am modifying many properties of document styles, using the
>> XPropertySet interface, that means that there are many consecutive calls
>> to setPropertyValue(), and that generate some bliking on the document
>> while changes are being made.
>>
>> Is there a way to run document modifications inside a block of code
>> where documents visual updates are delayed to the end of the block? or
>> what is the best way to make document updates in one go, without
>> triggering temporary events?.
>
> try XModel::lockControllers/unlockControllers, it should delay the view
> update until unlock.
>

Thank you very much, worked perfectly. It avoided some redrawing
artifacts too when all margins are being changed when not using
XModel::lockControllers/unlockControllers
_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice