summaryrefslogtreecommitdiffstats
path: root/xmlsecurity/source/helper/ooxmlsecparser.cxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-01-14 09:26:06 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-01-14 09:44:50 +0100
commit4ab8711c1ca8b474aa23e97ef236ee02add6259a (patch)
tree25e5570f745ec1ce2f06b6fd4895ea8ccae86fcb /xmlsecurity/source/helper/ooxmlsecparser.cxx
parentxmlsecurity: implement XInitialization for OOXMLSecParser (diff)
downloadcore-4ab8711c1ca8b474aa23e97ef236ee02add6259a.tar.gz
core-4ab8711c1ca8b474aa23e97ef236ee02add6259a.zip
xmlsecurity: import OOXML <SignatureValue>
Change-Id: I96479457d6740ec69bddbf3feabd3c1dc815f197
Diffstat (limited to 'xmlsecurity/source/helper/ooxmlsecparser.cxx')
-rw-r--r--xmlsecurity/source/helper/ooxmlsecparser.cxx15
1 files changed, 14 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);