summaryrefslogtreecommitdiff
path: root/xmlsecurity/source/helper/documentsignaturemanager.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'xmlsecurity/source/helper/documentsignaturemanager.cxx')
-rw-r--r--xmlsecurity/source/helper/documentsignaturemanager.cxx12
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