From 7bdc6be9c23517eec02ce7139edd7003abbee1f8 Mon Sep 17 00:00:00 2001 From: Norbert Thiebaud Date: Mon, 10 Aug 2015 14:01:33 -0500 Subject: slideshow: stop (mis)-using VERBOSE converted the use of internal 'verbose' level tracing to SAL_INFO/SAL_WARN Change-Id: Iab89d9b5c75fe476c6516718f1cee3d01d196858 Reviewed-on: https://gerrit.libreoffice.org/17632 Tested-by: Jenkins Reviewed-by: Norbert Thiebaud --- .../activities/simplecontinuousactivitybase.cxx | 15 +++++----- slideshow/source/engine/activitiesqueue.cxx | 4 +-- .../engine/animationnodes/animationbasenode.cxx | 4 +-- .../engine/animationnodes/basecontainernode.cxx | 9 +++--- .../source/engine/animationnodes/basenode.cxx | 33 +++++++++++----------- slideshow/source/engine/eventqueue.cxx | 2 +- .../source/engine/shapes/drawshapesubsetting.cxx | 12 ++------ slideshow/source/engine/shapes/viewshape.cxx | 13 +++++---- slideshow/source/engine/smilfunctionparser.cxx | 4 +-- 9 files changed, 47 insertions(+), 49 deletions(-) (limited to 'slideshow/source') diff --git a/slideshow/source/engine/activities/simplecontinuousactivitybase.cxx b/slideshow/source/engine/activities/simplecontinuousactivitybase.cxx index 347483a19712..f227e89eeb44 100644 --- a/slideshow/source/engine/activities/simplecontinuousactivitybase.cxx +++ b/slideshow/source/engine/activities/simplecontinuousactivitybase.cxx @@ -56,8 +56,8 @@ namespace slideshow const double nCurrElapsedTime( maTimer.getElapsedTime() ); // log time - VERBOSE_TRACE( "SimpleContinuousActivityBase::calcTimeLag(): " - "next step is based on time: %f", nCurrElapsedTime ); + SAL_INFO("slideshow.verbose", "SimpleContinuousActivityBase::calcTimeLag(): " + "next step is based on time: " << nCurrElapsedTime ); // go to great length to ensure a proper animation // run. Since we don't know how often we will be called @@ -90,15 +90,16 @@ namespace slideshow // time line. if( nFractionElapsedTime < nFractionRequiredCalls ) { - VERBOSE_TRACE( "SimpleContinuousActivityBase::calcTimeLag(): " - "t=%f is based on time", nFractionElapsedTime ); + SAL_INFO("slidewho.verbose", "SimpleContinuousActivityBase::calcTimeLag(): t=" << + nFractionElapsedTime << + " is based on time"); return 0.0; } else { - VERBOSE_TRACE( "SimpleContinuousActivityBase::perform(): " - "t=%f is based on number of calls", - nFractionRequiredCalls ); + SAL_INFO("slideshow.verbose", "SimpleContinuousActivityBase::perform(): t=" << + nFractionRequiredCalls << + " is based on number of calls"); // lag global time, so all other animations lag, too: return ((nFractionElapsedTime - nFractionRequiredCalls) diff --git a/slideshow/source/engine/activitiesqueue.cxx b/slideshow/source/engine/activitiesqueue.cxx index 3cca2ef46929..57459b4cdced 100644 --- a/slideshow/source/engine/activitiesqueue.cxx +++ b/slideshow/source/engine/activitiesqueue.cxx @@ -86,7 +86,7 @@ namespace slideshow void ActivitiesQueue::process() { - VERBOSE_TRACE( "ActivitiesQueue: outer loop heartbeat" ); + SAL_INFO("slideshow.verbose", "ActivitiesQueue: outer loop heartbeat" ); // accumulate time lag for all activities, and lag time // base if necessary: @@ -156,7 +156,7 @@ namespace slideshow else maDequeuedActivities.push_back( pActivity ); - VERBOSE_TRACE( "ActivitiesQueue: inner loop heartbeat" ); + SAL_INFO("slideshow.verbose", "ActivitiesQueue: inner loop heartbeat" ); } if( !maCurrentActivitiesReinsert.empty() ) diff --git a/slideshow/source/engine/animationnodes/animationbasenode.cxx b/slideshow/source/engine/animationnodes/animationbasenode.cxx index 41adb19b6435..c70ffc3664df 100644 --- a/slideshow/source/engine/animationnodes/animationbasenode.cxx +++ b/slideshow/source/engine/animationnodes/animationbasenode.cxx @@ -368,12 +368,12 @@ bool AnimationBaseNode::hasPendingAnimation() const return true; } -#if OSL_DEBUG_LEVEL >= 2 && defined(DBG_UTIL) +#if defined(DBG_UTIL) void AnimationBaseNode::showState() const { BaseNode::showState(); - VERBOSE_TRACE( "AnimationBaseNode info: independent subset=%s", + SAL_INFO( "slideshow.verbose", "AnimationBaseNode info: independent subset=" << mbIsIndependentSubset ? "y" : "n" ); } #endif diff --git a/slideshow/source/engine/animationnodes/basecontainernode.cxx b/slideshow/source/engine/animationnodes/basecontainernode.cxx index 5371c1217462..930e4be0a871 100644 --- a/slideshow/source/engine/animationnodes/basecontainernode.cxx +++ b/slideshow/source/engine/animationnodes/basecontainernode.cxx @@ -183,10 +183,11 @@ void BaseContainerNode::showState() const { BaseNodeSharedPtr pNode = boost::dynamic_pointer_cast(maChildren[i]); - VERBOSE_TRACE( - "Node connection: n%p -> n%p", - (const char*)this+debugGetCurrentOffset(), - (const char*)pNode.get()+debugGetCurrentOffset() ); + SAL_INFO("slideshow.verbose", + "Node connection: n" << + (const void*)this+debugGetCurrentOffset() << + " -> n" << + (const void*)pNode.get()+debugGetCurrentOffset() ); pNode->showState(); } diff --git a/slideshow/source/engine/animationnodes/basenode.cxx b/slideshow/source/engine/animationnodes/basenode.cxx index 4c06a809f844..f7947b0cb80d 100644 --- a/slideshow/source/engine/animationnodes/basenode.cxx +++ b/slideshow/source/engine/animationnodes/basenode.cxx @@ -686,16 +686,19 @@ void BaseNode::showState() const const AnimationNode::NodeState eNodeState( getState() ); if( eNodeState == AnimationNode::INVALID ) - VERBOSE_TRACE( "Node state: n%p [label=\"%s\",style=filled," - "fillcolor=\"0.5,0.2,0.5\"]", - (const char*)this+debugGetCurrentOffset(), - getDescription() ); + SAL_INFO("slideshow.verbose", "Node state: n" << + (const char*)this+debugGetCurrentOffset() << + " [label=\"" << + getDescription() << + "\",style=filled, fillcolor=\"0.5,0.2,0.5\"]"); else - VERBOSE_TRACE( "Node state: n%p [label=\"%s\",style=filled," - "fillcolor=\"%f,1.0,1.0\"]", - (const char*)this+debugGetCurrentOffset(), - getDescription(), - log(double(getState()))/4.0 ); + SAL_INFO("slideshow.verbose", "Node state: n" << + (const char*)this+debugGetCurrentOffset() << + " [label=\"" << + getDescription() << + "fillcolor=\"" << + log(double(getState()))/4.0 << + ",1.0,1.0\"]"); // determine additional node information uno::Reference const xAnimate( mxAnimationNode, @@ -725,13 +728,11 @@ void BaseNode::showState() const OUString("Name") ) >>= aName) ) { - const OString& rAsciiName( - OUStringToOString( aName, - RTL_TEXTENCODING_ASCII_US ) ); - - VERBOSE_TRACE( "Node info: n%p, name \"%s\"", - (const char*)this+debugGetCurrentOffset(), - rAsciiName.getStr() ); + SAL_INFO("slideshow.verbose" "Node info: n" << + (const char*)this+debugGetCurrentOffset(), + ", name \"" << + aName << + "\""); } } } diff --git a/slideshow/source/engine/eventqueue.cxx b/slideshow/source/engine/eventqueue.cxx index 6e5d2b49a9ea..c7fc66ebec8c 100644 --- a/slideshow/source/engine/eventqueue.cxx +++ b/slideshow/source/engine/eventqueue.cxx @@ -169,7 +169,7 @@ namespace slideshow void EventQueue::process_( bool bFireAllEvents ) { - VERBOSE_TRACE( "EventQueue: heartbeat" ); + SAL_INFO("slideshow.verbose", "EventQueue: heartbeat" ); // add in all that have been added explicitly for this round: EventEntryVector::const_iterator const iEnd( maNextEvents.end() ); diff --git a/slideshow/source/engine/shapes/drawshapesubsetting.cxx b/slideshow/source/engine/shapes/drawshapesubsetting.cxx index ad3f7ea37537..cd273f71fb4c 100644 --- a/slideshow/source/engine/shapes/drawshapesubsetting.cxx +++ b/slideshow/source/engine/shapes/drawshapesubsetting.cxx @@ -156,15 +156,9 @@ namespace slideshow case MetaActionType::TEXTARRAY: case MetaActionType::STRETCHTEXT: nLastTextActionIndex = nActionIndex; -#if OSL_DEBUG_LEVEL > 1 - { - MetaTextAction* pText = static_cast(pCurrAct); - VERBOSE_TRACE( "Shape text \"%s\" at action #%d", - OUStringToOString(pText->GetText(), - RTL_TEXTENCODING_ISO_8859_1).getStr(), - nActionIndex ); - } -#endif + SAL_INFO("slideshow.verbose", "Shape text \"" << + (static_cast(pCurrAct))->GetText() << + "\" at action #" << nActionIndex ); // fallthrough intended default: // comment action and all actions not diff --git a/slideshow/source/engine/shapes/viewshape.cxx b/slideshow/source/engine/shapes/viewshape.cxx index 2653c9753270..7bf9368e2ac9 100644 --- a/slideshow/source/engine/shapes/viewshape.cxx +++ b/slideshow/source/engine/shapes/viewshape.cxx @@ -381,7 +381,7 @@ namespace slideshow ENSURE_OR_RETURN_FALSE( mpSprite, "ViewShape::renderSprite(): No sprite" ); - VERBOSE_TRACE( "ViewShape::renderSprite(): Rendering sprite 0x%p", + SAL_INFO("slideshow", "ViewShape::renderSprite(): Rendering sprite " << mpSprite.get() ); @@ -524,7 +524,7 @@ namespace slideshow if( !bIsVisible ) { - VERBOSE_TRACE( "ViewShape::render(): skipping shape %p", this ); + SAL_INFO("slideshow", "ViewShape::render(): skipping shape " << this ); // shape is invisible, no need to update anything. return true; @@ -549,10 +549,11 @@ namespace slideshow if( !bRedrawRequired ) return true; - VERBOSE_TRACE( "ViewShape::render(): rendering shape %p at position (%f,%f)", - this, - rBounds.getMinX(), - rBounds.getMinY() ); + SAL_INFO( "slideshow", "ViewShape::render(): rendering shape " << + this << + " at position (" << + rBounds.getMinX() << "," << + rBounds.getMinY() << ")" ); // shape needs repaint - setup all that's needed diff --git a/slideshow/source/engine/smilfunctionparser.cxx b/slideshow/source/engine/smilfunctionparser.cxx index 7e184030cf9d..64021265589f 100644 --- a/slideshow/source/engine/smilfunctionparser.cxx +++ b/slideshow/source/engine/smilfunctionparser.cxx @@ -38,7 +38,7 @@ // But watch out, the parser might have // state not visible to this code! #define BOOST_SPIRIT_SINGLE_GRAMMAR_INSTANCE -#if defined(VERBOSE) && defined(DBG_UTIL) +#if defined(DBG_UTIL) #include #define BOOST_SPIRIT_DEBUG #endif @@ -180,7 +180,7 @@ namespace slideshow { if( !mpContext->mbParseAnimationFunction ) { - OSL_FAIL( "ValueTFunctor::operator(): variable encountered, but we're not parsing a function here" ); + SAL_WARN("slideshow", "ValueTFunctor::operator(): variable encountered, but we're not parsing a function here" ); throw ParseError(); } -- cgit