diff options
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/doc/docfile.cxx | 7 | ||||
-rw-r--r-- | sfx2/source/doc/objserv.cxx | 6 |
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); } |