summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--offapi/com/sun/star/xml/sax/XAttributeList.idl6
-rw-r--r--xmlsecurity/source/helper/xsecparser.cxx13
2 files changed, 10 insertions, 9 deletions
diff --git a/offapi/com/sun/star/xml/sax/XAttributeList.idl b/offapi/com/sun/star/xml/sax/XAttributeList.idl
index 65aef1f87c60..51924375edcb 100644
--- a/offapi/com/sun/star/xml/sax/XAttributeList.idl
+++ b/offapi/com/sun/star/xml/sax/XAttributeList.idl
@@ -33,8 +33,10 @@ module com { module sun { module star { module xml { module sax {
allow the user to make a copy of the instance.
</p>
- <p>This interface is an IDL version of the Java interface
- <em>org.xml.sax.AttributeList</em>.</p>
+ <p>This interface is a poor IDL version of the Java interface
+ <em>org.xml.sax.AttributeList</em>. For example in getValueByName, it does
+ not allow to distinguish a missing value (for which the Java interface
+ returns null) from an empty string value.</p>
*/
published interface XAttributeList: com::sun::star::uno::XInterface
{
diff --git a/xmlsecurity/source/helper/xsecparser.cxx b/xmlsecurity/source/helper/xsecparser.cxx
index ddc689a63793..ed3f0ff5ac35 100644
--- a/xmlsecurity/source/helper/xsecparser.cxx
+++ b/xmlsecurity/source/helper/xsecparser.cxx
@@ -46,7 +46,7 @@ OUString XSecParser::getIdAttr(const cssu::Reference< cssxs::XAttributeList >& x
{
OUString ouIdAttr = xAttribs->getValueByName("id");
- if (ouIdAttr == nullptr)
+ if (ouIdAttr.isEmpty())
{
ouIdAttr = xAttribs->getValueByName("Id");
}
@@ -91,7 +91,7 @@ void SAL_CALL XSecParser::startElement(
try
{
OUString ouIdAttr = getIdAttr(xAttribs);
- if (ouIdAttr != nullptr)
+ if (!ouIdAttr.isEmpty())
{
m_pXSecController->collectToVerify( ouIdAttr );
}
@@ -99,7 +99,7 @@ void SAL_CALL XSecParser::startElement(
if ( aName == "Signature" )
{
m_pXSecController->addSignature();
- if (ouIdAttr != nullptr)
+ if (!ouIdAttr.isEmpty())
{
m_pXSecController->setId( ouIdAttr );
}
@@ -107,8 +107,7 @@ void SAL_CALL XSecParser::startElement(
else if ( aName == "Reference" )
{
OUString ouUri = xAttribs->getValueByName("URI");
- SAL_WARN_IF( ouUri == nullptr, "xmlsecurity.helper", "URI == NULL" );
-
+ SAL_WARN_IF( ouUri.isEmpty(), "xmlsecurity.helper", "URI == NULL" );
if (ouUri.startsWith("#"))
{
/*
@@ -131,7 +130,7 @@ void SAL_CALL XSecParser::startElement(
{
OUString ouAlgorithm = xAttribs->getValueByName("Algorithm");
- if (ouAlgorithm != nullptr && ouAlgorithm == ALGO_C14N)
+ if (ouAlgorithm == ALGO_C14N)
/*
* a xml stream
*/
@@ -168,7 +167,7 @@ void SAL_CALL XSecParser::startElement(
}
else if ( aName == "SignatureProperty" )
{
- if (ouIdAttr != nullptr)
+ if (!ouIdAttr.isEmpty())
{
m_pXSecController->setPropertyId( ouIdAttr );
}