Bug 93944 - gotoStart does not work in a writer document starting with table
Summary: gotoStart does not work in a writer document starting with table
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
4.4.5.2 release
Hardware: Other Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-05 16:34 UTC by espinosa_cz
Modified: 2015-09-05 18:49 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description espinosa_cz 2015-09-05 16:34:39 UTC
Hi,
Please, could you help?

Calling gotoStart() on a cursor, text cursor or view cursor, does not work when a text table is at the very start of a text document.

Example macro:

Sub jumpToStart()
   dim vc   
   vc = ThisComponent.getCurrentController().getViewCursor()
   vc.gotoStart(true)
End Sub

If any text (but not hidden!) is placed in front of the table, cursor moving and selection stretching works.

All details in the forum.
https://forum.openoffice.org/en/forum/viewtopic.php?f=20&t=79065
Sample document to reproduce is attached in the forum.

How to reproduce:
 * Open the attached document
 * Place cursor somewhere in the middle of the document.
 * There is "Macro" a custom item added to main app menu, go there and click "jumToStart" which calls the simple macro show above.

Now add any text above the first table and hit 'jumToStart' again. Now it works as expected! You should see "blue" selected area from where you initially had cursor spanning to the page top, including the text in table(s).

This is quite serious as it affects scripts like full content copy script I recently published in snipplets: https://forum.openoffice.org/en/forum/viewtopic.php?f=21&t=78814
Well, it affects its general usability.

Affected versions:
Writer LibreOffice 4.5 (latest)
Writer AOO 4.1.1 (lates)
Comment 1 Cor Nouws 2015-09-05 18:49:06 UTC
Hi espinoza,

Thanks for taking effort to write about this problem.
Basically ( ;) ) you see the same behaviour as if you work in your document with the key board.

You can work with the TextTables (thiscomponent.TextTables) that represent a different context.
Or you could do jumpToFirstPage and jumpToStartOfPage ..

But in general, please go to 
  http://www.libreoffice.org/get-help/community-support/
to find support.

I hope it's OK for you if I set this as WorksForMe...
Regards,
Cor