[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice-devel
Subject:    Re: KSpread bug (was Re: KOffice-1.2 release schedule)
From:       Philipp =?iso-8859-1?q?M=FCller?= <philipp.mueller () gmx ! de>
Date:       2002-03-21 21:05:46
[Download RAW message or body]

Am Mittwoch, 20. März 2002 21:38 schrieb Ariya Hidayat:
> > In any other case, I will only stick to the long list of open bug
> > reports.
>
> Perhaps you can take a look at bug #30051
> (http://bugs.kde.org/db/30/30051.html). The problem itself has been
> addressed by Daniel long time ago. Apparently Ctrl+Down is not a problem
> anymore, but now Ctrl+Right is !

Okay,
I hacked it in cvs now. No performance problem anymore.
But the reason for the performance problem lies in the function 
KSpreadTable::cellAt(). This function is overloaded:

One time it's called with 2 parameters (x,y) and returns a const *KSpreadCell. 
The function you normally want to use.

The other time it has 3 parameter (x,y,bool) and returns a normal 
*KSpreadCell. The third parameter is a boolean, which is there to define if 
the scrollbars should be updated or not.
This third parameter has the default to update!!!.

In the function we use in the ctrl-cursor case:
	activeTable()->cellAt(x, y)->isEmpty()
we search in loops for empty fields. But it doesn't use the 2 parameter 
function (as expected), it uses the 3 parameter one (which then updates on 
each iteration the scrollbar).

I asume this is because of the const, but I'm not that experienced in this 
case to be able to fix or change it.

So my current fix/hack is to use it this way:
	activeTable()->cellAt(x, y,true)->isEmpty()
As when the third parameter is true, it doesn't update the scrollbar.

To really fix it, we should either use the 2 parameter function (how to 
enforce this?) or make the third parameter default to not update (which may 
introduce bigger changes, as this function is used everywhere).
Can someone help/give hints here? Laurent?

I write this to the list, because I assume most of the performance issues 
mentioned in the bug reports/here on the list are due to this issue.

The ctrl-cursor now works (and yes I know of the strange results at the 2^15 
row/column). But the bugreport can be closed now.

Philipp


_______________________________________________
koffice-devel mailing list
koffice-devel@mail.kde.org
http://mail.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic