Issue 62476 - Protected macro library does not accept Type definitions
Summary: Protected macro library does not accept Type definitions
Status: ACCEPTED
Alias: None
Product: App Dev
Classification: Unclassified
Component: api (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: All All
: P3 Trivial
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-23 14:20 UTC by pitounet
Modified: 2017-05-20 11:27 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
bugdoc (10.37 KB, application/vnd.oasis.opendocument.text)
2006-02-23 15:34 UTC, stephan.wunderlich
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description pitounet 2006-02-23 14:20:29 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.
Comment 1 stephan.wunderlich 2006-02-23 15:34:21 UTC
Created attachment 34407 [details]
bugdoc
Comment 2 stephan.wunderlich 2006-02-23 15:49:35 UTC
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
Comment 3 ab 2006-05-17 15:44:56 UTC
Probably ugly... STARTED
Comment 4 kai.sommerfeld 2006-06-15 15:05:00 UTC
.
Comment 5 Martin Hollmichel 2007-11-09 17:28:09 UTC
set target from 2.x to 3.x according to
http://wiki.services.openoffice.org/wiki/Target_3x
Comment 6 mroe 2012-07-08 21:16:57 UTC
This bug still occurs.
Comment 7 Marcus 2017-05-20 11:27:30 UTC
Reset assigne to the default "issues@openoffice.apache.org".