summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-02-13 12:51:28 +0000
committerCaolán McNamara <caolanm@redhat.com>2019-02-14 14:21:40 +0100
commitbb9481a489cc21b0695c9a7c3e9d4ffe1446f8a9 (patch)
tree7f0e19b0a38cba49ceae3d8d42ae066f5ce1c497 /sfx2
parent3157a3a8332ad342fb2b44659123217fa3450168 (diff)
weld DigitalSignaturesDialog
Change-Id: I197f4805558b07aeb9e66734d0fb5c250c41ad3e Reviewed-on: https://gerrit.libreoffice.org/67796 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/doc/docfile.cxx7
-rw-r--r--sfx2/source/doc/objserv.cxx6
2 files changed, 9 insertions, 4 deletions
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index ef0f6e2d8943..6efbb67e4270 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -129,6 +129,7 @@
#include <openflag.hxx>
#include <officecfg/Office/Common.hxx>
#include <comphelper/propertysequence.hxx>
+#include <vcl/weld.hxx>
#include <com/sun/star/io/WrongFormatException.hpp>
@@ -3888,7 +3889,9 @@ bool SfxMedium::SignDocumentContentUsingCertificate(bool bHasValidDocumentSignat
return bChanges;
}
-bool SfxMedium::SignContents_Impl(bool bSignScriptingContent, bool bHasValidDocumentSignature,
+bool SfxMedium::SignContents_Impl(weld::Window* pDialogParent,
+ bool bSignScriptingContent,
+ bool bHasValidDocumentSignature,
const OUString& aSignatureLineId,
const Reference<XCertificate>& xCert,
const Reference<XGraphic>& xValidGraphic,
@@ -3909,6 +3912,8 @@ bool SfxMedium::SignContents_Impl(bool bSignScriptingContent, bool bHasValidDocu
uno::Reference< security::XDocumentDigitalSignatures > xSigner(
security::DocumentDigitalSignatures::createWithVersionAndValidSignature(
comphelper::getProcessComponentContext(), aODFVersion, bHasValidDocumentSignature ) );
+ if (pDialogParent)
+ xSigner->setParentWindow(pDialogParent->GetXWindow());
uno::Reference< embed::XStorage > xWriteableZipStor;
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index f18ddcc5d0bb..41412c832fea 100644
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -1740,7 +1740,7 @@ void SfxObjectShell::SignDocumentContent(weld::Window* pDialogParent)
if (CheckIsReadonly(false))
return;
- bool bSignSuccess = GetMedium()->SignContents_Impl(false, HasValidSignatures());
+ bool bSignSuccess = GetMedium()->SignContents_Impl(pDialogParent, false, HasValidSignatures());
AfterSigning(bSignSuccess, false);
}
@@ -1836,7 +1836,7 @@ void SfxObjectShell::SignSignatureLine(weld::Window* pDialogParent,
if (CheckIsReadonly(false))
return;
- bool bSignSuccess = GetMedium()->SignContents_Impl(
+ bool bSignSuccess = GetMedium()->SignContents_Impl(pDialogParent,
false, HasValidSignatures(), aSignatureLineId, xCert, xValidGraphic, xInvalidGraphic, aComment);
AfterSigning(bSignSuccess, false);
@@ -1861,7 +1861,7 @@ void SfxObjectShell::SignScriptingContent(weld::Window* pDialogParent)
if (CheckIsReadonly(true))
return;
- bool bSignSuccess = GetMedium()->SignContents_Impl(true, HasValidSignatures());
+ bool bSignSuccess = GetMedium()->SignContents_Impl(pDialogParent, true, HasValidSignatures());
AfterSigning(bSignSuccess, true);
}