summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRadu Ioan <ioan.radu.g@gmail.com>2013-02-05 00:18:15 +0200
committerThorsten Behrens <tbehrens@suse.com>2013-02-05 15:55:01 +0100
commitf4f727f7bfc848deb82e4df4c6e3b9affaf5f613 (patch)
tree30394aa2096f73b988907028416df2913b5ceec6
parent8e633e6243e87c651586d8c16ade8af719c957b7 (diff)
fdo#43157 - Clean up OSL_ASSERT, DBG_ASSERT
- changed osl_trace with sal_info Change-Id: I6504abf50f6193db52d101ec856bcaf1ee2a982c
-rw-r--r--canvas/source/null/null_usagecounter.hxx12
-rw-r--r--oox/source/ppt/timenode.cxx56
-rw-r--r--sd/source/ui/framework/configuration/ConfigurationTracer.cxx9
3 files changed, 36 insertions, 41 deletions
diff --git a/canvas/source/null/null_usagecounter.hxx b/canvas/source/null/null_usagecounter.hxx
index 5a3260e47714..482f2207dcf9 100644
--- a/canvas/source/null/null_usagecounter.hxx
+++ b/canvas/source/null/null_usagecounter.hxx
@@ -22,6 +22,7 @@
#include <osl/interlck.h>
#include <boost/current_function.hpp>
+#include "sal/log.hxx"
namespace nullcanvas
{
@@ -36,9 +37,7 @@ namespace nullcanvas
public:
UsageCounter()
{
- OSL_TRACE( "%s, %d objects currently in use.\n",
- BOOST_CURRENT_FUNCTION,
- osl_atomic_increment( &s_nCount ) );
+ SAL_INFO("canvas.null","" << BOOST_CURRENT_FUNCTION << ", " << osl_atomic_increment( &s_nCount ) << " objects currently in use.\n");
}
~UsageCounter()
@@ -47,14 +46,11 @@ namespace nullcanvas
if( !nCount )
{
- OSL_TRACE( "%s, last instance deleted.\n",
- BOOST_CURRENT_FUNCTION );
+ SAL_INFO("canvas.null", "" << BOOST_CURRENT_FUNCTION << ", last instance deleted.\n");
}
else
{
- OSL_TRACE( "%s, %d instances left.\n",
- BOOST_CURRENT_FUNCTION,
- nCount );
+ SAL_INFO("canvas.null", "" << BOOST_CURRENT_FUNCTION << ", " << nCount << " instances left.\n");
}
}
diff --git a/oox/source/ppt/timenode.cxx b/oox/source/ppt/timenode.cxx
index eb0f55b845ac..cd3cd6401082 100644
--- a/oox/source/ppt/timenode.cxx
+++ b/oox/source/ppt/timenode.cxx
@@ -40,6 +40,7 @@
#include "oox/helper/helper.hxx"
#include "oox/core/xmlfilterbase.hxx"
+#include "sal/log.hxx"
using namespace ::oox::core;
using namespace ::com::sun::star::beans;
@@ -88,7 +89,7 @@ namespace oox { namespace ppt {
sServiceName = "com.sun.star.animations.Audio";
break;
default:
- OSL_TRACE( "OOX: uhandled type %x", nNodeType );
+ SAL_INFO("oox.ppt","OOX: uhandled type " << nNodeType );
break;
}
return sServiceName;
@@ -170,7 +171,7 @@ namespace oox { namespace ppt {
catch( Exception& e )
{
(void)e;
- OSL_TRACE("fixMainSequenceTiming(), exception caught!" );
+ SAL_INFO("oox.ppt","fixMainSequenceTiming(), exception caught!" );
}
}
@@ -196,7 +197,7 @@ namespace oox { namespace ppt {
catch( Exception& e )
{
(void)e;
- OSL_TRACE("fixInteractiveSequenceTiming(), exception caught!" );
+ SAL_INFO("oox.ppt","fixInteractiveSequenceTiming(), exception caught!" );
}
}
@@ -211,14 +212,14 @@ namespace oox { namespace ppt {
}
catch( const Exception& e )
{
- OSL_TRACE( "OOX: exception raised in TimeNode::addNode() - %s",
+ SAL_INFO("oox.ppt","OOX: exception raised in TimeNode::addNode() - " <<
OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).getStr() );
}
}
void TimeNode::setNode( const XmlFilterBase& rFilter, const Reference< XAnimationNode >& xNode, const SlidePersistPtr & pSlide )
{
- OSL_ENSURE( xNode.is(), "null node passed" );
+ SAL_WARN_IF( !xNode.is(), "oox.ppt", "null node passed" );
try {
if( !msId.isEmpty() )
@@ -331,7 +332,7 @@ namespace oox { namespace ppt {
xAnimate->setSubItem( nInt16 );
else
{
- OSL_TRACE( "any >>= failed %d", __LINE__ );
+ SAL_INFO("oox.ppt","any >>= failed " << __LINE__ );
}
}
break;
@@ -342,7 +343,7 @@ namespace oox { namespace ppt {
xAnimate->setAttributeName( sString );
else
{
- OSL_TRACE( "any >>= failed %d", __LINE__ );
+ SAL_INFO("oox.ppt","any >>= failed " << __LINE__ );
}
}
break;
@@ -353,7 +354,7 @@ namespace oox { namespace ppt {
xAnimate->setCalcMode( nInt16 );
else
{
- OSL_TRACE( "any >>= failed %d", __LINE__ );
+ SAL_INFO("oox.ppt","any >>= failed " << __LINE__ );
}
}
break;
@@ -365,7 +366,7 @@ namespace oox { namespace ppt {
xAnimate->setKeyTimes(aKeyTimes);
else
{
- OSL_TRACE( "any >>= failed %d", __LINE__ );
+ SAL_INFO("oox.ppt","any >>= failed " << __LINE__ );
}
}
break;
@@ -377,7 +378,7 @@ namespace oox { namespace ppt {
xAnimate->setValues(aValues);
else
{
- OSL_TRACE( "any >>= failed %d", __LINE__ );
+ SAL_INFO("oox.ppt","any >>= failed " << __LINE__ );
}
}
break;
@@ -388,7 +389,7 @@ namespace oox { namespace ppt {
xAnimate->setFormula(sString);
else
{
- OSL_TRACE( "any >>= failed %d", __LINE__ );
+ SAL_INFO("oox.ppt","any >>= failed " << __LINE__ );
}
}
break;
@@ -399,7 +400,7 @@ namespace oox { namespace ppt {
xAnimateColor->setColorInterpolation( nInt16 );
else
{
- OSL_TRACE( "any >>= failed %d", __LINE__ );
+ SAL_INFO("oox.ppt","any >>= failed " << __LINE__ );
}
}
break;
@@ -410,7 +411,7 @@ namespace oox { namespace ppt {
xAnimateColor->setDirection( bBool );
else
{
- OSL_TRACE( "any >>= failed %d", __LINE__ );
+ SAL_INFO("oox.ppt","any >>= failed " << __LINE__ );
}
}
break;
@@ -425,7 +426,7 @@ namespace oox { namespace ppt {
xAnimateTransform->setTransformType( nInt16 );
else
{
- OSL_TRACE( "any >>= failed %d", __LINE__ );
+ SAL_INFO("oox.ppt","any >>= failed " << __LINE__ );
}
}
break;
@@ -434,7 +435,7 @@ namespace oox { namespace ppt {
xNode->setUserData( aSeq );
else
{
- OSL_TRACE( "any >>= failed %d", __LINE__ );
+ SAL_INFO("oox.ppt","any >>= failed " << __LINE__ );
}
break;
case NP_ACCELERATION:
@@ -442,7 +443,7 @@ namespace oox { namespace ppt {
xNode->setAcceleration( fDouble );
else
{
- OSL_TRACE( "any >>= failed %d", __LINE__ );
+ SAL_INFO("oox.ppt","any >>= failed " << __LINE__ );
}
break;
case NP_DECELERATE:
@@ -450,7 +451,7 @@ namespace oox { namespace ppt {
xNode->setDecelerate( fDouble );
else
{
- OSL_TRACE( "any >>= failed %d", __LINE__ );
+ SAL_INFO("oox.ppt","any >>= failed " << __LINE__ );
}
break;
case NP_AUTOREVERSE:
@@ -458,7 +459,7 @@ namespace oox { namespace ppt {
xNode->setAutoReverse( bBool );
else
{
- OSL_TRACE( "any >>= failed %d", __LINE__ );
+ SAL_INFO("oox.ppt","any >>= failed " << __LINE__ );
}
break;
case NP_DURATION:
@@ -469,7 +470,7 @@ namespace oox { namespace ppt {
xNode->setFill( nInt16 );
else
{
- OSL_TRACE( "any >>= failed %d", __LINE__ );
+ SAL_INFO("oox.ppt","any >>= failed " << __LINE__ );
}
break;
case NP_REPEATCOUNT:
@@ -483,7 +484,7 @@ namespace oox { namespace ppt {
xNode->setRestart( nInt16 );
else
{
- OSL_TRACE( "any >>= failed %d", __LINE__ );
+ SAL_INFO("oox.ppt","any >>= failed " << __LINE__ );
}
break;
case NP_COMMAND:
@@ -493,7 +494,7 @@ namespace oox { namespace ppt {
xCommand->setCommand( nInt16 );
else
{
- OSL_TRACE( "any >>= failed %d", __LINE__ );
+ SAL_INFO("oox.ppt","any >>= failed " << __LINE__ );
}
}
break;
@@ -508,7 +509,7 @@ namespace oox { namespace ppt {
xIterateContainer->setIterateType( nInt16 );
else
{
- OSL_TRACE( "any >>= failed %d", __LINE__ );
+ SAL_INFO("oox.ppt","any >>= failed " << __LINE__ );
}
}
break;
@@ -519,12 +520,12 @@ namespace oox { namespace ppt {
xIterateContainer->setIterateInterval( fDouble );
else
{
- OSL_TRACE( "any >>= failed %d", __LINE__ );
+ SAL_INFO("oox.ppt","any >>= failed " << __LINE__ );
}
}
break;
default:
- OSL_TRACE( "ERR-OOX: unknown prop index %d", i );
+ SAL_INFO("oox.ppt","ERR-OOX: unknown prop index " << i );
break;
}
}
@@ -566,8 +567,7 @@ namespace oox { namespace ppt {
}
catch( const Exception& e )
{
- OSL_TRACE( "OOX: exception raised in TimeNode::setNode() - %s",
- OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).getStr() );
+ SAL_INFO("oox.ppt","OOX: exception raised in TimeNode::setNode() - " << OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).getStr() );
}
}
@@ -586,9 +586,7 @@ namespace oox { namespace ppt {
}
catch( const Exception& e )
{
- OSL_TRACE( "OOX: exception raised in TimeNode::createAndInsert() trying to create a service %s = %s",
- OUStringToOString( rServiceName, RTL_TEXTENCODING_ASCII_US ).getStr(),
- OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).getStr() );
+ SAL_INFO("oox.ppt","OOX: exception raised in TimeNode::createAndInsert() trying to create a service " << OUStringToOString( rServiceName, RTL_TEXTENCODING_ASCII_US).getStr() << " = " << OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).getStr() );
}
return Reference< XAnimationNode >();
diff --git a/sd/source/ui/framework/configuration/ConfigurationTracer.cxx b/sd/source/ui/framework/configuration/ConfigurationTracer.cxx
index b591c803ac9b..74839b903aee 100644
--- a/sd/source/ui/framework/configuration/ConfigurationTracer.cxx
+++ b/sd/source/ui/framework/configuration/ConfigurationTracer.cxx
@@ -21,6 +21,7 @@
#include "ConfigurationTracer.hxx"
#include <cstdio>
+#include "sal/log.hxx"
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::drawing::framework;
@@ -32,16 +33,16 @@ void ConfigurationTracer::TraceConfiguration (
const char* pMessage)
{
#ifdef DEBUG
- OSL_TRACE("%s at %p {", pMessage, rxConfiguration.get());
+ SAL_INFO("sd.ui","" << pMessage << " at " << rxConfiguration.get() << " {");
if (rxConfiguration.is())
{
TraceBoundResources(rxConfiguration, NULL, 0);
}
else
{
- OSL_TRACE(" empty");
+ SAL_INFO("sd.ui"," empty");
}
- OSL_TRACE("}");
+ SAL_INFO("sd.ui","}");
#else
(void)rxConfiguration;
(void)pMessage;
@@ -65,7 +66,7 @@ void ConfigurationTracer::TraceBoundResources (
::rtl::OUString sLine (aResourceList[nIndex]->getResourceURL());
for (int i=0; i<nIndentation; ++i)
sLine = sIndentation + sLine;
- OSL_TRACE("%s", OUStringToOString(sLine, RTL_TEXTENCODING_UTF8).getStr());
+ SAL_INFO("sd.ui","" << OUStringToOString(sLine, RTL_TEXTENCODING_UTF8).getStr());
TraceBoundResources(rxConfiguration, aResourceList[nIndex], nIndentation+1);
}
}