Apache OpenOffice (AOO) Bugzilla – Issue 94980
error using LoadDialog from "Tools" Library
Last modified: 2013-02-24 21:01:17 UTC
Hi, i noticed a bug in OO 3.0 final: Executing a dialog using LoadLibrary() will end in an error. Dialog is opened, but can't be closed with 'ok' button. Closing dialog with "X" will display an error message. Copying the LoadLibrary() code to the document's basic library will not cause the error ... OO 1.1.5 and OO 2.4.1 are not affected at all. I will send an attachment. Oliver REM ***** BASIC ***** Option Explicit Dim oDlg as Object Sub Main GlobalScope.BasicLibraries.LoadLibrary("Tools") oDlg = LoadDialog("Standard", "Dialog1", DialogLibraries) oDlg.Execute() End Sub Sub click_ok oDlg.EndExecute() MsgBox "ok clicked ..." End Sub
Created attachment 57153 [details] loadlibrary bug
it is of course LoadDialog() ...
I can confirm this error. The code/dialog combination does work when placed in a global library. Also ... this works from the document macro container without error: GlobalScope.BasicLibraries.LoadLibrary("Tools") 'oDlg = LoadDialog("Standard", "Dialog1", DialogLibraries) DialogLibraries.LoadLibrary("Standard") oDlg = CreateUnoDialog(DialogLibraries.Standard.Dialog1) oDlg.Execute() Can you pls test that?
Executed the macro in the test document using 3.0 Final under Ubuntu 8.04. It appears to me that the problem is not with LoadDialog at all - rather it is with the syntax used for 'When initializing' event on the button control. In the test document the old style naming convention is used: document:Standard.Module1.click_ok if I replace this with the new style: vnd.sun.star.script:Standard.Module1.click_ok?language=Basic&location=document then everything works as one would expect under 3.0 I then tried the bug doc (the old naming) using the Ubuntu supplied OOo 2.4.1 and also experienced the problems you describe here - but again, a change to the new naming convention puts everything right, with 2.4.1.
> I then tried the bug doc (the old naming) using the Ubuntu > supplied OOo 2.4.1 and also experienced the problems you describe > here - but again, a change to the >new naming convention puts everything right, with 2.4.1. i just tried with OO 2.4.1 on XP and Vista, and have no problems with the attached *.sxw ...
fs->ab: Seems to be a problem with BasicScriptListener_Impl::firing_impl not finding the document's StarBASIC instance. Nominating as stopper issue for 3.0.1, adding "regression" keyword.
CC me, to me for verification when fixed.
FIXED
ab->jsk: Please verify
Verified
can one please give me a hint which dev build will contain the bugfix ? thanks Oliver
brinzing: OOO300_m12
fixed - can confirm also fixed in ooodev31 m36 :-)
Closing, thanks for the help.