Kaydet (Commit) 7bdc6be9 authored tarafından Norbert Thiebaud's avatar Norbert Thiebaud

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/17632Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNorbert Thiebaud <nthiebaud@gmail.com>
üst e98cf0c6
......@@ -18,7 +18,6 @@ $(eval $(call gb_CppunitTest_set_include,slideshow,\
$(eval $(call gb_CppunitTest_set_defs,slideshow,\
$$(DEFS) \
$(if $(filter TRUE,$(VERBOSE)),-DVERBOSE) \
))
ifneq ($(strip $(debug)$(DEBUG)),)
......
......@@ -16,16 +16,8 @@ $(eval $(call gb_Executable_set_include,demoshow,\
-I$(SRCDIR)/slideshow/source/inc \
))
ifeq ($(strip $(VERBOSE)),TRUE)
$(eval $(call gb_Executable_set_defs,demoshow,\
$$(DEFS) \
-DVERBOSE \
))
endif
ifneq ($(strip $(debug)$(DEBUG)),)
$(eval $(call gb_Executable_set_defs,demoshow,\
$$(DEFS) \
$(eval $(call gb_Executable_add_defs,demoshow,\
-DBOOST_SP_ENABLE_DEBUG_HOOKS \
))
endif
......
......@@ -9,12 +9,6 @@
$(eval $(call gb_Library_Library,OGLTrans))
ifeq ($(strip $(VERBOSE)),TRUE)
$(eval $(call gb_Library_add_defs,OGLTrans,\
-DVERBOSE \
))
endif
ifneq ($(strip $(debug)$(DEBUG)),)
$(eval $(call gb_Library_add_defs,OGLTrans,\
-DBOOST_SP_ENABLE_DEBUG_HOOKS \
......
......@@ -16,7 +16,6 @@ $(eval $(call gb_Library_set_include,slideshow,\
$(eval $(call gb_Library_add_defs,slideshow,\
-DBOOST_SPIRIT_USE_OLD_NAMESPACE \
$(if $(filter TRUE,$(VERBOSE)),-DVERBOSE) \
))
ifneq ($(strip $(debug)$(DEBUG)),)
......
Recognized preprocessor switches
================================
- VERBOSE=t: enable extra verbose trace output (debug=t builds only)
- TIMELOG=t: enable time logging (also for product builds)
......@@ -17,4 +16,4 @@ nodetree.sh:
script.
To generate output at other instances, use the DEBUG_NODES_SHOWTREE
macro in animationnodefactory.cxx.
\ No newline at end of file
......@@ -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)
......
......@@ -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() )
......
......@@ -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
......
......@@ -183,10 +183,11 @@ void BaseContainerNode::showState() const
{
BaseNodeSharedPtr pNode =
boost::dynamic_pointer_cast<BaseNode>(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();
}
......
......@@ -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<animations::XAnimate> 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 <<
"\"");
}
}
}
......
......@@ -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() );
......
......@@ -156,15 +156,9 @@ namespace slideshow
case MetaActionType::TEXTARRAY:
case MetaActionType::STRETCHTEXT:
nLastTextActionIndex = nActionIndex;
#if OSL_DEBUG_LEVEL > 1
{
MetaTextAction* pText = static_cast<MetaTextAction*>(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<MetaTextAction*>(pCurrAct))->GetText() <<
"\" at action #" << nActionIndex );
// fallthrough intended
default:
// comment action and all actions not
......
......@@ -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
......
......@@ -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 <typeinfo>
#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();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment