Kaydet (Commit) a85694c4 authored tarafından Chris Sherlock's avatar Chris Sherlock

tdf#43157: convert xmlsecurity module away from OSL_ASSERT to assert

Change-Id: Ib5297ceb307e8f8d475b7ff0523e6a57f72434a5
üst 48de83aa
......@@ -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();
......
......@@ -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;
......
......@@ -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)
......
......@@ -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 );
......
......@@ -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;
......
......@@ -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;
......
......@@ -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))
{
......
......@@ -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);
......
......@@ -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 )
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment