Issue 22742 - script::XStarBasicLibraryInfo::getModuleContainer() does not work
Summary: script::XStarBasicLibraryInfo::getModuleContainer() does not work
Status: CLOSED WONT_FIX
Alias: None
Product: App Dev
Classification: Unclassified
Component: api (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: PC Linux, all
: P3 Trivial
Target Milestone: ---
Assignee: ab
QA Contact: issues@api
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-11-22 22:19 UTC by em2
Modified: 2013-02-24 21:07 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description em2 2003-11-22 22:19:16 UTC
(Yes, com::sun::star::script::XStarBasicLibraryInfo is deprecated, but
there seems to be no other way to access the macros from C++.)

The problem:
com::sun::star::script::XStarBasicLibraryInfo::getModuleContainer()
returns an empty container for password-protected libraries.

Therefore, seems to be impossible to access password-protected
modules from C++.

In particular, it's impossible to write an export filter which saves
password-protected libraries.
Comment 1 ooo 2003-12-10 12:25:00 UTC
forwarding to responsible developer
Comment 2 ab 2004-01-16 11:35:18 UTC
AB->EM2: There is a way to access Basic macro inside a document. Try:

Sub Main
	msgbox ThisComponent.BasicLibraries.dbg_methods
End Sub

The component's BasicLibraries property returns an object implementing
the interfaces com.sun.star.script.XLibraryContainer/XLibraryContainer2/
XLibraryContainerPassword. These interfaces are documented in the IDL
documentation. Using these interfaces you can access the modules contai-
ned in the library by using the methods of XNameAccess where XLibraryCon-
tainer is derived from. And you can use XLibraryContainerPassword::veri-
fyLibraryPassword() to set the password and extract the source code af-
terwards. Of course it is not possible to get the source code without
knowing the password because otherwise the API could be use to easily
get information that is intendend to be password protected. -> WONTFIX
Comment 3 ab 2005-01-25 15:42:11 UTC
-> Closed
Comment 4 comtelicon 2010-11-10 16:08:18 UTC
Created attachment 73091