summaryrefslogtreecommitdiffstats
path: root/xmlsecurity/source/helper/ooxmlsecparser.cxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-01-13 15:24:04 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-01-13 15:24:04 +0100
commita6d1b4b17a74bd2af03cd090b80c98bc9a275aa3 (patch)
tree15427d687395b655cf21a6f34fc6259494606c7f /xmlsecurity/source/helper/ooxmlsecparser.cxx
parentxmlsecurity: import OOXML <SignedInfo> (diff)
downloadcore-a6d1b4b17a74bd2af03cd090b80c98bc9a275aa3.tar.gz
core-a6d1b4b17a74bd2af03cd090b80c98bc9a275aa3.zip
xmlsecurity: import OOXML <Reference>
Only non-stream ones as a start. Change-Id: Ifacf391e78463004c17106905019ec2ed3430efe
Diffstat (limited to 'xmlsecurity/source/helper/ooxmlsecparser.cxx')
-rw-r--r--xmlsecurity/source/helper/ooxmlsecparser.cxx13
1 files changed, 13 insertions, 0 deletions
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)