Hi,
I'm using services from this module in a dialog, in order to allow the user to
select a basic Library
1)
The first question is about the IDL docu:
--------------------------------------
constants group BrowseNodeFactoryViewTypes
Usage Restrictions
not published **** OK I've read it :-)
Description
These constants define the *three* different types of views available from
BrowseNodeFactory.
Constants
MACROSELECTOR Indicates view is a script selector
MACROORGANIZER Indicates view is script organizer
--------------------------------------
As you can see the docu speaks of three types of view but there are only two
values.
Is a typo or there is really another view type?
2)
Running the following code:
oMaster = oBrowseNodeFactory.createView(iViewType).ChildNodes(0)
oMaster.getElementNames()
raises an error:
"getElementNames not implemented!!!!!"
why ?
3)
I'm using the BrowseNodeFactory to fill some listboxes in order to allow the
user to select a basic library to export.
(below you can find a code example, just to give the idea)
So let's suppose that, at the end of the story, I get a BrowseNode that
corresponds to an arbitrary basic library
How do I get the corresponding com.sun.star.script.XLibraryContainerExport ?
Is there a "safe & elegant" way to do this ? or do I need to loop through the
various components looking for the matching library ?
thank you
Paolo Mantovani
REM ***** BASIC *****
Sub ListBasicLibraries()
oBrowseNodeFactory =
GetDefaultContext.getValueByName("/singletons/com.sun.star.script.browse.theBrowseNodeFactory")
iViewType =
com.sun.star.script.browse.BrowseNodeFactoryViewTypes.MACROORGANIZER
aMasterProviders() =
oBrowseNodeFactory.createView(iViewType).ChildNodes()
For Each oMasterProvider in aMasterProviders()
For Each oLanguageProvider In oMasterProvider.ChildNodes()
If HasUnoInterfaces(oLanguageProvider,
"com.sun.star.lang.XServiceInfo")
Then
If
oLanguageProvider.SupportsService("com.sun.star.script.provider.ScriptProviderForBasic")
Then
sList = ""
For Each oBasicLibNode In
oLanguageProvider.ChildNodes()
sList = sList & Chr(9) &
oBasicLibNode.Name & Chr(10)
Next
MsgBox oMasterProvider.Name & Chr(10) &
sList
End if
End if
Next oLanguageProvider
Next oMasterProvider
End Sub
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]