[Libreoffice] Annoying cursor behavior on sw tables

Jan Holesovsky kendy at suse.cz
Wed Dec 29 05:37:31 PST 2010


Hi Octavio,

On 2010-12-23 at 21:07 -0800, Octavio Alvarez wrote:

> There is this really annoying behavior:
> 0. Open Writer.
> 1. Create a table, say 3 x 3.
> 2. Place the cursor in a cell.
> 3. Type some text, like asdfasdfasdfasdf.
> 4. Using the mouse, place the cursor in the middle of the asdf-word.
> 5. Using the keyboard go left and right and left and right...
[...]
> diff --git a/sw/source/core/crsr/crsrsh.cxx
> b/sw/source/core/crsr/crsrsh.cxx
> index 5b92560..cbf39f3 100644
> --- a/sw/source/core/crsr/crsrsh.cxx
> +++ b/sw/source/core/crsr/crsrsh.cxx
> @@ -344,7 +344,6 @@ BOOL SwCrsrShell::LeftRight( BOOL bLeft, USHORT nCnt,
> USHORT nMode,
>           if( IsTableMode() )
>               return bLeft ? GoPrevCell() : GoNextCell();
> 
> -    SwCallLink aLk( *this );        // Crsr-Moves ueberwachen, evt. Link
> callen
>           BOOL bRet = FALSE;
> 
>           // #i27615# Handle cursor in front of label.

Wow, great start!

> Of course, I don't have the slightest idea of what an "SwCallLink" is or
> does and what its side effects are.

Yes - that is core of the trouble; as usually, the class is not
documented, so the purpose is not really visible:

http://opengrok.go-oo.org/xref/writer/sw/source/core/crsr/callnk.hxx
http://opengrok.go-oo.org/xref/writer/sw/source/core/crsr/callnk.cxx

>From what I see, it does most of its work in a destructor, so this looks
like a kind of 'guard' that restores/updates stuff when the SwCallLink
instance is destructed.

Either way; I'd try to revert the callnk.cxx changes from commit
47472e8e70c1ae3dc55a5b00ef69eaa85f651a7f, it has something to do with
tables, and see if you still see the problem.  If not, then it might
limit the scope of your debugging to that commit only.

Hopefully I am not misleading you :-)

And Pascal - great work translating the comments there, thank you!

Regards,
Kendy



More information about the LibreOffice mailing list