diff options
author | Rohan Kumar <rohankanojia420@gmail.com> | 2016-03-08 23:41:03 +0530 |
---|---|---|
committer | Björn Michaelsen <bjoern.michaelsen@canonical.com> | 2016-04-12 11:53:28 +0000 |
commit | 31bddb874d2be54b81cdd7ea142b58db18e11a5b (patch) | |
tree | c5a5a245c6da1b72d30471875f0bb6a8951d2afb | |
parent | 35d7ca80930997febb31eb7cdd95eeb684514bec (diff) |
tdf#91794 removed OSL_DEBUG_LEVEL > 1 conditionals
I removed all the OSL_DEBUG_LEVEL > 1 conditionals by SAL_INFOs
or OSL_DEBUG_LEVEL > 0
Change-Id: I261644a179e763612204bbb0e54a869fa1a62298
Reviewed-on: https://gerrit.libreoffice.org/23035
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
-rw-r--r-- | stoc/source/corereflection/crefl.cxx | 7 | ||||
-rw-r--r-- | stoc/source/invocation_adapterfactory/iafactory.cxx | 4 | ||||
-rw-r--r-- | stoc/source/javavm/javavm.cxx | 28 | ||||
-rw-r--r-- | stoc/source/servicemanager/servicemanager.cxx | 31 | ||||
-rw-r--r-- | stoc/test/testconv.cxx | 4 |
5 files changed, 14 insertions, 60 deletions
diff --git a/stoc/source/corereflection/crefl.cxx b/stoc/source/corereflection/crefl.cxx index 3304233caf3f..d0e9e8cc4a83 100644 --- a/stoc/source/corereflection/crefl.cxx +++ b/stoc/source/corereflection/crefl.cxx @@ -210,12 +210,7 @@ inline Reference< XIdlClass > IdlReflectionServiceImpl::constructClass( return new IdlClassImpl( this, pTypeDescr->pTypeName, pTypeDescr->eTypeClass, pTypeDescr ); default: -#if OSL_DEBUG_LEVEL > 1 - OSL_TRACE( "### corereflection type unsupported: " ); - OString aName( OUStringToOString( pTypeDescr->pTypeName, RTL_TEXTENCODING_ASCII_US ) ); - OSL_TRACE( "%s", aName.getStr() ); - OSL_TRACE( "\n" ); -#endif + SAL_INFO("stoc", " corereflection type unsupported: " << pTypeDescr->pTypeName); return Reference< XIdlClass >(); } } diff --git a/stoc/source/invocation_adapterfactory/iafactory.cxx b/stoc/source/invocation_adapterfactory/iafactory.cxx index 4ed0b8f2d073..e40e8b7895cb 100644 --- a/stoc/source/invocation_adapterfactory/iafactory.cxx +++ b/stoc/source/invocation_adapterfactory/iafactory.cxx @@ -756,8 +756,8 @@ FactoryImpl::~FactoryImpl() (*m_pConverter->release)( m_pConverter ); -#if OSL_DEBUG_LEVEL > 1 - OSL_ENSURE( m_receiver2adapters.empty(), "### still adapters out there!?" ); +#if OSL_DEBUG_LEVEL > 0 + assert(m_receiver2adapters.empty() && " still adapters out there!?"); #endif } diff --git a/stoc/source/javavm/javavm.cxx b/stoc/source/javavm/javavm.cxx index 290198c6451c..c81fe0cc6a30 100644 --- a/stoc/source/javavm/javavm.cxx +++ b/stoc/source/javavm/javavm.cxx @@ -500,24 +500,14 @@ void initVMConfiguration( getINetPropsFromConfig(&jvm, xSMgr, xCtx); } catch(const css::uno::Exception & exception) { -#if OSL_DEBUG_LEVEL > 1 - OString message = OUStringToOString(exception.Message, RTL_TEXTENCODING_ASCII_US); - OSL_TRACE("javavm.cxx: can not get INetProps cause of >%s<", message.getStr()); -#else - (void) exception; // unused -#endif + SAL_INFO("stoc", " can not get INETProps because of >" << exception.Message << "<"); } try { getDefaultLocaleFromConfig(&jvm, xSMgr,xCtx); } catch(const css::uno::Exception & exception) { -#if OSL_DEBUG_LEVEL > 1 - OString message = OUStringToOString(exception.Message, RTL_TEXTENCODING_ASCII_US); - OSL_TRACE("javavm.cxx: can not get locale cause of >%s<", message.getStr()); -#else - (void) exception; // unused -#endif + SAL_INFO("stoc", "can not get locale because of >" << exception.Message << "<"); } try @@ -525,12 +515,7 @@ void initVMConfiguration( getJavaPropsFromSafetySettings(&jvm, xSMgr, xCtx); } catch(const css::uno::Exception & exception) { -#if OSL_DEBUG_LEVEL > 1 - OString message = OUStringToOString(exception.Message, RTL_TEXTENCODING_ASCII_US); - OSL_TRACE("javavm.cxx: couldn't get safety settings because of >%s<", message.getStr()); -#else - (void) exception; // unused -#endif + SAL_INFO("stoc", "couldn't get safety settings because of >" << exception.Message << "<"); } *pjvm= jvm; @@ -1366,12 +1351,7 @@ void JavaVirtualMachine::registerConfigChangesListener() } }catch(const css::uno::Exception & e) { -#if OSL_DEBUG_LEVEL > 1 - OString message = OUStringToOString(e.Message, RTL_TEXTENCODING_ASCII_US); - OSL_TRACE("javavm.cxx: could not set up listener for Configuration because of >%s<", message.getStr()); -#else - (void) e; // unused -#endif + SAL_INFO("stoc", "could not set up listener for Configuration because of >" << e.Message << "<"); } } diff --git a/stoc/source/servicemanager/servicemanager.cxx b/stoc/source/servicemanager/servicemanager.cxx index 861e73f102de..55c2c9b133e7 100644 --- a/stoc/source/servicemanager/servicemanager.cxx +++ b/stoc/source/servicemanager/servicemanager.cxx @@ -698,12 +698,7 @@ void OServiceManager::disposing() } catch (const RuntimeException & exc) { -#if OSL_DEBUG_LEVEL > 1 - OString str( OUStringToOString( exc.Message, RTL_TEXTENCODING_ASCII_US ) ); - OSL_TRACE( "### RuntimeException occurred upon disposing factory: %s", str.getStr() ); -#else - (void) exc; // unused -#endif + SAL_INFO("stoc", "RuntimeException occurred upon disposing factory: " << exc.Message); } } @@ -896,10 +891,7 @@ Reference< XInterface > OServiceManager::createInstanceWithContext( Reference< XSingleServiceFactory > xFac2( xFactory, UNO_QUERY ); if (xFac2.is()) { -#if OSL_DEBUG_LEVEL > 1 - OString aStr( OUStringToOString( rServiceSpecifier, RTL_TEXTENCODING_ASCII_US ) ); - OSL_TRACE( "### ignoring given context raising service %s !!!", aStr.getStr() ); -#endif + SAL_INFO("stoc", " ignoring given context raising service " << rServiceSpecifier << "!!!"); return xFac2->createInstance(); } } @@ -907,12 +899,7 @@ Reference< XInterface > OServiceManager::createInstanceWithContext( } catch (const lang::DisposedException & exc) { -#if OSL_DEBUG_LEVEL > 1 - OString str( OUStringToOString( exc.Message, RTL_TEXTENCODING_ASCII_US ) ); - OSL_TRACE( "### DisposedException occurred: %s", str.getStr() ); -#else - (void) exc; // unused -#endif + SAL_INFO("stoc", " DisposedException occurred: " << exc.Message); } } @@ -959,10 +946,7 @@ Reference< XInterface > OServiceManager::createInstanceWithArgumentsAndContext( Reference< XSingleServiceFactory > xFac2( xFactory, UNO_QUERY ); if (xFac2.is()) { -#if OSL_DEBUG_LEVEL > 1 - OString aStr( OUStringToOString( rServiceSpecifier, RTL_TEXTENCODING_ASCII_US ) ); - OSL_TRACE( "### ignoring given context raising service %s !!!", aStr.getStr() ); -#endif + SAL_INFO("stoc", " ignoring given context raising service " << rServiceSpecifier << "!!!"); return xFac2->createInstanceWithArguments( rArguments ); } } @@ -970,12 +954,7 @@ Reference< XInterface > OServiceManager::createInstanceWithArgumentsAndContext( } catch (const lang::DisposedException & exc) { -#if OSL_DEBUG_LEVEL > 1 - OString str( OUStringToOString( exc.Message, RTL_TEXTENCODING_ASCII_US ) ); - OSL_TRACE( "### DisposedException occurred: %s", str.getStr() ); -#else - (void) exc; // unused -#endif + SAL_INFO("stoc", " DisposedException occurred: " << exc.Message); } } diff --git a/stoc/test/testconv.cxx b/stoc/test/testconv.cxx index d78e77b01db4..afe682fb8631 100644 --- a/stoc/test/testconv.cxx +++ b/stoc/test/testconv.cxx @@ -187,7 +187,7 @@ static sal_Bool convertTo( const Type & rDestType, const Any & rVal, sal_Bool bE printf( aExcMsg.getStr() ); printf( "]\n" ); aRet = s_xConverter->convertTo( rVal, rDestType ); -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 // for debugging, to trace again try { @@ -206,7 +206,7 @@ static sal_Bool convertTo( const Type & rDestType, const Any & rVal, sal_Bool bE printf( " to " ); printValue( aRet ); printf( " was successful, but was not expected to be!\n" ); -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 // for debugging, to trace again aRet = s_xConverter->convertTo( rVal, rDestType ); #endif |