diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-01-14 09:26:06 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-01-14 09:44:50 +0100 |
commit | 4ab8711c1ca8b474aa23e97ef236ee02add6259a (patch) | |
tree | 25e5570f745ec1ce2f06b6fd4895ea8ccae86fcb /xmlsecurity | |
parent | 7834dd22938c9052e962473dc6f5efd1b7b2e0a5 (diff) |
xmlsecurity: import OOXML <SignatureValue>
Change-Id: I96479457d6740ec69bddbf3feabd3c1dc815f197
Diffstat (limited to 'xmlsecurity')
-rw-r--r-- | xmlsecurity/source/helper/ooxmlsecparser.cxx | 15 | ||||
-rw-r--r-- | xmlsecurity/source/helper/ooxmlsecparser.hxx | 2 |
2 files changed, 16 insertions, 1 deletions
diff --git a/xmlsecurity/source/helper/ooxmlsecparser.cxx b/xmlsecurity/source/helper/ooxmlsecparser.cxx index 6c5e1ab3b341..28eaeaa6f1c0 100644 --- a/xmlsecurity/source/helper/ooxmlsecparser.cxx +++ b/xmlsecurity/source/helper/ooxmlsecparser.cxx @@ -14,7 +14,8 @@ using namespace com::sun::star; OOXMLSecParser::OOXMLSecParser(XSecController* pXSecController) : m_pXSecController(pXSecController), - m_bInDigestValue(false) + m_bInDigestValue(false), + m_bInSignatureValue(false) { } @@ -59,6 +60,11 @@ throw (xml::sax::SAXException, uno::RuntimeException, std::exception) m_aDigestValue.clear(); m_bInDigestValue = true; } + else if (rName == "SignatureValue") + { + m_aSignatureValue.clear(); + m_bInSignatureValue = true; + } if (m_xNextHandler.is()) m_xNextHandler->startElement(rName, xAttribs); @@ -72,6 +78,11 @@ void SAL_CALL OOXMLSecParser::endElement(const OUString& rName) throw (xml::sax: m_pXSecController->setDigestValue(m_aDigestValue); else if (rName == "DigestValue") m_bInDigestValue = false; + else if (rName == "SignatureValue") + { + m_pXSecController->setSignatureValue(m_aSignatureValue); + m_bInSignatureValue = false; + } if (m_xNextHandler.is()) m_xNextHandler->endElement(rName); @@ -81,6 +92,8 @@ void SAL_CALL OOXMLSecParser::characters(const OUString& rChars) throw (xml::sax { if (m_bInDigestValue) m_aDigestValue += rChars; + else if (m_bInSignatureValue) + m_aSignatureValue += rChars; if (m_xNextHandler.is()) m_xNextHandler->characters(rChars); diff --git a/xmlsecurity/source/helper/ooxmlsecparser.hxx b/xmlsecurity/source/helper/ooxmlsecparser.hxx index b561862fc6b4..7b39cce13968 100644 --- a/xmlsecurity/source/helper/ooxmlsecparser.hxx +++ b/xmlsecurity/source/helper/ooxmlsecparser.hxx @@ -31,6 +31,8 @@ class OOXMLSecParser: public cppu::WeakImplHelper bool m_bInDigestValue; OUString m_aDigestValue; + bool m_bInSignatureValue; + OUString m_aSignatureValue; public: OOXMLSecParser(XSecController* pXSecController); |