* is destroyed.<p>
* Has OK status if some info was written into registry.
*/
public void _writeRegistryInfo() {
XRegistryKey key ;
XSimpleRegistry xReg = null ;
String tmpDir = util.utils.getOfficeTempDir((XMultiServiceFactory)tParam.getMSF());
try {
xReg = RegistryTools.createRegistryService
((XMultiServiceFactory)tParam.getMSF()) ;
xReg.open(tmpDir + "XImpLoader_tmp.rdb", false, true) ;
key = xReg.getRootKey() ;
} catch (com.sun.star.uno.Exception e) {
log.println("Can not create registry for writing") ;
e.printStackTrace(log) ;
tRes.tested("writeRegistryInfo()", false) ;
return ;
}
boolean rc ;
try {
rc = oObj.writeRegistryInfo(key, implLoader, implUrl) ;
} catch (CannotRegisterImplementationException e) {
throw new StatusException("Can not register implementation", e) ;
}
if (rc == false)
log.println("Method returned false value") ;
String[] keys ;
try {
keys = key.getKeyNames() ;
} catch (com.sun.star.uno.Exception e) {
log.println("Error retrieving key names from registry") ;
tRes.tested("writeRegistryInfo()", false) ;
return ;
}
// destroying registry file
try {
xReg.close() ;
xReg.destroy() ;
} catch (com.sun.star.registry.InvalidRegistryException e) {
log.println("Can't destroy registry file.") ;
}
tRes.tested("writeRegistryInfo()", rc && keys.length > 0) ;