diff options
author | Chris Sherlock <chris.sherlock79@gmail.com> | 2017-05-07 13:03:03 +1000 |
---|---|---|
committer | Chris Sherlock <chris.sherlock79@gmail.com> | 2017-05-07 13:03:03 +1000 |
commit | a85694c4c7aae17aae3f419ef935ae5cab39b174 (patch) | |
tree | eebf8391cb55a8ca8bc382c641e714ee0c9447d1 | |
parent | 48de83aa42166f0107ad5d98fce491d21173741f (diff) |
tdf#43157: convert xmlsecurity module away from OSL_ASSERT to assert
Change-Id: Ib5297ceb307e8f8d475b7ff0523e6a57f72434a5
10 files changed, 16 insertions, 16 deletions
diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx index cedcb3ebc1d5..60d596b6eab9 100644 --- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx +++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx @@ -261,7 +261,7 @@ bool DigitalSignaturesDialog::canAddRemove() // It's always possible to append a PDF signature. return ret; - OSL_ASSERT(maSignatureManager.mxStore.is()); + assert(maSignatureManager.mxStore.is()); bool bDoc1_1 = DocumentSignatureHelper::isODFPre_1_2(m_sODFVersion); SaveODFItem item; bool bSave1_1 = item.isLessODF1_2(); diff --git a/xmlsecurity/source/dialogs/resourcemanager.cxx b/xmlsecurity/source/dialogs/resourcemanager.cxx index e989af368b60..676f50d803be 100644 --- a/xmlsecurity/source/dialogs/resourcemanager.cxx +++ b/xmlsecurity/source/dialogs/resourcemanager.cxx @@ -157,7 +157,7 @@ vector< pair< OUString, OUString> > parseDN(const OUString& rRawString) //then we have reached the end of the value if (!bInValue) { - OSL_ASSERT(!sType.isEmpty()); + assert(!sType.isEmpty()); retVal.push_back(make_pair(sType, sbufValue.makeStringAndClear())); sType.clear(); //The next char is the start of the new type @@ -180,7 +180,7 @@ vector< pair< OUString, OUString> > parseDN(const OUString& rRawString) } if (sbufValue.getLength()) { - OSL_ASSERT(!sType.isEmpty()); + assert(!sType.isEmpty()); retVal.push_back(make_pair(sType, sbufValue.makeStringAndClear())); } return retVal; @@ -252,7 +252,7 @@ vector< pair< OUString, OUString> > parseDN(const OUString& rRawString) //then we have reached the end of the value if (!bInValue) { - OSL_ASSERT(!sType.isEmpty()); + assert(!sType.isEmpty()); retVal.push_back(make_pair(sType, sbufValue.makeStringAndClear())); sType.clear(); //The next char is the start of the new type @@ -278,7 +278,7 @@ vector< pair< OUString, OUString> > parseDN(const OUString& rRawString) } if (!sbufValue.isEmpty()) { - OSL_ASSERT(!sType.isEmpty()); + assert(!sType.isEmpty()); retVal.push_back(make_pair(sType, sbufValue.makeStringAndClear())); } return retVal; diff --git a/xmlsecurity/source/framework/buffernode.cxx b/xmlsecurity/source/framework/buffernode.cxx index 462a98c4ee62..5b56b2653893 100644 --- a/xmlsecurity/source/framework/buffernode.cxx +++ b/xmlsecurity/source/framework/buffernode.cxx @@ -187,7 +187,7 @@ void BufferNode::setBlocker(const ElementMark* pBlocker) * old blocker on this BufferNode, if there is one, will be overcasted. ******************************************************************************/ { - OSL_ASSERT(!(m_pBlocker != nullptr && pBlocker != nullptr)); + assert(!(m_pBlocker != nullptr && pBlocker != nullptr)); m_pBlocker = const_cast<ElementMark*>(pBlocker); if (m_pBlocker != nullptr) diff --git a/xmlsecurity/source/framework/saxeventkeeperimpl.cxx b/xmlsecurity/source/framework/saxeventkeeperimpl.cxx index 934be03f7edc..1283b7acd887 100644 --- a/xmlsecurity/source/framework/saxeventkeeperimpl.cxx +++ b/xmlsecurity/source/framework/saxeventkeeperimpl.cxx @@ -848,7 +848,7 @@ sal_Int32 SAXEventKeeperImpl::createBlocker() sal_Int32 nId = m_nNextElementMarkId; m_nNextElementMarkId ++; - OSL_ASSERT(m_pNewBlocker == nullptr); + assert(m_pNewBlocker == nullptr); m_pNewBlocker = new ElementMark(cssxc::sax::ConstOfSecurityId::UNDEFINEDSECURITYID, nId); m_vElementMarkBuffers.push_back( m_pNewBlocker ); @@ -1170,7 +1170,7 @@ void SAL_CALL SAXEventKeeperImpl::setDocumentLocator( const cssu::Reference< css /* XInitialization */ void SAL_CALL SAXEventKeeperImpl::initialize( const cssu::Sequence< cssu::Any >& aArguments ) { - OSL_ASSERT(aArguments.getLength() == 1); + assert(aArguments.getLength() == 1); aArguments[0] >>= m_xXMLDocument; m_xDocumentHandler.set( m_xXMLDocument, cssu::UNO_QUERY ); diff --git a/xmlsecurity/source/framework/signaturecreatorimpl.cxx b/xmlsecurity/source/framework/signaturecreatorimpl.cxx index d938601afed7..53ee5ebcb2b8 100644 --- a/xmlsecurity/source/framework/signaturecreatorimpl.cxx +++ b/xmlsecurity/source/framework/signaturecreatorimpl.cxx @@ -166,7 +166,7 @@ void SAL_CALL SignatureCreatorImpl::removeSignatureCreationResultListener( /* XInitialization */ void SAL_CALL SignatureCreatorImpl::initialize( const cssu::Sequence< cssu::Any >& aArguments ) { - OSL_ASSERT(aArguments.getLength() == 5); + assert(aArguments.getLength() == 5); OUString ouTempString; diff --git a/xmlsecurity/source/framework/signatureverifierimpl.cxx b/xmlsecurity/source/framework/signatureverifierimpl.cxx index 0ae3b619ddcc..f31781438e7f 100644 --- a/xmlsecurity/source/framework/signatureverifierimpl.cxx +++ b/xmlsecurity/source/framework/signatureverifierimpl.cxx @@ -120,7 +120,7 @@ void SAL_CALL SignatureVerifierImpl::removeSignatureVerifyResultListener( void SAL_CALL SignatureVerifierImpl::initialize( const cssu::Sequence< cssu::Any >& aArguments ) { - OSL_ASSERT(aArguments.getLength() == 5); + assert(aArguments.getLength() == 5); OUString ouTempString; diff --git a/xmlsecurity/source/helper/documentsignaturehelper.cxx b/xmlsecurity/source/helper/documentsignaturehelper.cxx index 96f78aaa6c80..028cb3b8c8e3 100644 --- a/xmlsecurity/source/helper/documentsignaturehelper.cxx +++ b/xmlsecurity/source/helper/documentsignaturehelper.cxx @@ -163,7 +163,7 @@ DocumentSignatureAlgorithm DocumentSignatureHelper::getDocumentAlgorithm( const OUString & sODFVersion, const SignatureInformation & sigInfo) { - OSL_ASSERT(!sODFVersion.isEmpty()); + assert(!sODFVersion.isEmpty()); DocumentSignatureAlgorithm mode = DocumentSignatureAlgorithm::OOo3_2; if (!isOOo3_2_Signature(sigInfo)) { diff --git a/xmlsecurity/source/helper/xmlsignaturehelper2.cxx b/xmlsecurity/source/helper/xmlsignaturehelper2.cxx index d63052996763..44158d33d6de 100644 --- a/xmlsecurity/source/helper/xmlsignaturehelper2.cxx +++ b/xmlsecurity/source/helper/xmlsignaturehelper2.cxx @@ -68,7 +68,7 @@ uno::Reference< io::XInputStream > SAL_CALL UriBindingHelper::getUriBinding( con uno::Reference < io::XInputStream > UriBindingHelper::OpenInputStream( const uno::Reference < embed::XStorage >& rxStore, const OUString& rURI ) { - OSL_ASSERT(!rURI.isEmpty()); + assert(!rURI.isEmpty()); uno::Reference < io::XInputStream > xInStream; OUString aURI(rURI); diff --git a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx index 959e62cc34e0..cf532cb0f734 100644 --- a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx +++ b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx @@ -583,7 +583,7 @@ verifyCertificate( const Reference< csss::XCertificate >& aCert, //CERT_PKIXVerifyCert does not take a db as argument. It will therefore //internally use CERT_GetDefaultCertDB //Make sure m_pHandler is the default DB - OSL_ASSERT(m_pHandler == CERT_GetDefaultCertDB()); + assert(m_pHandler == CERT_GetDefaultCertDB()); CERTCertDBHandle * certDb = m_pHandler != nullptr ? m_pHandler : CERT_GetDefaultCertDB(); cert = xcert->getNssCert() ; if( cert != nullptr ) diff --git a/xmlsecurity/source/xmlsec/xmldocumentwrapper_xmlsecimpl.cxx b/xmlsecurity/source/xmlsec/xmldocumentwrapper_xmlsecimpl.cxx index 1a40f347d74f..321b76da6fa3 100644 --- a/xmlsecurity/source/xmlsec/xmldocumentwrapper_xmlsecimpl.cxx +++ b/xmlsecurity/source/xmlsec/xmldocumentwrapper_xmlsecimpl.cxx @@ -103,7 +103,7 @@ void XMLDocumentWrapper_XmlSecImpl::getNextSAXEvent() * NODEPOSITION_NORMAL for other SAX events; ******************************************************************************/ { - OSL_ASSERT( m_pCurrentElement != nullptr ); + assert( m_pCurrentElement != nullptr ); /* * Get the next event through tree order. @@ -525,7 +525,7 @@ void XMLDocumentWrapper_XmlSecImpl::removeNode(const xmlNodePtr pNode) const ******************************************************************************/ { /* you can't remove the current node */ - OSL_ASSERT( m_pCurrentElement != pNode ); + assert( m_pCurrentElement != pNode ); xmlAttrPtr pAttr = pNode->properties; @@ -604,7 +604,7 @@ void SAL_CALL XMLDocumentWrapper_XmlSecImpl::setCurrentElement( const cssu::Refe void SAL_CALL XMLDocumentWrapper_XmlSecImpl::removeCurrentElement( ) { - OSL_ASSERT( m_pCurrentElement != nullptr ); + assert( m_pCurrentElement != nullptr ); xmlNodePtr pOldCurrentElement = m_pCurrentElement; |