[Libreoffice-commits] core.git: desktop/source scp2/source

Mike Kaganski (via logerrit) logerrit at kemper.freedesktop.org
Sun Jan 12 12:21:01 UTC 2020


 desktop/source/app/app.cxx                         |    4 +++-
 scp2/source/quickstart/registryitem_quickstart.scp |    2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 87103d71e733ab6d7aaf6a390932d3056fafe858
Author:     Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Sat Jan 11 17:16:38 2020 +0300
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Sun Jan 12 13:20:24 2020 +0100

    Make RunQuickstartAtFirstStart branding-dependent key
    
    This should not be common to all installed branded flavors of LibreOffice.
    This is controlled by an installer option, and so should be specific to
    an installation.
    
    Change-Id: I88d30d947b6114f5a271286b226b0e22c171265a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86603
    Tested-by: Jenkins
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
    Reviewed-by: Andras Timar <andras.timar at collabora.com>

diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index ea01399eb954..96172623cb45 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -48,6 +48,7 @@
 #endif
 
 #include <i18nlangtag/languagetag.hxx>
+#include <o3tl/char16_t2wchar_t.hxx>
 #include <o3tl/runtimetooustring.hxx>
 #include <svl/languageoptions.hxx>
 #include <svtools/javacontext.hxx>
@@ -2549,10 +2550,11 @@ void Desktop::CheckFirstRun( )
 
 #ifdef _WIN32
         // Check if Quickstarter should be started (on Windows only)
+        OUString sRootKey = ReplaceStringHookProc("Software\\%OOOVENDOR\\%PRODUCTNAME\\%PRODUCTVERSION");
         WCHAR szValue[8192];
         DWORD nValueSize = sizeof(szValue);
         HKEY hKey;
-        if ( ERROR_SUCCESS == RegOpenKeyW( HKEY_LOCAL_MACHINE, L"Software\\LibreOffice", &hKey ) )
+        if (ERROR_SUCCESS == RegOpenKeyW(HKEY_LOCAL_MACHINE, o3tl::toW(sRootKey.getStr()), &hKey))
         {
             if ( ERROR_SUCCESS == RegQueryValueExW( hKey, L"RunQuickstartAtFirstStart", nullptr, nullptr, reinterpret_cast<LPBYTE>(szValue), &nValueSize ) )
             {
diff --git a/scp2/source/quickstart/registryitem_quickstart.scp b/scp2/source/quickstart/registryitem_quickstart.scp
index 58b794e2bd3f..3f015aa61dc6 100644
--- a/scp2/source/quickstart/registryitem_quickstart.scp
+++ b/scp2/source/quickstart/registryitem_quickstart.scp
@@ -20,7 +20,7 @@
 
 RegistryItem gid_Regitem_Software_OpenOffice_RunQuickstartAtFirstStart
     ParentID = PREDEFINED_HKEY_LOCAL_MACHINE;
-    Subkey = "Software\LibreOffice";
+    Subkey = "Software\%MANUFACTURER\%PRODUCTNAME\%PRODUCTVERSION";
     ModuleID = gid_Module_Optional_Quickstart;
     Name = "RunQuickstartAtFirstStart";
     Value = "1";


More information about the Libreoffice-commits mailing list