summaryrefslogtreecommitdiff
path: root/xmlsecurity/inc
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2018-05-18 08:08:16 +0200
committerSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2018-05-22 09:43:10 +0200
commit6499ea2ff45fa42094d41c5c417f66a3ae5a22ae (patch)
tree3536b7bdc40b5e3f0f3b475ec34fc56f14601d90 /xmlsecurity/inc
parentb6dda60b3e888f67d76402f29d7b5576814786dd (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/inc')
-rw-r--r--xmlsecurity/inc/documentsignaturemanager.hxx7
-rw-r--r--xmlsecurity/inc/xmlsignaturehelper.hxx6
-rw-r--r--xmlsecurity/inc/xsecctl.hxx6
3 files changed, 18 insertions, 1 deletions
diff --git a/xmlsecurity/inc/documentsignaturemanager.hxx b/xmlsecurity/inc/documentsignaturemanager.hxx
index 542a9af6a8a9..f88820f03803 100644
--- a/xmlsecurity/inc/documentsignaturemanager.hxx
+++ b/xmlsecurity/inc/documentsignaturemanager.hxx
@@ -28,6 +28,7 @@
#include "xmlsignaturehelper.hxx"
#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/embed/XStorage.hpp>
+#include <com/sun/star/graphic/XGraphic.hpp>
#include "documentsignaturehelper.hxx"
#include <com/sun/star/beans/PropertyValue.hpp>
@@ -66,7 +67,11 @@ public:
bool add(const css::uno::Reference<css::security::XCertificate>& xCert,
const css::uno::Reference<css::xml::crypto::XXMLSecurityContext>& xSecurityContext,
const OUString& rDescription, sal_Int32& nSecurityId, bool bAdESCompliant,
- const OUString& rSignatureLineId = OUString());
+ const OUString& rSignatureLineId = OUString(),
+ const css::uno::Reference<css::graphic::XGraphic> xValidGraphic
+ = css::uno::Reference<css::graphic::XGraphic>(),
+ const css::uno::Reference<css::graphic::XGraphic> xInvalidGraphic
+ = css::uno::Reference<css::graphic::XGraphic>());
/// Remove signature at nPosition.
void remove(sal_uInt16 nPosition);
/// Read signatures from either a temp stream or the real storage.
diff --git a/xmlsecurity/inc/xmlsignaturehelper.hxx b/xmlsecurity/inc/xmlsignaturehelper.hxx
index f4de3b01b56e..c41179d4805c 100644
--- a/xmlsecurity/inc/xmlsignaturehelper.hxx
+++ b/xmlsecurity/inc/xmlsignaturehelper.hxx
@@ -30,6 +30,7 @@
#include "xmlsecuritydllapi.h"
#include "xmlsignaturehelper.hxx"
+#include <com/sun/star/graphic/XGraphic.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/xml/sax/XWriter.hpp>
#include <com/sun/star/xml/crypto/XSEInitializer.hpp>
@@ -130,6 +131,11 @@ public:
void SetDateTime( sal_Int32 nSecurityId, const Date& rDate, const tools::Time& rTime );
void SetDescription(sal_Int32 nSecurityId, const OUString& rDescription);
void SetSignatureLineId(sal_Int32 nSecurityId, const OUString& rSignatureLineId);
+ void
+ SetSignatureLineValidGraphic(sal_Int32 nSecurityId,
+ const css::uno::Reference<css::graphic::XGraphic>& xValidGraphic);
+ void SetSignatureLineInvalidGraphic(
+ sal_Int32 nSecurityId, const css::uno::Reference<css::graphic::XGraphic>& xInvalidGraphic);
void AddForSigning( sal_Int32 securityId, const OUString& uri, bool bBinary, bool bXAdESCompliantIfODF );
void CreateAndWriteSignature( const css::uno::Reference< css::xml::sax::XDocumentHandler >& xDocumentHandler, bool bXAdESCompliantIfODF );
diff --git a/xmlsecurity/inc/xsecctl.hxx b/xmlsecurity/inc/xsecctl.hxx
index 750bb5b63348..2620bc6cbea9 100644
--- a/xmlsecurity/inc/xsecctl.hxx
+++ b/xmlsecurity/inc/xsecctl.hxx
@@ -27,6 +27,7 @@
#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
#include <com/sun/star/xml/sax/XAttributeList.hpp>
+#include <com/sun/star/graphic/XGraphic.hpp>
#include <com/sun/star/xml/crypto/XXMLSignature.hpp>
#include <com/sun/star/xml/crypto/XSEInitializer.hpp>
#include <com/sun/star/xml/crypto/sax/XSecuritySAXEventKeeper.hpp>
@@ -360,6 +361,11 @@ public:
const css::util::DateTime& rDateTime );
void setDescription(sal_Int32 nSecurityId, const OUString& rDescription);
void setSignatureLineId(sal_Int32 nSecurityId, const OUString& rSignatureLineId);
+ void
+ setSignatureLineValidGraphic(sal_Int32 nSecurityId,
+ const css::uno::Reference<css::graphic::XGraphic>& xValidGraphic);
+ void setSignatureLineInvalidGraphic(
+ sal_Int32 nSecurityId, const css::uno::Reference<css::graphic::XGraphic>& xInvalidGraphic);
bool WriteSignature(
const css::uno::Reference< css::xml::sax::XDocumentHandler >& xDocumentHandler,