summaryrefslogtreecommitdiff
path: root/xmlsecurity/source/dialogs
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2021-10-22 13:08:46 +0200
committerAndras Timar <andras.timar@collabora.com>2022-02-14 11:25:39 +0100
commit359cb79b0f8fd0aba87709e1b6f873c3eace27e1 (patch)
tree2612a1a079aa64d00fe2b47772bdbdce0ae76f4b /xmlsecurity/source/dialogs
parent4502b2378e3c93153028595559da7701f70390d9 (diff)
Make View Certificate dialog async
Change-Id: Id93145ecf6be3cb558f0ce8d3cc340bbc67095e0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124061 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128839 Tested-by: Jenkins
Diffstat (limited to 'xmlsecurity/source/dialogs')
-rw-r--r--xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
index 621ea4170649..fc7cf6b2a534 100644
--- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
+++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
@@ -204,6 +204,8 @@ DigitalSignaturesDialog::DigitalSignaturesDialog(
DigitalSignaturesDialog::~DigitalSignaturesDialog()
{
+ if (m_xViewer)
+ m_xViewer->response(RET_OK);
}
bool DigitalSignaturesDialog::Init()
@@ -774,9 +776,12 @@ void DigitalSignaturesDialog::ImplShowSignaturesDetails()
if ( xCert.is() )
{
+ if (m_xViewer)
+ m_xViewer->response(RET_OK);
+
uno::Reference<xml::crypto::XSecurityEnvironment> xSecEnv = getSecurityEnvironmentForCertificate(xCert);
- CertificateViewer aViewer(m_xDialog.get(), xSecEnv, xCert, false, nullptr);
- aViewer.run();
+ m_xViewer = std::make_shared<CertificateViewer>(m_xDialog.get(), xSecEnv, xCert, false, nullptr);
+ weld::DialogController::runAsync(m_xViewer, [this] (sal_Int32) { m_xViewer = nullptr; });
}
else
{