From a6d1b4b17a74bd2af03cd090b80c98bc9a275aa3 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Wed, 13 Jan 2016 15:24:04 +0100 Subject: [PATCH] xmlsecurity: import OOXML Only non-stream ones as a start. Change-Id: Ifacf391e78463004c17106905019ec2ed3430efe --- xmlsecurity/source/helper/ooxmlsecparser.cxx | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/xmlsecurity/source/helper/ooxmlsecparser.cxx b/xmlsecurity/source/helper/ooxmlsecparser.cxx index a070e8f3ccd9..6f71a39ed53b 100644 --- a/xmlsecurity/source/helper/ooxmlsecparser.cxx +++ b/xmlsecurity/source/helper/ooxmlsecparser.cxx @@ -42,12 +42,25 @@ throw (xml::sax::SAXException, uno::RuntimeException, std::exception) if (!aId.isEmpty()) m_pXSecController->setId(aId); } + else if (rName == "Reference") + { + OUString aURI = xAttribs->getValueByName("URI"); + if (aURI.startsWith("#")) + m_pXSecController->addReference(aURI.copy(1)); + // TODO else + } } void SAL_CALL OOXMLSecParser::endElement(const OUString& rName) throw (xml::sax::SAXException, uno::RuntimeException, std::exception) { if (rName == "SignedInfo") m_pXSecController->setReferenceCount(); + else if (rName == "Reference") + { + // TODO import digest value + OUString aDigestValue; + m_pXSecController->setDigestValue(aDigestValue); + } } void SAL_CALL OOXMLSecParser::characters(const OUString& /*rChars*/) throw (xml::sax::SAXException, uno::RuntimeException, std::exception)