[Libreoffice-commits] core.git: slideshow/CppunitTest_slideshow.mk slideshow/Executable_demoshow.mk slideshow/Library_OGLTrans.mk slideshow/Library_slideshow.mk slideshow/qa slideshow/source

Norbert Thiebaud nthiebaud at gmail.com
Mon Aug 10 20:32:11 PDT 2015


 slideshow/CppunitTest_slideshow.mk                                  |    1 
 slideshow/Executable_demoshow.mk                                    |   10 ---
 slideshow/Library_OGLTrans.mk                                       |    6 -
 slideshow/Library_slideshow.mk                                      |    1 
 slideshow/qa/debug/readme.txt                                       |    3 
 slideshow/source/engine/activities/simplecontinuousactivitybase.cxx |   15 ++--
 slideshow/source/engine/activitiesqueue.cxx                         |    4 -
 slideshow/source/engine/animationnodes/animationbasenode.cxx        |    4 -
 slideshow/source/engine/animationnodes/basecontainernode.cxx        |    9 +-
 slideshow/source/engine/animationnodes/basenode.cxx                 |   33 +++++-----
 slideshow/source/engine/eventqueue.cxx                              |    2 
 slideshow/source/engine/shapes/drawshapesubsetting.cxx              |   12 ---
 slideshow/source/engine/shapes/viewshape.cxx                        |   13 ++-
 slideshow/source/engine/smilfunctionparser.cxx                      |    4 -
 14 files changed, 49 insertions(+), 68 deletions(-)

New commits:
commit 7bdc6be9c23517eec02ce7139edd7003abbee1f8
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Mon Aug 10 14:01:33 2015 -0500

    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 <ci at libreoffice.org>
    Reviewed-by: Norbert Thiebaud <nthiebaud at gmail.com>

diff --git a/slideshow/CppunitTest_slideshow.mk b/slideshow/CppunitTest_slideshow.mk
index 2207a83..c957930 100644
--- a/slideshow/CppunitTest_slideshow.mk
+++ b/slideshow/CppunitTest_slideshow.mk
@@ -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)),)
diff --git a/slideshow/Executable_demoshow.mk b/slideshow/Executable_demoshow.mk
index 56725bd..d46e47f 100644
--- a/slideshow/Executable_demoshow.mk
+++ b/slideshow/Executable_demoshow.mk
@@ -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
diff --git a/slideshow/Library_OGLTrans.mk b/slideshow/Library_OGLTrans.mk
index f5f4676..4c3340f 100644
--- a/slideshow/Library_OGLTrans.mk
+++ b/slideshow/Library_OGLTrans.mk
@@ -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 \
diff --git a/slideshow/Library_slideshow.mk b/slideshow/Library_slideshow.mk
index 5d01391..5772afd 100644
--- a/slideshow/Library_slideshow.mk
+++ b/slideshow/Library_slideshow.mk
@@ -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)),)
diff --git a/slideshow/qa/debug/readme.txt b/slideshow/qa/debug/readme.txt
index a3df5a9..eb458d6 100644
--- a/slideshow/qa/debug/readme.txt
+++ b/slideshow/qa/debug/readme.txt
@@ -1,7 +1,6 @@
 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
+ 
diff --git a/slideshow/source/engine/activities/simplecontinuousactivitybase.cxx b/slideshow/source/engine/activities/simplecontinuousactivitybase.cxx
index 347483a..f227e89 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 3cca2ef..57459b4 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 41adb19..c70ffc3 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 5371c12..930e4be 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<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();
     }
 
diff --git a/slideshow/source/engine/animationnodes/basenode.cxx b/slideshow/source/engine/animationnodes/basenode.cxx
index 4c06a80..f7947b0 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<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 <<
+                         "\"");
             }
         }
     }
diff --git a/slideshow/source/engine/eventqueue.cxx b/slideshow/source/engine/eventqueue.cxx
index 6e5d2b4..c7fc66e 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 ad3f7ea..cd273f7 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<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
diff --git a/slideshow/source/engine/shapes/viewshape.cxx b/slideshow/source/engine/shapes/viewshape.cxx
index 2653c97..7bf9368 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 7e18403..6402126 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 <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();
                     }
 


More information about the Libreoffice-commits mailing list