summaryrefslogtreecommitdiff
path: root/configmgr
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-08-21 11:05:32 +0200
committerAndras Timar <andras.timar@collabora.com>2015-08-31 15:11:21 +0200
commitd7180aeade507e0b709104e827cb14cd8fe919d7 (patch)
tree70b97655a466a9dd232cadb724ccb159dac7bc96 /configmgr
parent4363606f9b495accf1e342408557b991bfd64da5 (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.) Reviewed-on: https://gerrit.libreoffice.org/17891 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com> (cherry picked from commit 53e3fb1d9337e450e926e163221fecaca13ea957, including fixes for the apparently inadvertent differences between 097292feab4fc3c064983e1dd08ac4bebe1fe216 "Add HKEY_CURRENT_USER registry integration" and its unfaithful backport 1b8812e7ad17957d8982095a37e489b8455a9bda "tdf#93546 -Add HKEY_CURRENT_USER registry integration") Conflicts: configmgr/source/components.cxx instsetoo_native/CustomTarget_setup.mk scp2/source/ooo/common_brand.scp Change-Id: Ifbcf3284d904490891642599468470d03547f92a Reviewed-on: https://gerrit.libreoffice.org/17905 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'configmgr')
-rw-r--r--configmgr/source/components.cxx21
1 files changed, 11 insertions, 10 deletions
diff --git a/configmgr/source/components.cxx b/configmgr/source/components.cxx
index 28f422158f2b..111289f69d08 100644
--- a/configmgr/source/components.cxx
+++ b/configmgr/source/components.cxx
@@ -532,18 +532,19 @@ Components::Components(
modificationFileUrl_ = url;
parseModificationLayer(url);
}
-#ifdef WNT
- else if (type == "winreg" || type == "winuserreg")
- {
- if (!url.isEmpty()) {
- SAL_WARN(
- "configmgr",
- "winreg URL is not empty, URL handling is not implemented for winreg");
+#if defined WNT
+ 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: 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, data_, 0, 0, 0);
layer++;