summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--extensions/source/ole/oleobjw.cxx2
-rw-r--r--package/source/zippackage/ZipPackage.cxx4
-rw-r--r--package/source/zippackage/ZipPackageFolder.cxx22
-rw-r--r--package/source/zippackage/ZipPackageStream.cxx8
-rw-r--r--xmlsecurity/source/component/documentdigitalsignatures.cxx2
-rw-r--r--xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx2
6 files changed, 20 insertions, 20 deletions
diff --git a/extensions/source/ole/oleobjw.cxx b/extensions/source/ole/oleobjw.cxx
index 4c772288fe16..a8f0f5b45092 100644
--- a/extensions/source/ole/oleobjw.cxx
+++ b/extensions/source/ole/oleobjw.cxx
@@ -332,7 +332,7 @@ void SAL_CALL IUnknownWrapper_Impl::setValue( const OUString& aPropertyName,
OUString msg(OUSTR("[automation bridge] Property ") + aPropertyName +
OUSTR(" is read-only"));
OString sMsg = OUStringToOString(msg, osl_getThreadTextEncoding());
- OSL_ENSURE(0, sMsg.getStr());
+ OSL_FAIL(sMsg.getStr());
// ignore silently
return;
}
diff --git a/package/source/zippackage/ZipPackage.cxx b/package/source/zippackage/ZipPackage.cxx
index e156150fb9f8..2ce94b126ba2 100644
--- a/package/source/zippackage/ZipPackage.cxx
+++ b/package/source/zippackage/ZipPackage.cxx
@@ -988,7 +988,7 @@ void ZipPackage::WriteMimetypeMagicFile( ZipOutputStream& aZipOut )
}
catch ( ::com::sun::star::io::IOException & r )
{
- OSL_ENSURE( 0, "Error adding mimetype to the ZipOutputStream" );
+ OSL_FAIL( "Error adding mimetype to the ZipOutputStream" );
throw WrappedTargetException(
OUString( RTL_CONSTASCII_USTRINGPARAM ( OSL_LOG_PREFIX "Error adding mimetype to the ZipOutputStream!" ) ),
static_cast < OWeakObject * > ( this ),
@@ -1033,7 +1033,7 @@ void ZipPackage::WriteManifest( ZipOutputStream& aZipOut, const vector< Sequence
}
else
{
- OSL_ENSURE ( 0, "Couldn't get a ManifestWriter!" );
+ OSL_FAIL( "Couldn't get a ManifestWriter!" );
IOException aException;
throw WrappedTargetException(
OUString( RTL_CONSTASCII_USTRINGPARAM ( OSL_LOG_PREFIX "Couldn't get a ManifestWriter!" ) ),
diff --git a/package/source/zippackage/ZipPackageFolder.cxx b/package/source/zippackage/ZipPackageFolder.cxx
index 34170c4594b3..002d62d96319 100644
--- a/package/source/zippackage/ZipPackageFolder.cxx
+++ b/package/source/zippackage/ZipPackageFolder.cxx
@@ -341,12 +341,12 @@ void ZipPackageFolder::saveContents(OUString &rPath, std::vector < Sequence < Pr
}
catch ( ZipException& )
{
- OSL_ENSURE( 0, "Error writing ZipOutputStream" );
+ OSL_FAIL( "Error writing ZipOutputStream" );
bWritingFailed = sal_True;
}
catch ( IOException& )
{
- OSL_ENSURE( 0, "Error writing ZipOutputStream" );
+ OSL_FAIL( "Error writing ZipOutputStream" );
bWritingFailed = sal_True;
}
}
@@ -437,7 +437,7 @@ void ZipPackageFolder::saveContents(OUString &rPath, std::vector < Sequence < Pr
if ( !xStream.is() )
{
- OSL_ENSURE( 0, "ZipPackageStream didn't have a stream associated with it, skipping!" );
+ OSL_FAIL( "ZipPackageStream didn't have a stream associated with it, skipping!" );
bWritingFailed = sal_True;
continue;
}
@@ -490,14 +490,14 @@ void ZipPackageFolder::saveContents(OUString &rPath, std::vector < Sequence < Pr
}
else
{
- OSL_ENSURE( 0, "The package component requires that every stream either be FROM a package or it must support XSeekable!" );
+ OSL_FAIL( "The package component requires that every stream either be FROM a package or it must support XSeekable!" );
continue;
}
}
}
catch ( Exception& )
{
- OSL_ENSURE( 0, "The stream provided to the package component has problems!" );
+ OSL_FAIL( "The stream provided to the package component has problems!" );
bWritingFailed = sal_True;
continue;
}
@@ -560,7 +560,7 @@ void ZipPackageFolder::saveContents(OUString &rPath, std::vector < Sequence < Pr
if ( !xStream.is() )
{
// Make sure that we actually _got_ a new one !
- OSL_ENSURE( 0, "ZipPackageStream didn't have a stream associated with it, skipping!" );
+ OSL_FAIL( "ZipPackageStream didn't have a stream associated with it, skipping!" );
continue;
}
}
@@ -588,12 +588,12 @@ void ZipPackageFolder::saveContents(OUString &rPath, std::vector < Sequence < Pr
}
catch ( ZipException& )
{
- OSL_ENSURE( 0, "Error writing ZipOutputStream" );
+ OSL_FAIL( "Error writing ZipOutputStream" );
bWritingFailed = sal_True;
}
catch ( IOException& )
{
- OSL_ENSURE( 0, "Error writing ZipOutputStream" );
+ OSL_FAIL( "Error writing ZipOutputStream" );
bWritingFailed = sal_True;
}
}
@@ -615,7 +615,7 @@ void ZipPackageFolder::saveContents(OUString &rPath, std::vector < Sequence < Pr
if ( !xStream.is() )
{
// Make sure that we actually _got_ a new one !
- OSL_ENSURE( 0, "ZipPackageStream didn't have a stream associated with it, skipping!" );
+ OSL_FAIL( "ZipPackageStream didn't have a stream associated with it, skipping!" );
continue;
}
}
@@ -645,12 +645,12 @@ void ZipPackageFolder::saveContents(OUString &rPath, std::vector < Sequence < Pr
}
catch ( ZipException& )
{
- OSL_ENSURE( 0, "Error writing ZipOutputStream" );
+ OSL_FAIL( "Error writing ZipOutputStream" );
bWritingFailed = sal_True;
}
catch ( IOException& )
{
- OSL_ENSURE( 0, "Error writing ZipOutputStream" );
+ OSL_FAIL( "Error writing ZipOutputStream" );
bWritingFailed = sal_True;
}
diff --git a/package/source/zippackage/ZipPackageStream.cxx b/package/source/zippackage/ZipPackageStream.cxx
index 318a6a52b873..7a299ce33262 100644
--- a/package/source/zippackage/ZipPackageStream.cxx
+++ b/package/source/zippackage/ZipPackageStream.cxx
@@ -417,12 +417,12 @@ Reference< io::XInputStream > SAL_CALL ZipPackageStream::getRawData()
}
catch (ZipException &)//rException)
{
- OSL_ENSURE( 0, "ZipException thrown");//rException.Message);
+ OSL_FAIL( "ZipException thrown");//rException.Message);
return Reference < io::XInputStream > ();
}
catch (Exception &)
{
- OSL_ENSURE( 0, "Exception is thrown during stream wrapping!\n");
+ OSL_FAIL( "Exception is thrown during stream wrapping!\n");
return Reference < io::XInputStream > ();
}
}
@@ -448,12 +448,12 @@ Reference< io::XInputStream > SAL_CALL ZipPackageStream::getInputStream( )
}
catch (ZipException &)//rException)
{
- OSL_ENSURE( 0,"ZipException thrown");//rException.Message);
+ OSL_FAIL( "ZipException thrown");//rException.Message);
return Reference < io::XInputStream > ();
}
catch (Exception &)
{
- OSL_ENSURE( 0, "Exception is thrown during stream wrapping!\n");
+ OSL_FAIL( "Exception is thrown during stream wrapping!\n");
return Reference < io::XInputStream > ();
}
}
diff --git a/xmlsecurity/source/component/documentdigitalsignatures.cxx b/xmlsecurity/source/component/documentdigitalsignatures.cxx
index 99c2ab5ccab1..50f63636904b 100644
--- a/xmlsecurity/source/component/documentdigitalsignatures.cxx
+++ b/xmlsecurity/source/component/documentdigitalsignatures.cxx
@@ -340,7 +340,7 @@ DocumentDigitalSignatures::ImplVerifySignatures(
rSigInfo.CertificateStatus = xSecEnv->verifyCertificate(rSigInfo.Signer,
Sequence<Reference<css::security::XCertificate> >());
} catch (SecurityException& ) {
- OSL_ENSURE(0, "Verification of certificate failed");
+ OSL_FAIL("Verification of certificate failed");
rSigInfo.CertificateStatus = css::security::CertificateValidity::INVALID;
}
}
diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
index d4f08d7190de..0ab9ea2a458c 100644
--- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
+++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
@@ -640,7 +640,7 @@ void DigitalSignaturesDialog::ImplFillSignaturesBox()
nValidCerts++;
} catch (css::uno::SecurityException& ) {
- OSL_ENSURE(0, "Verification of certificate failed");
+ OSL_FAIL("Verification of certificate failed");
bCertValid = false;
}