diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-01-05 10:38:39 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-01-05 14:55:40 +0100 |
commit | ee2b08ed8a1a6a588b01d6c5e845fc92c651af5d (patch) | |
tree | 8d587a373cc136d8d6d5ef2548fcbd8d243fb903 /xmlsecurity/source | |
parent | 9adca57fda39c0e5cfdd7b1d9232ed4bf7f04845 (diff) |
xmlsecurity: convert TYPE_...__REFERENCE constants to scoped enum
Change-Id: Ic2248b3bc6460e65bdf4eb30af4f8893a7f0e68d
Diffstat (limited to 'xmlsecurity/source')
-rw-r--r-- | xmlsecurity/source/helper/documentsignaturehelper.cxx | 4 | ||||
-rw-r--r-- | xmlsecurity/source/helper/xsecctl.cxx | 4 | ||||
-rw-r--r-- | xmlsecurity/source/helper/xsecctl.hxx | 2 | ||||
-rw-r--r-- | xmlsecurity/source/helper/xsecsign.cxx | 6 | ||||
-rw-r--r-- | xmlsecurity/source/helper/xsecverify.cxx | 6 |
5 files changed, 11 insertions, 11 deletions
diff --git a/xmlsecurity/source/helper/documentsignaturehelper.cxx b/xmlsecurity/source/helper/documentsignaturehelper.cxx index 3b44a40e6ff1..08a4f0b48e8b 100644 --- a/xmlsecurity/source/helper/documentsignaturehelper.cxx +++ b/xmlsecurity/source/helper/documentsignaturehelper.cxx @@ -341,8 +341,8 @@ bool DocumentSignatureHelper::checkIfAllFilesAreSigned( for ( int i = sigInfo.vSignatureReferenceInfors.size(); i; ) { const SignatureReferenceInformation& rInf = sigInfo.vSignatureReferenceInfors[--i]; - // There is also an extra entry of type TYPE_SAMEDOCUMENT_REFERENCE because of signature date. - if ( ( rInf.nType == TYPE_BINARYSTREAM_REFERENCE ) || ( rInf.nType == TYPE_XMLSTREAM_REFERENCE ) ) + // There is also an extra entry of type SignatureReferenceType::SAMEDOCUMENT because of signature date. + if ( ( rInf.nType == SignatureReferenceType::BINARYSTREAM ) || ( rInf.nType == SignatureReferenceType::XMLSTREAM ) ) { OUString sReferenceURI = rInf.ouURI; if (alg == OOo2Document) diff --git a/xmlsecurity/source/helper/xsecctl.cxx b/xmlsecurity/source/helper/xsecctl.cxx index eed58b55d616..2cdfbb1b2994 100644 --- a/xmlsecurity/source/helper/xsecctl.cxx +++ b/xmlsecurity/source/helper/xsecctl.cxx @@ -778,7 +778,7 @@ void XSecController::exportSignature( const SignatureReferenceInformation& refInfor = vReferenceInfors[j]; pAttributeList = new SvXMLAttributeList(); - if ( refInfor.nType != TYPE_SAMEDOCUMENT_REFERENCE ) + if ( refInfor.nType != SignatureReferenceType::SAMEDOCUMENT ) /* * stream reference */ @@ -800,7 +800,7 @@ void XSecController::exportSignature( xDocumentHandler->startElement( tag_Reference, cssu::Reference< cssxs::XAttributeList > (pAttributeList) ); { /* Write Transforms element */ - if (refInfor.nType == TYPE_XMLSTREAM_REFERENCE) + if (refInfor.nType == SignatureReferenceType::XMLSTREAM) /* * xml stream, so c14n transform is needed */ diff --git a/xmlsecurity/source/helper/xsecctl.hxx b/xmlsecurity/source/helper/xsecctl.hxx index dcb4eaa706a5..b19ee700d57f 100644 --- a/xmlsecurity/source/helper/xsecctl.hxx +++ b/xmlsecurity/source/helper/xsecctl.hxx @@ -130,7 +130,7 @@ public: xReferenceResolvedListener = xListener; } - void addReference( sal_Int32 type, const OUString& uri, sal_Int32 keeperId ) + void addReference( SignatureReferenceType type, const OUString& uri, sal_Int32 keeperId ) { signatureInfor.vSignatureReferenceInfors.push_back( SignatureReferenceInformation(type, uri)); diff --git a/xmlsecurity/source/helper/xsecsign.cxx b/xmlsecurity/source/helper/xsecsign.cxx index 25ba21eac237..29ea604eb788 100644 --- a/xmlsecurity/source/helper/xsecsign.cxx +++ b/xmlsecurity/source/helper/xsecsign.cxx @@ -165,14 +165,14 @@ cssu::Reference< cssxc::sax::XReferenceResolvedListener > XSecController::prepar internalSignatureInfor.signatureInfor.ouSignatureId = createId(); internalSignatureInfor.signatureInfor.ouPropertyId = createId(); - internalSignatureInfor.addReference(TYPE_SAMEDOCUMENT_REFERENCE, internalSignatureInfor.signatureInfor.ouPropertyId, -1 ); + internalSignatureInfor.addReference(SignatureReferenceType::SAMEDOCUMENT, internalSignatureInfor.signatureInfor.ouPropertyId, -1 ); size++; if (!internalSignatureInfor.signatureInfor.ouDescription.isEmpty()) { // Only mention the hash of the description in the signature if it's non-empty. internalSignatureInfor.signatureInfor.ouDescriptionPropertyId = createId(); - internalSignatureInfor.addReference(TYPE_SAMEDOCUMENT_REFERENCE, internalSignatureInfor.signatureInfor.ouDescriptionPropertyId, -1); + internalSignatureInfor.addReference(SignatureReferenceType::SAMEDOCUMENT, internalSignatureInfor.signatureInfor.ouDescriptionPropertyId, -1); size++; } @@ -192,7 +192,7 @@ cssu::Reference< cssxc::sax::XReferenceResolvedListener > XSecController::prepar void XSecController::signAStream( sal_Int32 securityId, const OUString& uri, const OUString& /*objectURL*/, bool isBinary) { - sal_Int32 type = isBinary ? TYPE_BINARYSTREAM_REFERENCE : TYPE_XMLSTREAM_REFERENCE; + SignatureReferenceType type = isBinary ? SignatureReferenceType::BINARYSTREAM : SignatureReferenceType::XMLSTREAM; int index = findSignatureInfor( securityId ); diff --git a/xmlsecurity/source/helper/xsecverify.cxx b/xmlsecurity/source/helper/xsecverify.cxx index a3fa87ae4e41..6f09354a1e36 100644 --- a/xmlsecurity/source/helper/xsecverify.cxx +++ b/xmlsecurity/source/helper/xsecverify.cxx @@ -119,14 +119,14 @@ void XSecController::addReference( const OUString& ouUri) return; } InternalSignatureInformation &isi = m_vInternalSignatureInformations.back(); - isi.addReference(TYPE_SAMEDOCUMENT_REFERENCE,ouUri, -1 ); + isi.addReference(SignatureReferenceType::SAMEDOCUMENT,ouUri, -1 ); } void XSecController::addStreamReference( const OUString& ouUri, bool isBinary ) { - sal_Int32 type = (isBinary?TYPE_BINARYSTREAM_REFERENCE:TYPE_XMLSTREAM_REFERENCE); + SignatureReferenceType type = (isBinary?SignatureReferenceType::BINARYSTREAM:SignatureReferenceType::XMLSTREAM); if (m_vInternalSignatureInformations.empty()) { @@ -173,7 +173,7 @@ void XSecController::setReferenceCount() const for(int i=0 ; i<refNum; ++i) { - if (refInfors[i].nType == TYPE_SAMEDOCUMENT_REFERENCE ) + if (refInfors[i].nType == SignatureReferenceType::SAMEDOCUMENT ) /* * same-document reference */ |