From fbea669c74f686f5a75aa80384bbfeff98680f8d Mon Sep 17 00:00:00 2001 From: Chris Sherlock Date: Sun, 7 May 2017 12:54:03 +1000 Subject: tdf#43157: convert desktop module away from OSL_ASSERT to assert Change-Id: I521042a79cf93a51d84b72554d04715b321dd942 --- desktop/source/pkgchk/unopkg/unopkg_app.cxx | 2 +- desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx | 12 ++++++------ desktop/source/pkgchk/unopkg/unopkg_misc.cxx | 10 +++++----- 3 files changed, 12 insertions(+), 12 deletions(-) (limited to 'desktop/source/pkgchk/unopkg') diff --git a/desktop/source/pkgchk/unopkg/unopkg_app.cxx b/desktop/source/pkgchk/unopkg/unopkg_app.cxx index 31a93cecea8a..fa1f270b31e7 100644 --- a/desktop/source/pkgchk/unopkg/unopkg_app.cxx +++ b/desktop/source/pkgchk/unopkg/unopkg_app.cxx @@ -334,7 +334,7 @@ extern "C" int unopkg_main() else if (repository == "bundled") extensionUnorc = "$BUNDLED_EXTENSIONS_USER/registry/com.sun.star.comp.deployment.component.PackageRegistryBackend/unorc"; else - OSL_ASSERT(false); + assert(false); ::rtl::Bootstrap::expandMacros(extensionUnorc); oslFileError e = osl_removeFile(extensionUnorc.pData); diff --git a/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx b/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx index 80ed1bcec910..238cbb444e36 100644 --- a/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx +++ b/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx @@ -204,7 +204,7 @@ void CommandEnvironmentImpl::handle( Reference const & xRequest ) { Any request( xRequest->getRequest() ); - OSL_ASSERT( request.getValueTypeClass() == TypeClass_EXCEPTION ); + assert( request.getValueTypeClass() == TypeClass_EXCEPTION ); dp_misc::TRACE("[unopkg_cmdenv.cxx] incoming request:\n" + ::comphelper::anyToString(request) + "\n\n"); @@ -224,11 +224,11 @@ void CommandEnvironmentImpl::handle( // former pkgchk behaviour: const Reference xPackage( wtExc.Context, UNO_QUERY ); - OSL_ASSERT( xPackage.is() ); + assert( xPackage.is() ); if (xPackage.is()) { const Reference xPackageType( xPackage->getPackageType() ); - OSL_ASSERT( xPackageType.is() ); + assert( xPackageType.is() ); if (xPackageType.is()) { approve = (xPackage->isBundle() && xPackageType->getMediaType().match( @@ -319,7 +319,7 @@ void CommandEnvironmentImpl::handle( void CommandEnvironmentImpl::push( Any const & Status ) { update_( Status ); - OSL_ASSERT( m_logLevel >= 0 ); + assert( m_logLevel >= 0 ); ++m_logLevel; if (m_xLogFile.is()) m_xLogFile->push( Status ); @@ -351,7 +351,7 @@ void CommandEnvironmentImpl::update_( Any const & Status ) msg = buf.makeStringAndClear(); bUseErr = true; } - OSL_ASSERT( m_logLevel >= 0 ); + assert( m_logLevel >= 0 ); for ( sal_Int32 n = 0; n < m_logLevel; ++n ) { if (bUseErr) @@ -377,7 +377,7 @@ void CommandEnvironmentImpl::update( Any const & Status ) void CommandEnvironmentImpl::pop() { - OSL_ASSERT( m_logLevel > 0 ); + assert( m_logLevel > 0 ); --m_logLevel; if (m_xLogFile.is()) m_xLogFile->pop(); diff --git a/desktop/source/pkgchk/unopkg/unopkg_misc.cxx b/desktop/source/pkgchk/unopkg/unopkg_misc.cxx index c74d9e0d98aa..1615b22006b9 100644 --- a/desktop/source/pkgchk/unopkg/unopkg_misc.cxx +++ b/desktop/source/pkgchk/unopkg/unopkg_misc.cxx @@ -124,7 +124,7 @@ bool isOption( OptionInfo const * option_info, sal_uInt32 * pIndex ) bool isBootstrapVariable(sal_uInt32 * pIndex) { - OSL_ASSERT(osl_getCommandArgCount() >= *pIndex); + assert(osl_getCommandArgCount() >= *pIndex); OUString arg; osl_getCommandArg(*pIndex, &arg.pData); @@ -144,7 +144,7 @@ bool readArgument( { if (*pIndex < osl_getCommandArgCount()) { - OSL_ASSERT( pValue != nullptr ); + assert( pValue != nullptr ); osl_getCommandArg( *pIndex, &pValue->pData ); dp_misc::TRACE(__FILE__ ": argument value: " + *pValue + "\n"); @@ -273,7 +273,7 @@ void printf_package( const Reference xPackageType( xPackage->getPackageType() ); - OSL_ASSERT( xPackageType.is() ); + assert( xPackageType.is() ); if (xPackageType.is()) { printf_line( "Media-Type", xPackageType->getMediaType(), level + 1 ); } @@ -310,7 +310,7 @@ void printf_packages( std::vector const & vecUnaccepted, Reference const & xCmdEnv, sal_Int32 level ) { - OSL_ASSERT(allExtensions.size() == vecUnaccepted.size()); + assert(allExtensions.size() == vecUnaccepted.size()); if (allExtensions.empty()) { @@ -383,7 +383,7 @@ Reference connectToOffice( if (verbose) dp_misc::writeConsole("OK. Connecting..."); - OSL_ASSERT( buf.isEmpty() ); + assert( buf.isEmpty() ); buf.append( "uno:pipe,name=" ); buf.append( pipeId ); buf.append( ";urp;StarOffice.ComponentContext" ); -- cgit