[Libreoffice-commits] core.git: xmlsecurity/source
Miklos Vajna
vmiklos at collabora.co.uk
Wed Jan 20 01:21:09 PST 2016
xmlsecurity/source/helper/ooxmlsecparser.cxx | 13 +++++++++++++
xmlsecurity/source/helper/ooxmlsecparser.hxx | 2 ++
2 files changed, 15 insertions(+)
New commits:
commit d79075b3064be1c4eb0e260f06fb210a12b9546f
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Wed Jan 20 10:01:00 2016 +0100
xmlsecurity: import OOXML <SignatureComments>
This is the signature purpose on the MSO UI, our signature description.
Change-Id: I7609c427cded96249ccdec24cd9d43e3e99be3d9
diff --git a/xmlsecurity/source/helper/ooxmlsecparser.cxx b/xmlsecurity/source/helper/ooxmlsecparser.cxx
index d8b5c93..4bc7274 100644
--- a/xmlsecurity/source/helper/ooxmlsecparser.cxx
+++ b/xmlsecurity/source/helper/ooxmlsecparser.cxx
@@ -18,6 +18,7 @@ OOXMLSecParser::OOXMLSecParser(XSecController* pXSecController)
,m_bInSignatureValue(false)
,m_bInX509Certificate(false)
,m_bInMdssiValue(false)
+ ,m_bInSignatureComments(false)
{
}
@@ -77,6 +78,11 @@ throw (xml::sax::SAXException, uno::RuntimeException, std::exception)
m_aMdssiValue.clear();
m_bInMdssiValue = true;
}
+ else if (rName == "SignatureComments")
+ {
+ m_aSignatureComments.clear();
+ m_bInSignatureComments = true;
+ }
if (m_xNextHandler.is())
m_xNextHandler->startElement(rName, xAttribs);
@@ -105,6 +111,11 @@ void SAL_CALL OOXMLSecParser::endElement(const OUString& rName) throw (xml::sax:
m_pXSecController->setDate(m_aMdssiValue);
m_bInMdssiValue = false;
}
+ else if (rName == "SignatureComments")
+ {
+ m_pXSecController->setDescription(m_aSignatureComments);
+ m_bInSignatureComments = false;
+ }
if (m_xNextHandler.is())
m_xNextHandler->endElement(rName);
@@ -120,6 +131,8 @@ void SAL_CALL OOXMLSecParser::characters(const OUString& rChars) throw (xml::sax
m_aX509Certificate += rChars;
else if (m_bInMdssiValue)
m_aMdssiValue += rChars;
+ else if (m_bInSignatureComments)
+ m_aSignatureComments += rChars;
if (m_xNextHandler.is())
m_xNextHandler->characters(rChars);
diff --git a/xmlsecurity/source/helper/ooxmlsecparser.hxx b/xmlsecurity/source/helper/ooxmlsecparser.hxx
index b071bca..c7ac953 100644
--- a/xmlsecurity/source/helper/ooxmlsecparser.hxx
+++ b/xmlsecurity/source/helper/ooxmlsecparser.hxx
@@ -37,6 +37,8 @@ class OOXMLSecParser: public cppu::WeakImplHelper
OUString m_aX509Certificate;
bool m_bInMdssiValue;
OUString m_aMdssiValue;
+ bool m_bInSignatureComments;
+ OUString m_aSignatureComments;
public:
OOXMLSecParser(XSecController* pXSecController);
More information about the Libreoffice-commits
mailing list