Kaydet (Commit) 2737a187 authored tarafından Miklos Vajna's avatar Miklos Vajna

xmlsecurity: import OOXML <mdssi:Value>

That stores the signature timestamp, and that now immediately shows up
in DigitalSignaturesDialog as well.

Change-Id: I83a63a10cf946f47a03e4570c461a92512638600
üst 8b8b5e21
...@@ -17,6 +17,7 @@ OOXMLSecParser::OOXMLSecParser(XSecController* pXSecController) ...@@ -17,6 +17,7 @@ OOXMLSecParser::OOXMLSecParser(XSecController* pXSecController)
,m_bInDigestValue(false) ,m_bInDigestValue(false)
,m_bInSignatureValue(false) ,m_bInSignatureValue(false)
,m_bInX509Certificate(false) ,m_bInX509Certificate(false)
,m_bInMdssiValue(false)
{ {
} }
...@@ -71,6 +72,11 @@ throw (xml::sax::SAXException, uno::RuntimeException, std::exception) ...@@ -71,6 +72,11 @@ throw (xml::sax::SAXException, uno::RuntimeException, std::exception)
m_aX509Certificate.clear(); m_aX509Certificate.clear();
m_bInX509Certificate = true; m_bInX509Certificate = true;
} }
else if (rName == "mdssi:Value")
{
m_aMdssiValue.clear();
m_bInMdssiValue = true;
}
if (m_xNextHandler.is()) if (m_xNextHandler.is())
m_xNextHandler->startElement(rName, xAttribs); m_xNextHandler->startElement(rName, xAttribs);
...@@ -94,6 +100,11 @@ void SAL_CALL OOXMLSecParser::endElement(const OUString& rName) throw (xml::sax: ...@@ -94,6 +100,11 @@ void SAL_CALL OOXMLSecParser::endElement(const OUString& rName) throw (xml::sax:
m_pXSecController->setX509Certificate(m_aX509Certificate); m_pXSecController->setX509Certificate(m_aX509Certificate);
m_bInX509Certificate = false; m_bInX509Certificate = false;
} }
else if (rName == "mdssi:Value")
{
m_pXSecController->setDate(m_aMdssiValue);
m_bInMdssiValue = false;
}
if (m_xNextHandler.is()) if (m_xNextHandler.is())
m_xNextHandler->endElement(rName); m_xNextHandler->endElement(rName);
...@@ -107,6 +118,8 @@ void SAL_CALL OOXMLSecParser::characters(const OUString& rChars) throw (xml::sax ...@@ -107,6 +118,8 @@ void SAL_CALL OOXMLSecParser::characters(const OUString& rChars) throw (xml::sax
m_aSignatureValue += rChars; m_aSignatureValue += rChars;
else if (m_bInX509Certificate) else if (m_bInX509Certificate)
m_aX509Certificate += rChars; m_aX509Certificate += rChars;
else if (m_bInMdssiValue)
m_aMdssiValue += rChars;
if (m_xNextHandler.is()) if (m_xNextHandler.is())
m_xNextHandler->characters(rChars); m_xNextHandler->characters(rChars);
......
...@@ -35,6 +35,8 @@ class OOXMLSecParser: public cppu::WeakImplHelper ...@@ -35,6 +35,8 @@ class OOXMLSecParser: public cppu::WeakImplHelper
OUString m_aSignatureValue; OUString m_aSignatureValue;
bool m_bInX509Certificate; bool m_bInX509Certificate;
OUString m_aX509Certificate; OUString m_aX509Certificate;
bool m_bInMdssiValue;
OUString m_aMdssiValue;
public: public:
OOXMLSecParser(XSecController* pXSecController); OOXMLSecParser(XSecController* pXSecController);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment