diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-12-20 15:29:39 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-12-21 17:01:04 +0100 |
commit | 7cf4eeed81fd333c87dedffa792f5d547b7981f0 (patch) | |
tree | e7fb360cd344e92705b66fe36542b8842cd666c1 /sfx2 | |
parent | 9c4350441191ccfd6af3d73e13b4eb59af7ed6d1 (diff) |
set dbus id for existing DbusSessionHelper users
Change-Id: I64329e21ae79b6607856de9781bee0274b9cb136
Reviewed-on: https://gerrit.libreoffice.org/46854
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 'sfx2')
-rw-r--r-- | sfx2/source/appl/appserv.cxx | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx index 78f39b318b6b..31de5352644b 100644 --- a/sfx2/source/appl/appserv.cxx +++ b/sfx2/source/appl/appserv.cxx @@ -60,6 +60,7 @@ #include <tools/svlibrary.h> #include <tools/diagnose_ex.h> #include <vcl/layout.hxx> +#include <vcl/sysdata.hxx> #include <svl/intitem.hxx> #include <svl/eitem.hxx> #include <svl/stritem.hxx> @@ -185,7 +186,7 @@ namespace return false; } } - void lcl_tryLoadBibliography() + void lcl_tryLoadBibliography(const vcl::Window* pTopWindow) { // lp#527938, debian#602953, fdo#33266, i#105408 // make sure we actually can instantiate services from base first @@ -197,7 +198,11 @@ namespace using namespace svtools; Reference< XSyncDbusSessionHelper > xSyncDbusSessionHelper(SyncDbusSessionHelper::create(comphelper::getProcessComponentContext())); Sequence< OUString > vPackages { "libreoffice-base" }; - xSyncDbusSessionHelper->InstallPackageNames(0, vPackages, OUString()); + + const SystemEnvData* pEnvData = pTopWindow ? pTopWindow->GetSystemData() : nullptr; + sal_uInt32 nDbusId = pEnvData ? GetDbusId(*pEnvData) : 0; + + xSyncDbusSessionHelper->InstallPackageNames(nDbusId, vPackages, OUString()); // Ill be back (hopefully)! SolarMutexGuard aGuard; executeRestartDialog(comphelper::getProcessComponentContext(), nullptr, RESTART_REASON_BIBLIOGRAPHY_INSTALL); @@ -1662,7 +1667,7 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq ) break; case SID_COMP_BIBLIOGRAPHY: - lcl_tryLoadBibliography(); + lcl_tryLoadBibliography(GetTopWindow()); break; } } |