Hi Oliver,

> Is it correct, that "oDatabaseContext.getElementNames()" will return the 
> displayed name
> (shown in database brwoser)  and not the "registered Name" shown in Tools - 
> Options ?
> 
> for example the macro below will return "My Database", not "mydatabase"
> 
> <node oor:name="RegisteredNames">
>       <node oor:name="My Database" oor:op="replace">
>               <prop oor:name="Location" oor:type="xs:string">
>                       <value>file:///X:/MyDatabase.odb</value>
>               </prop>
>               <prop oor:name="Name" oor:type="xs:string">
>                       <value>mydatabase</value>
>               </prop>
>       </node>
> </node>

The code for this happen[s/ed] to be a little ... inconsistent. When the
config data is created by OOo itself, then the node name and the
property value are identical. When reading the data, the node name is
taken as registration name. Strictly, this is wrong, of course, but it's
noticed only when the node name and the prop value are not identical.

On the DEV300 code line, this has been fixed - now the property value is
taken as registration name, the node name can be an arbitrary logical
name (preferably something like "org.<something>" to ensure uniqueness).

In addition, an interface css.sdb.XDatabaseRegistrations [1] has been
introduced, which hides the configuration data from you, so there is no
need to tamper with it directly (The exception would be an extension
bringing its own configuration data with it, but even here, an on-demand
registration using XDatabaseRegistrations and the new XDeploymentHook
would be possible).

Ciao
Frank

[1]http://hg.services.openoffice.org/DEV300/file/1467f46f8817/offapi/com/sun/star/sdb/XDatabaseRegistrations.idl

-- 
- Frank Schönheit, Software Engineer         [email protected] -
- Sun Microsystems                      http://www.sun.com/staroffice -
- OpenOffice.org Base                       http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to