diff --git a/xmlsecurity/inc/digitalsignaturesdialog.hxx b/xmlsecurity/inc/digitalsignaturesdialog.hxx index f8ace3d976a6..28ed32ccb098 100644 --- a/xmlsecurity/inc/digitalsignaturesdialog.hxx +++ b/xmlsecurity/inc/digitalsignaturesdialog.hxx @@ -74,6 +74,7 @@ private: std::unique_ptr m_xCloseBtn; std::shared_ptr m_xViewer; + std::shared_ptr m_xInfoBox; DECL_LINK(AdESCompliantCheckBoxHdl, weld::Toggleable&, void); DECL_LINK(ViewButtonHdl, weld::Button&, void); diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx index fc7cf6b2a534..1d40e7562be1 100644 --- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx +++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx @@ -206,6 +206,9 @@ DigitalSignaturesDialog::~DigitalSignaturesDialog() { if (m_xViewer) m_xViewer->response(RET_OK); + + if (m_xInfoBox) + m_xInfoBox->response(RET_OK); } bool DigitalSignaturesDialog::Init() @@ -785,10 +788,13 @@ void DigitalSignaturesDialog::ImplShowSignaturesDetails() } else { - std::unique_ptr xInfoBox(Application::CreateMessageDialog(m_xDialog.get(), - VclMessageType::Info, VclButtonsType::Ok, - XsResId(STR_XMLSECDLG_NO_CERT_FOUND))); - xInfoBox->run(); + if (m_xInfoBox) + m_xInfoBox->response(RET_OK); + + m_xInfoBox = std::shared_ptr(Application::CreateMessageDialog(m_xDialog.get(), + VclMessageType::Info, VclButtonsType::Ok, + XsResId(STR_XMLSECDLG_NO_CERT_FOUND))); + m_xInfoBox->runAsync(m_xInfoBox, [this] (sal_Int32) { m_xInfoBox = nullptr; }); } }