https://bugs.freedesktop.org/show_bug.cgi?id=45020

Markus Mohrhard <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
         AssignedTo|[email protected] |markus.mohrhard@googlemail.
                   |desktop.org                 |com

--- Comment #6 from Markus Mohrhard <[email protected]> 2012-04-03 
19:58:17 PDT ---
(In reply to comment #5)
> It's a bug.  Hidden cells should always be treated as if they don't exist when
> expanding selection.
> 
> Having said that, this cursor navigation code has become such a complex 
> monster
> we need to refactor it so that we can guard it with a decent amount of unit
> tests.  Otherwise it would be extremely hard to avoid introducing another
> regression when fixing a bug (any bug) in this code.  I believe we talked 
> about
> this briefly before when we were talking about some unit test areas (with me,
> you and Eike).

I remember something like that now. I'm just getting a bit old and start
forgetting things ;)

I agree that this would need a real unit test and I think we can easily write
one for that. I will look into it. I think in this case it even makes a lot of
sense to write the tests now before actually implementing the code.

I fear that this code is not testable by ucalc because it needs vcl and the
view part of sc. So our best shot on testing this is writing a real unit test.
We should get a good test for this by mocking ScDocument (at least a part) and
moving as much functionality for this behavior into an own class that has only
dependencies to ScDocument.

> 
> When expanding selection or navigating the cell cursor, we need to factor in:
> 
> 1) hidden rows/columns
> 2) protected areas
> 3) merged cells
> 4) modifier keys (shift / ctrl / both)
> 
> So, one has to check all these possibilities when modifying the cursor
> navigation code.  And from my own experience it's way too easy to introduce
> regressions in this code...

I suspect i will have a lot of fun with this.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to