diff options
author | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2018-05-18 08:08:16 +0200 |
---|---|---|
committer | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2018-05-22 09:43:10 +0200 |
commit | 6499ea2ff45fa42094d41c5c417f66a3ae5a22ae (patch) | |
tree | 3536b7bdc40b5e3f0f3b475ec34fc56f14601d90 /xmlsecurity/source/helper/documentsignaturemanager.cxx | |
parent | b6dda60b3e888f67d76402f29d7b5576814786dd (diff) |
tdf#83877 Add valid/invalid images to signatures
Change-Id: I958c1bad2f32383ebaaeb7d42c761f0d1dfefc35
Reviewed-on: https://gerrit.libreoffice.org/54513
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'xmlsecurity/source/helper/documentsignaturemanager.cxx')
-rw-r--r-- | xmlsecurity/source/helper/documentsignaturemanager.cxx | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/xmlsecurity/source/helper/documentsignaturemanager.cxx b/xmlsecurity/source/helper/documentsignaturemanager.cxx index bb78c62272e4..f302f1a64955 100644 --- a/xmlsecurity/source/helper/documentsignaturemanager.cxx +++ b/xmlsecurity/source/helper/documentsignaturemanager.cxx @@ -29,6 +29,7 @@ #include <com/sun/star/embed/XTransactedObject.hpp> #include <com/sun/star/xml/crypto/SEInitializer.hpp> #include <com/sun/star/lang/XServiceInfo.hpp> +#include <com/sun/star/graphic/XGraphic.hpp> #include <comphelper/base64.hxx> #include <comphelper/storagehelper.hxx> @@ -46,6 +47,8 @@ #include <pdfsignaturehelper.hxx> using namespace css; +using namespace css::graphic; +using namespace css::uno; DocumentSignatureManager::DocumentSignatureManager( const uno::Reference<uno::XComponentContext>& xContext, DocumentSignatureMode eMode) @@ -266,7 +269,8 @@ bool DocumentSignatureManager::add( const uno::Reference<security::XCertificate>& xCert, const uno::Reference<xml::crypto::XXMLSecurityContext>& xSecurityContext, const OUString& rDescription, sal_Int32& nSecurityId, bool bAdESCompliant, - const OUString& rSignatureLineId) + const OUString& rSignatureLineId, const Reference<XGraphic> xValidGraphic, + const Reference<XGraphic> xInvalidGraphic) { if (!xCert.is()) { @@ -388,6 +392,12 @@ bool DocumentSignatureManager::add( if (!rSignatureLineId.isEmpty()) maSignatureHelper.SetSignatureLineId(nSecurityId, rSignatureLineId); + if (xValidGraphic.is()) + maSignatureHelper.SetSignatureLineValidGraphic(nSecurityId, xValidGraphic); + + if (xInvalidGraphic.is()) + maSignatureHelper.SetSignatureLineInvalidGraphic(nSecurityId, xInvalidGraphic); + // We open a signature stream in which the existing and the new //signature is written. ImplGetSignatureInformation (later in this function) will //then read the stream and fill maCurrentSignatureInformations. The final signature |