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,\ ...@@ -18,7 +18,6 @@ $(eval $(call gb_CppunitTest_set_include,slideshow,\
$(eval $(call gb_CppunitTest_set_defs,slideshow,\ $(eval $(call gb_CppunitTest_set_defs,slideshow,\
$$(DEFS) \ $$(DEFS) \
$(if $(filter TRUE,$(VERBOSE)),-DVERBOSE) \
)) ))
ifneq ($(strip $(debug)$(DEBUG)),) ifneq ($(strip $(debug)$(DEBUG)),)
......
...@@ -16,16 +16,8 @@ $(eval $(call gb_Executable_set_include,demoshow,\ ...@@ -16,16 +16,8 @@ $(eval $(call gb_Executable_set_include,demoshow,\
-I$(SRCDIR)/slideshow/source/inc \ -I$(SRCDIR)/slideshow/source/inc \
)) ))
ifeq ($(strip $(VERBOSE)),TRUE)
$(eval $(call gb_Executable_set_defs,demoshow,\
$$(DEFS) \
-DVERBOSE \
))
endif
ifneq ($(strip $(debug)$(DEBUG)),) ifneq ($(strip $(debug)$(DEBUG)),)
$(eval $(call gb_Executable_set_defs,demoshow,\ $(eval $(call gb_Executable_add_defs,demoshow,\
$$(DEFS) \
-DBOOST_SP_ENABLE_DEBUG_HOOKS \ -DBOOST_SP_ENABLE_DEBUG_HOOKS \
)) ))
endif endif
......
...@@ -9,12 +9,6 @@ ...@@ -9,12 +9,6 @@
$(eval $(call gb_Library_Library,OGLTrans)) $(eval $(call gb_Library_Library,OGLTrans))
ifeq ($(strip $(VERBOSE)),TRUE)
$(eval $(call gb_Library_add_defs,OGLTrans,\
-DVERBOSE \
))
endif
ifneq ($(strip $(debug)$(DEBUG)),) ifneq ($(strip $(debug)$(DEBUG)),)
$(eval $(call gb_Library_add_defs,OGLTrans,\ $(eval $(call gb_Library_add_defs,OGLTrans,\
-DBOOST_SP_ENABLE_DEBUG_HOOKS \ -DBOOST_SP_ENABLE_DEBUG_HOOKS \
......
...@@ -16,7 +16,6 @@ $(eval $(call gb_Library_set_include,slideshow,\ ...@@ -16,7 +16,6 @@ $(eval $(call gb_Library_set_include,slideshow,\
$(eval $(call gb_Library_add_defs,slideshow,\ $(eval $(call gb_Library_add_defs,slideshow,\
-DBOOST_SPIRIT_USE_OLD_NAMESPACE \ -DBOOST_SPIRIT_USE_OLD_NAMESPACE \
$(if $(filter TRUE,$(VERBOSE)),-DVERBOSE) \
)) ))
ifneq ($(strip $(debug)$(DEBUG)),) ifneq ($(strip $(debug)$(DEBUG)),)
......
Recognized preprocessor switches Recognized preprocessor switches
================================ ================================
- VERBOSE=t: enable extra verbose trace output (debug=t builds only)
- TIMELOG=t: enable time logging (also for product builds) - TIMELOG=t: enable time logging (also for product builds)
...@@ -17,4 +16,4 @@ nodetree.sh: ...@@ -17,4 +16,4 @@ nodetree.sh:
script. script.
To generate output at other instances, use the DEBUG_NODES_SHOWTREE To generate output at other instances, use the DEBUG_NODES_SHOWTREE
macro in animationnodefactory.cxx. macro in animationnodefactory.cxx.
\ No newline at end of file
...@@ -56,8 +56,8 @@ namespace slideshow ...@@ -56,8 +56,8 @@ namespace slideshow
const double nCurrElapsedTime( maTimer.getElapsedTime() ); const double nCurrElapsedTime( maTimer.getElapsedTime() );
// log time // log time
VERBOSE_TRACE( "SimpleContinuousActivityBase::calcTimeLag(): " SAL_INFO("slideshow.verbose", "SimpleContinuousActivityBase::calcTimeLag(): "
"next step is based on time: %f", nCurrElapsedTime ); "next step is based on time: " << nCurrElapsedTime );
// go to great length to ensure a proper animation // go to great length to ensure a proper animation
// run. Since we don't know how often we will be called // run. Since we don't know how often we will be called
...@@ -90,15 +90,16 @@ namespace slideshow ...@@ -90,15 +90,16 @@ namespace slideshow
// time line. // time line.
if( nFractionElapsedTime < nFractionRequiredCalls ) if( nFractionElapsedTime < nFractionRequiredCalls )
{ {
VERBOSE_TRACE( "SimpleContinuousActivityBase::calcTimeLag(): " SAL_INFO("slidewho.verbose", "SimpleContinuousActivityBase::calcTimeLag(): t=" <<
"t=%f is based on time", nFractionElapsedTime ); nFractionElapsedTime <<
" is based on time");
return 0.0; return 0.0;
} }
else else
{ {
VERBOSE_TRACE( "SimpleContinuousActivityBase::perform(): " SAL_INFO("slideshow.verbose", "SimpleContinuousActivityBase::perform(): t=" <<
"t=%f is based on number of calls", nFractionRequiredCalls <<
nFractionRequiredCalls ); " is based on number of calls");
// lag global time, so all other animations lag, too: // lag global time, so all other animations lag, too:
return ((nFractionElapsedTime - nFractionRequiredCalls) return ((nFractionElapsedTime - nFractionRequiredCalls)
......
...@@ -86,7 +86,7 @@ namespace slideshow ...@@ -86,7 +86,7 @@ namespace slideshow
void ActivitiesQueue::process() 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 // accumulate time lag for all activities, and lag time
// base if necessary: // base if necessary:
...@@ -156,7 +156,7 @@ namespace slideshow ...@@ -156,7 +156,7 @@ namespace slideshow
else else
maDequeuedActivities.push_back( pActivity ); maDequeuedActivities.push_back( pActivity );
VERBOSE_TRACE( "ActivitiesQueue: inner loop heartbeat" ); SAL_INFO("slideshow.verbose", "ActivitiesQueue: inner loop heartbeat" );
} }
if( !maCurrentActivitiesReinsert.empty() ) if( !maCurrentActivitiesReinsert.empty() )
......
...@@ -368,12 +368,12 @@ bool AnimationBaseNode::hasPendingAnimation() const ...@@ -368,12 +368,12 @@ bool AnimationBaseNode::hasPendingAnimation() const
return true; return true;
} }
#if OSL_DEBUG_LEVEL >= 2 && defined(DBG_UTIL) #if defined(DBG_UTIL)
void AnimationBaseNode::showState() const void AnimationBaseNode::showState() const
{ {
BaseNode::showState(); BaseNode::showState();
VERBOSE_TRACE( "AnimationBaseNode info: independent subset=%s", SAL_INFO( "slideshow.verbose", "AnimationBaseNode info: independent subset=" <<
mbIsIndependentSubset ? "y" : "n" ); mbIsIndependentSubset ? "y" : "n" );
} }
#endif #endif
......
...@@ -183,10 +183,11 @@ void BaseContainerNode::showState() const ...@@ -183,10 +183,11 @@ void BaseContainerNode::showState() const
{ {
BaseNodeSharedPtr pNode = BaseNodeSharedPtr pNode =
boost::dynamic_pointer_cast<BaseNode>(maChildren[i]); boost::dynamic_pointer_cast<BaseNode>(maChildren[i]);
VERBOSE_TRACE( SAL_INFO("slideshow.verbose",
"Node connection: n%p -> n%p", "Node connection: n" <<
(const char*)this+debugGetCurrentOffset(), (const void*)this+debugGetCurrentOffset() <<
(const char*)pNode.get()+debugGetCurrentOffset() ); " -> n" <<
(const void*)pNode.get()+debugGetCurrentOffset() );
pNode->showState(); pNode->showState();
} }
......
...@@ -686,16 +686,19 @@ void BaseNode::showState() const ...@@ -686,16 +686,19 @@ void BaseNode::showState() const
const AnimationNode::NodeState eNodeState( getState() ); const AnimationNode::NodeState eNodeState( getState() );
if( eNodeState == AnimationNode::INVALID ) if( eNodeState == AnimationNode::INVALID )
VERBOSE_TRACE( "Node state: n%p [label=\"%s\",style=filled," SAL_INFO("slideshow.verbose", "Node state: n" <<
"fillcolor=\"0.5,0.2,0.5\"]", (const char*)this+debugGetCurrentOffset() <<
(const char*)this+debugGetCurrentOffset(), " [label=\"" <<
getDescription() ); getDescription() <<
"\",style=filled, fillcolor=\"0.5,0.2,0.5\"]");
else else
VERBOSE_TRACE( "Node state: n%p [label=\"%s\",style=filled," SAL_INFO("slideshow.verbose", "Node state: n" <<
"fillcolor=\"%f,1.0,1.0\"]", (const char*)this+debugGetCurrentOffset() <<
(const char*)this+debugGetCurrentOffset(), " [label=\"" <<
getDescription(), getDescription() <<
log(double(getState()))/4.0 ); "fillcolor=\"" <<
log(double(getState()))/4.0 <<
",1.0,1.0\"]");
// determine additional node information // determine additional node information
uno::Reference<animations::XAnimate> const xAnimate( mxAnimationNode, uno::Reference<animations::XAnimate> const xAnimate( mxAnimationNode,
...@@ -725,13 +728,11 @@ void BaseNode::showState() const ...@@ -725,13 +728,11 @@ void BaseNode::showState() const
OUString("Name") ) OUString("Name") )
>>= aName) ) >>= aName) )
{ {
const OString& rAsciiName( SAL_INFO("slideshow.verbose" "Node info: n" <<
OUStringToOString( aName, (const char*)this+debugGetCurrentOffset(),
RTL_TEXTENCODING_ASCII_US ) ); ", name \"" <<
aName <<
VERBOSE_TRACE( "Node info: n%p, name \"%s\"", "\"");
(const char*)this+debugGetCurrentOffset(),
rAsciiName.getStr() );
} }
} }
} }
......
...@@ -169,7 +169,7 @@ namespace slideshow ...@@ -169,7 +169,7 @@ namespace slideshow
void EventQueue::process_( bool bFireAllEvents ) 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: // add in all that have been added explicitly for this round:
EventEntryVector::const_iterator const iEnd( maNextEvents.end() ); EventEntryVector::const_iterator const iEnd( maNextEvents.end() );
......
...@@ -156,15 +156,9 @@ namespace slideshow ...@@ -156,15 +156,9 @@ namespace slideshow
case MetaActionType::TEXTARRAY: case MetaActionType::TEXTARRAY:
case MetaActionType::STRETCHTEXT: case MetaActionType::STRETCHTEXT:
nLastTextActionIndex = nActionIndex; nLastTextActionIndex = nActionIndex;
#if OSL_DEBUG_LEVEL > 1 SAL_INFO("slideshow.verbose", "Shape text \"" <<
{ (static_cast<MetaTextAction*>(pCurrAct))->GetText() <<
MetaTextAction* pText = static_cast<MetaTextAction*>(pCurrAct); "\" at action #" << nActionIndex );
VERBOSE_TRACE( "Shape text \"%s\" at action #%d",
OUStringToOString(pText->GetText(),
RTL_TEXTENCODING_ISO_8859_1).getStr(),
nActionIndex );
}
#endif
// fallthrough intended // fallthrough intended
default: default:
// comment action and all actions not // comment action and all actions not
......
...@@ -381,7 +381,7 @@ namespace slideshow ...@@ -381,7 +381,7 @@ namespace slideshow
ENSURE_OR_RETURN_FALSE( mpSprite, "ViewShape::renderSprite(): No sprite" ); 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() ); mpSprite.get() );
...@@ -524,7 +524,7 @@ namespace slideshow ...@@ -524,7 +524,7 @@ namespace slideshow
if( !bIsVisible ) 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. // shape is invisible, no need to update anything.
return true; return true;
...@@ -549,10 +549,11 @@ namespace slideshow ...@@ -549,10 +549,11 @@ namespace slideshow
if( !bRedrawRequired ) if( !bRedrawRequired )
return true; return true;
VERBOSE_TRACE( "ViewShape::render(): rendering shape %p at position (%f,%f)", SAL_INFO( "slideshow", "ViewShape::render(): rendering shape " <<
this, this <<
rBounds.getMinX(), " at position (" <<
rBounds.getMinY() ); rBounds.getMinX() << "," <<
rBounds.getMinY() << ")" );
// shape needs repaint - setup all that's needed // shape needs repaint - setup all that's needed
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
// But watch out, the parser might have // But watch out, the parser might have
// state not visible to this code! // state not visible to this code!
#define BOOST_SPIRIT_SINGLE_GRAMMAR_INSTANCE #define BOOST_SPIRIT_SINGLE_GRAMMAR_INSTANCE
#if defined(VERBOSE) && defined(DBG_UTIL) #if defined(DBG_UTIL)
#include <typeinfo> #include <typeinfo>
#define BOOST_SPIRIT_DEBUG #define BOOST_SPIRIT_DEBUG
#endif #endif
...@@ -180,7 +180,7 @@ namespace slideshow ...@@ -180,7 +180,7 @@ namespace slideshow
{ {
if( !mpContext->mbParseAnimationFunction ) 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(); 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