Why does svtools::EditBrowseBox::IsCursorMoveAllowed paint?

Lionel Elie Mamane lionel at mamane.lu
Wed Jul 18 10:48:43 PDT 2012


Hi,

Has anybody any clue why svtools::EditBrowseBox::IsCursorMoveAllowed
needs to call rWindow.Paint()? It causes some pretty stupid behaviour
in base, namely:

1) Open a big table (hundreds of rows)
2) Only the first 40 to 100 rows are fetched into the cache and shown
   (depending on screen / window size).
3) Move to last row (click on icon |>|)
4) The last 40 to 100 rows are fetched into the cache; the data of the
   first 40/100 rows is pushed out of the cache.
5) The first 40 to 100 rows are fetched, just so that the call to
   rWindow.Paint() can do its job, because they are not in the cache
   anymore (!). The last 40/100 rows are pushed out of the cache.
6) The last 40 to 100 rows are fetched into the cache and displayed;
   the first 40/100 rows are pushed out of the cache *again*.

Steps 5 and 6 are obviously *very* stupid.

If I apply the attached patch, things get faster in Base (the
procedure stops at step 4), but have I broken something else? I don't
really have a clue.

This function, by name, looks like a purely "informative" function,
that shouldn't really have any side effect, but it seems like it has
several :-(

-- 
Lionel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-why-the-hell-does-this-need-to-paint.patch
Type: text/x-diff
Size: 1749 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20120718/541f5162/attachment.patch>


More information about the LibreOffice mailing list