summaryrefslogtreecommitdiff
path: root/xmlsecurity
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-02-13 10:32:40 +0000
committerCaolán McNamara <caolanm@redhat.com>2019-02-14 09:57:40 +0100
commita9a59d53783dd773fd4853266a1d98fab9912922 (patch)
treed2da900f20f12988f7587b8cfa9e9442dc398940 /xmlsecurity
parentf871e8f5b34aa43db7958cbed9edecf618c9afa0 (diff)
[API CHANGE] add setParentWindow to XDocumentDigitalSignatures
so we can specify which window modal dialogs are modal to Change-Id: I7cd7348b5cd0f55d698553f313f745d5e0d6389d Reviewed-on: https://gerrit.libreoffice.org/67765 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'xmlsecurity')
-rw-r--r--xmlsecurity/source/component/documentdigitalsignatures.cxx11
1 files changed, 9 insertions, 2 deletions
diff --git a/xmlsecurity/source/component/documentdigitalsignatures.cxx b/xmlsecurity/source/component/documentdigitalsignatures.cxx
index ef838b6fedff..0f6d9e909035 100644
--- a/xmlsecurity/source/component/documentdigitalsignatures.cxx
+++ b/xmlsecurity/source/component/documentdigitalsignatures.cxx
@@ -67,6 +67,8 @@ class DocumentDigitalSignatures
{
private:
css::uno::Reference<css::uno::XComponentContext> mxCtx;
+ css::uno::Reference<css::awt::XWindow> mxParentWindow;
+
/// will be set by XInitialization. If not we assume true. false means an earlier version (whatever that means,
/// this is a string, not a boolean).
/// Note that the code talks about "ODF version" even if this class is also used to sign OOXML.
@@ -176,6 +178,11 @@ public:
css::uno::Reference<css::security::XCertificate> const & xCertificate,
css::uno::Reference<css::embed::XStorage> const & xStoragexStorage,
css::uno::Reference<css::io::XStream> const & xStream) override;
+
+ void SAL_CALL setParentWindow(const css::uno::Reference<css::awt::XWindow>& rParentwindow) override
+ {
+ mxParentWindow = rParentwindow;
+ }
};
DocumentDigitalSignatures::DocumentDigitalSignatures( const Reference< XComponentContext >& rxCtx ):
@@ -417,7 +424,7 @@ bool DocumentDigitalSignatures::ImplViewSignatures(
}
else
{
- std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(nullptr,
+ std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(Application::GetFrameWeld(mxParentWindow),
VclMessageType::Warning, VclButtonsType::Ok,
XsResId(RID_XMLSECWB_NO_MOZILLA_PROFILE)));
xBox->run();
@@ -599,7 +606,7 @@ void DocumentDigitalSignatures::showCertificate(
if ( bInit )
{
- CertificateViewer aViewer(nullptr, aSignatureManager.getSecurityEnvironment(), Certificate, false, nullptr);
+ CertificateViewer aViewer(Application::GetFrameWeld(mxParentWindow), aSignatureManager.getSecurityEnvironment(), Certificate, false, nullptr);
aViewer.run();
}
}