How to change user profile without restarting app?

Hi,
I use Tools lib method getRegistryKeyContent() to change a property setting and then call another method commitChanges().
How to avoid restarting app?

Ref.: [Решено] Calc: Как программно проверить/изменить значение свойства в Параметрах? : Открытые офисные пакеты. Форум поддержки пользователей (rus). The OP’s problem is specifically settings like ExpandReference, which is cached by Calc at module start, and then is not re-read on registry changes (which is a bug IMO, needing a bug report).