summaryrefslogtreecommitdiff
path: root/cui/source/options/optinet2.cxx
diff options
context:
space:
mode:
authorJan-Marek Glogowski <jan-marek.glogowski@extern.cib.de>2019-10-22 17:56:15 +0000
committerJan-Marek Glogowski <glogow@fbihome.de>2020-07-03 17:13:12 +0200
commitb1d0d0cf866ac7235cd23ff862a8f2e9085148d8 (patch)
treee5cb49b7fad2b5b072e58ebc3a9071734d2270a0 /cui/source/options/optinet2.cxx
parent47c098e5760537e8c43a92c9dbe16ace3902a19d (diff)
[API CHANGE] Move NSS profile handling into NSS service
While developing the patchset for tdf#127909, I broke the certificate path dialog, because I wasn't aware, that the NSSInitializer service has to use the same logic to auto- select the users profile, then the dialog. So currently you have to keep the complex service and dialog auto-select logic in sync. To prevent this error, this moves all the profile auto-selection and enumeration into the NSSInitializer service. What I also stumbled over is the particular lifecycle of the NSS library initialization in the NSS service. This is just done, when the first user calls some crypto function. As a result it's actually possible to change the path setting without restarting LibreOffice. But since the NSS deninitialization is run as an atexit handler, this setting can't be changed after the init. What is currently missing is any indication inside the dialog of the currently active NSS setting in comparison to any later user selection, if the user doesn't restart LibreOffice as requested. Change-Id: I886962777958c363abeb0ec91fc8a35cbd39eb98 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97668 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'cui/source/options/optinet2.cxx')
-rw-r--r--cui/source/options/optinet2.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx
index c78b94f6e543..35d9b1a2299d 100644
--- a/cui/source/options/optinet2.cxx
+++ b/cui/source/options/optinet2.cxx
@@ -675,11 +675,9 @@ IMPL_LINK_NOARG(SvxSecurityTabPage, CertPathPBHdl, weld::Button&, void)
{
if (!mpCertPathDlg)
mpCertPathDlg.reset(new CertPathDialog(GetFrameWeld()));
+ mpCertPathDlg->Init();
- OUString sOrig = mpCertPathDlg->getDirectory();
- short nRet = mpCertPathDlg->run();
-
- if (nRet == RET_OK && sOrig != mpCertPathDlg->getDirectory())
+ if (mpCertPathDlg->run() == RET_OK && !mpCertPathDlg->isActiveServicePath())
{
SolarMutexGuard aGuard;
if (svtools::executeRestartDialog(comphelper::getProcessComponentContext(), nullptr, svtools::RESTART_REASON_ADDING_PATH))