diff options
Diffstat (limited to 'configmgr/source/components.cxx')
-rw-r--r-- | configmgr/source/components.cxx | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/configmgr/source/components.cxx b/configmgr/source/components.cxx index 9e19ef94024a..6c2726e8a6c8 100644 --- a/configmgr/source/components.cxx +++ b/configmgr/source/components.cxx @@ -537,15 +537,18 @@ Components::Components( ++layer; //TODO: overflow #endif #if defined WNT - } else if (type == "winreg" || type == "winuserreg") { - if (!url.isEmpty()) { + } else if (type == "winreg") { + WinRegType eType; + if (url == "LOCAL_MACHINE" || url.isEmpty()/*backwards comp.*/) { + eType = WinRegType::LOCAL_MACHINE; + } else if (url == "CURRENT_USER") { + eType = WinRegType::CURRENT_USER; + } else { throw css::uno::RuntimeException( - "CONFIGURATION_LAYERS: non-empty \"winreg\" URL"); + "CONFIGURATION_LAYERS: unknown \"winreg\" kind \"" + url + + "\""); } OUString aTempFileURL; - WinRegType eType = WinRegType::LOCAL_MACHINE; - if (type == "winuserreg") - eType = WinRegType::CURRENT_USER; if (dumpWindowsRegistry(&aTempFileURL, eType)) { parseFileLeniently(&parseXcuFile, aTempFileURL, layer, 0, 0, 0); osl::File::remove(aTempFileURL); |