diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-08-21 11:05:32 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-08-21 13:32:33 +0000 |
commit | 53e3fb1d9337e450e926e163221fecaca13ea957 (patch) | |
tree | a66b460d7b01ffa9a5ade497fd64a2cedc39c377 /configmgr | |
parent | 50eda89e53914eb1272fffda8de4f15ac824a030 (diff) |
Generalize CONFIGURATION_LAYERS "winreg:" notation
...after 097292feab4fc3c064983e1dd08ac4bebe1fe216 "Add HKEY_CURRENT_USER
registry integration" added "winuserreg:".
Even though changing from the exisiting "winreg:" to "winreg:LOCAL_MACHINE"
should be compatible, as it only ends up in fundamental.ini included in the LO
inst set, play it safe it keep treating "winreg" the same as
"winreg:LOCAL_MACHINE".
("url" is a misnomer now in configmgr's Components ctor, and should eventually
be renamed to something more accurate.)
Change-Id: Ifbcf3284d904490891642599468470d03547f92a
Reviewed-on: https://gerrit.libreoffice.org/17891
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'configmgr')
-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); |