Bug 90600 - Working StarBasic macro fails after reloading the document
Summary: Working StarBasic macro fails after reloading the document
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
4.4.2.2 release
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Macro-UNOAPI
  Show dependency treegraph
 
Reported: 2015-04-13 22:30 UTC by Andreas Säger
Modified: 2022-07-13 14:35 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
macro (127.48 KB, application/x-vnd.oasis.opendocument.spreadsheet)
2015-04-14 05:20 UTC, raal
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Säger 2015-04-13 22:30:31 UTC
See issue https://bugs.documentfoundation.org/show_bug.cgi?id=90580 with a detailed desctription and 2 attachments. First I thought that this is a VBA issue because the macro works after I transferring it into a StarBasic library. But then I realized that after reloading the StarBasic macro in the StarBasic library fails in the same way as the same StarBasic macro in the VBA library.
Works as expected in OpenOffice.
Comment 1 raal 2015-04-14 05:20:14 UTC
Created attachment 114772 [details]
macro

steps:
-- Copy the sheets to a new document - from bug 90580
-- Create a library LibFilter and copy the modules into this library.
-- Create a database range "List" and a named range Todays_Weekday pointing to Criteria.A1:A2
-- The filter macro works as intended
-- The filter macro fails after reloading the new document (close, reopen)

The left button applies a filter based on today's English weekday name. Unfortunately, it hides all columns.
Menu:Data>Refresh refreshes the range with the intended filter.
Refreshing the range by means of an extra line of Basic code oDBR.refresh() does nothing.

steps
- open attached file
- click button "Todays Weekday"
- data disappear
- Menu:Data>Refresh
- data appear
Comment 2 raal 2015-04-14 05:24:38 UTC
setting to new. I can confirm with LO 4.4.2, win7
Comment 3 QA Administrators 2016-09-20 10:14:14 UTC Comment hidden (obsolete)
Comment 4 Julien Nabet 2016-10-18 17:19:53 UTC
On pc Debian x86-64 with master sources updated today, Data/Refresh is disabled.
Comment 5 QA Administrators 2017-10-23 13:58:02 UTC Comment hidden (obsolete)
Comment 6 Andreas Säger 2019-04-21 17:33:51 UTC
I confirm that the issue is still the same with my latest version 6.2.0.3. The macro works with a newly created document and it fails after save and reload.
When the filter macro fails it hides away all rows of database "List". You have to do a manual refresh to show the correct filter result. A programmatical refresh does nothing. With AOO the same document macro hides the intended rows without any refresh action.
Comment 7 QA Administrators 2021-09-19 03:45:44 UTC Comment hidden (obsolete)
Comment 8 Andreas Säger 2022-07-13 12:06:19 UTC
I can not reproduce this anymore with LO 7.3.4.
Comment 9 Timur 2022-07-13 14:35:29 UTC
I didn't test but closing per reporter's test.