ScriptForge - fix tdf#156836 Abort on MoveFirst()
The incident occurs when a move (last(),
first(), next()) within the form's resultset
is done from a Basic script immediately
after the opening of the document
containing the form.
The insertion of a
Wait 1
statement prevents the occurrence of
the incident by interrupting very shortly
the Basic process.
Change-Id: I5e798db6e3f9ffaeeef38fb9badd008cbb190d1f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155897
Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
Tested-by: Jenkins
diff --git a/wizards/source/sfdatabases/SF_Database.xba b/wizards/source/sfdatabases/SF_Database.xba
index f93cf55..109d4c5 100644
--- a/wizards/source/sfdatabases/SF_Database.xba
+++ b/wizards/source/sfdatabases/SF_Database.xba
@@ -455,6 +455,9 @@ Try:
Set oOpen = ScriptForge.SF_Services.CreateScriptService("SFDocuments.FormDocument", oNewForm)
' Prevent desynchonization when using .last(), .next() etc immediately after component loading. Bug #156836
Wait 1
Finally:
Set OpenFormDocument = oOpen
ScriptForge.SF_Utils._ExitFunction(cstThisSub)
diff --git a/wizards/source/sfdocuments/SF_Base.xba b/wizards/source/sfdocuments/SF_Base.xba
index efc8bfe..af1ebc1 100644
--- a/wizards/source/sfdocuments/SF_Base.xba
+++ b/wizards/source/sfdocuments/SF_Base.xba
@@ -505,6 +505,9 @@ Try:
Set oOpen = ScriptForge.SF_Services.CreateScriptService("SFDocuments.FormDocument", oNewForm)
' Prevent desynchonization when using .last(), .next() etc immediately after component loading. Bug #156836
Wait 1
Finally:
Set OpenFormDocument = oOpen
ScriptForge.SF_Utils._ExitFunction(cstThisSub)