Apache OpenOffice (AOO) Bugzilla – Issue 62476
Protected macro library does not accept Type definitions
Last modified: 2017-05-20 11:27:30 UTC
Investigating on errors I get a protected library, I found that the type I defined in it was provoking errors during macros execution whereas it was fine if library is not protected. --> I need to declare my Type and its access function in a not protected library Here is the code of a single module protected library which shows the problem: Type Test test1 as Variant End Type 'Public toto as New Test 'protected library is not usable anymore 'Public toto(1) as Test 'protected library is not usable anymore 'Public toto as Test 'protected library is not usable anymore once using toto ' Problem linked to http://www.openoffice.org/issues/show_bug.cgi?id=52057 ??? Sub ProtectMsg Dim toto toto = CreateTest() MsgBox("You are using a protected library") toto.test1 = "Test" MsgBox(toto.test1) End Sub Function CreateTest() Dim newTest as Test newTest.test1 = """ CreateTest = newTest End Function And the code in the document standar library which call it: 'Test the ability in OOo to use libraries protected by password Sub TestProtectedLib BasicLibraries.LoadLibrary("Protected") 'Call a procedure from the protected library ProtectMsg() End Sub Antoine.
Created attachment 34407 [details] bugdoc
sw->ab: just open the attached bugdoc and press the button on it => a message box "Object variable not set is thrown" ... after opening the library protected once in the basic ide, the macro works properly
Probably ugly... STARTED
.
set target from 2.x to 3.x according to http://wiki.services.openoffice.org/wiki/Target_3x
This bug still occurs.
Reset assigne to the default "issues@openoffice.apache.org".