Hi,

I _strongly_ recommend to not use any OOo version info, if anyhow applicable. If some version info needs to be used, it would be the right way to do this on a component level.

Technically, the bootstrap mechanism is designed in a way, that it could be used independent of OOo, while possibly providing access to all on a system installed components.

At the end OOo is only a collection of UNO components, which availability might vary. E.g. it may be possible in the future, that one only installs Base or Calc or Writer, without the other applications. Or even worse, one could have a OOo 3.0 Base and an OOo 4.0 Calc, still getting access to all these components via the bootstrap mechanism, rendering a global OOo version number questionable for programming tasks.


Kay



Marc Santhoff wrote:
Am Mi, den 06.04.2005 schrieb Mike Traum um 18:33:

My understanding is that when using the Bootstrap, you cannot detect
what version of OOo you're connected to.

So, what is the best practice when you're using services that have
been newly (or even not so newly) added to the api?

[...]

A long time ago (for Version 1.0.3) I wrote this macro (sorry for long
lines), which reads out a registry key showing the version number of
OOo. Maybe the key is located elsewhere now, but it shows the principle.
If you could tanslate this to java it would do the job.

Sub Main
        GlobalScope.BasicLibraries.LoadLibrary("Tools") ' for 
GetRegistryKeyContent
        
        Dim oProdNameAccess as Object
        Dim sProdName as String
        oProdNameAccess = GetRegistryKeyContent("org.openoffice.Setup/Product")
        
        sProdName = oProdNameAccess.getByName("ooName")
        sSetupVersion = oProdNameAccess.getByName("ooSetupVersion")
        sSetupExtension = oProdNameAccess.getByName("ooSetupExtension")
        msgbox sProdName + " : " + sSetupVersion + " : " + sSetupExtension

End Sub

HTH,
Marc



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to