summaryrefslogtreecommitdiffstats
path: root/xmlsecurity/source/helper/xsecparser.cxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-01-05 09:57:38 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-01-05 10:27:45 +0100
commita968893e6afd3b79c6c048962373859cea75a77b (patch)
treede0212ae04561475013c6523a6847d463d1a08b7 /xmlsecurity/source/helper/xsecparser.cxx
parentxmlsecurity: add XMLSignatureHelper::SetDescription() (diff)
downloadcore-a968893e6afd3b79c6c048962373859cea75a77b.tar.gz
core-a968893e6afd3b79c6c048962373859cea75a77b.zip
xmlsecurity: parse dc:description in XSecParser
With this, the description is written in the XML file, DigitalSignaturesDialog doesn't set it yet, though. Change-Id: I54a73d6fbdf8ed936714a21ba1df5998849fd1fa
Diffstat (limited to 'xmlsecurity/source/helper/xsecparser.cxx')
-rw-r--r--xmlsecurity/source/helper/xsecparser.cxx16
1 files changed, 16 insertions, 0 deletions
diff --git a/xmlsecurity/source/helper/xsecparser.cxx b/xmlsecurity/source/helper/xsecparser.cxx
index e429535b1ddd..b7d37343c4dc 100644
--- a/xmlsecurity/source/helper/xsecparser.cxx
+++ b/xmlsecurity/source/helper/xsecparser.cxx
@@ -35,6 +35,7 @@ XSecParser::XSecParser(XSecController* pXSecController,
, m_bInDigestValue(false)
, m_bInSignatureValue(false)
, m_bInDate(false)
+ , m_bInDescription(false)
, m_pXSecController(pXSecController)
, m_xNextHandler(xNextHandler)
, m_bReferenceUnresolved(false)
@@ -65,6 +66,7 @@ void SAL_CALL XSecParser::startDocument( )
m_bInSignatureValue = false;
m_bInDigestValue = false;
m_bInDate = false;
+ m_bInDescription = false;
if (m_xNextHandler.is())
{
@@ -176,6 +178,11 @@ void SAL_CALL XSecParser::startElement(
m_ouDate.clear();
m_bInDate = true;
}
+ else if (aName == NSTAG_DC ":" TAG_DESCRIPTION)
+ {
+ m_ouDescription.clear();
+ m_bInDescription = true;
+ }
if (m_xNextHandler.is())
{
@@ -248,6 +255,11 @@ void SAL_CALL XSecParser::endElement( const OUString& aName )
m_pXSecController->setDate( m_ouDate );
m_bInDate = false;
}
+ else if (aName == NSTAG_DC ":" TAG_DESCRIPTION)
+ {
+ m_pXSecController->setDescription( m_ouDescription );
+ m_bInDescription = false;
+ }
if (m_xNextHandler.is())
{
@@ -296,6 +308,10 @@ void SAL_CALL XSecParser::characters( const OUString& aChars )
{
m_ouDate += aChars;
}
+ else if (m_bInDescription)
+ {
+ m_ouDescription += aChars;
+ }
if (m_xNextHandler.is())
{