summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorRene Engelhard <rene@debian.org>2020-02-03 19:26:56 +0100
committerMike Kaganski <mike.kaganski@collabora.com>2020-02-11 18:33:33 +0100
commitf62e4fb51d72641896b6b8f38fbffb35e6c1b695 (patch)
treed8d7cd554875d6c526e23f1821b897709f7bdb24 /sfx2
parent5326d238d7f98b11886eb4be01f19db73f8eda39 (diff)
make Base install via packagekit also confgurable (like fonts/langpacks)
Change-Id: I72f98e89d1c8e92f10da8e3843956658d035528d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87907 Tested-by: Rene Engelhard <rene@debian.org> Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/appl/appserv.cxx29
1 files changed, 16 insertions, 13 deletions
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index aee61e671f14..459d482cbf68 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -174,20 +174,23 @@ namespace
// make sure we actually can instantiate services from base first
if(!lcl_isBaseAvailable())
{
- try
- {
- using namespace org::freedesktop::PackageKit;
- using namespace svtools;
- Reference< XSyncDbusSessionHelper > xSyncDbusSessionHelper(SyncDbusSessionHelper::create(comphelper::getProcessComponentContext()));
- Sequence< OUString > vPackages { "libreoffice-base" };
- xSyncDbusSessionHelper->InstallPackageNames(vPackages, OUString());
- // Ill be back (hopefully)!
- SolarMutexGuard aGuard;
- executeRestartDialog(comphelper::getProcessComponentContext(), nullptr, RESTART_REASON_BIBLIOGRAPHY_INSTALL);
- }
- catch (const Exception &)
+ if (officecfg::Office::Common::PackageKit::EnableBaseInstallation::get())
{
- TOOLS_INFO_EXCEPTION("sfx.appl", "trying to install LibreOffice Base");
+ try
+ {
+ using namespace org::freedesktop::PackageKit;
+ using namespace svtools;
+ Reference< XSyncDbusSessionHelper > xSyncDbusSessionHelper(SyncDbusSessionHelper::create(comphelper::getProcessComponentContext()));
+ Sequence< OUString > vPackages { "libreoffice-base" };
+ xSyncDbusSessionHelper->InstallPackageNames(vPackages, OUString());
+ // I'll be back (hopefully)!
+ SolarMutexGuard aGuard;
+ executeRestartDialog(comphelper::getProcessComponentContext(), nullptr, RESTART_REASON_BIBLIOGRAPHY_INSTALL);
+ }
+ catch (const Exception &)
+ {
+ TOOLS_INFO_EXCEPTION("sfx.appl", "trying to install LibreOffice Base");
+ }
}
return;
}