[Libreoffice-commits] .: 2 commits - sd/inc sd/source slideshow/Library_slideshow.mk slideshow/source

Thomas Arnhold tarnhold at kemper.freedesktop.org
Mon Jul 25 06:12:29 PDT 2011


 sd/inc/sddll.hxx                                    |    1 
 sd/source/ui/app/sddll.cxx                          |   22 -
 slideshow/Library_slideshow.mk                      |    1 
 slideshow/source/engine/animationnodes/basenode.cxx |    5 
 slideshow/source/engine/debug.cxx                   |  327 --------------------
 slideshow/source/engine/eventqueue.cxx              |    1 
 slideshow/source/inc/debug.hxx                      |   80 ----
 slideshow/source/inc/delayevent.hxx                 |    1 
 slideshow/source/inc/event.hxx                      |    1 
 9 files changed, 439 deletions(-)

New commits:
commit be68b7b8a437e3d9d8e5314d31d9b4ae4871a4cf
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Fri Jul 22 23:39:23 2011 +0200

    callcatcher: remove unused method

diff --git a/sd/inc/sddll.hxx b/sd/inc/sddll.hxx
index 5511dc2..6421cfc 100644
--- a/sd/inc/sddll.hxx
+++ b/sd/inc/sddll.hxx
@@ -67,7 +67,6 @@ public:
 
                     // DLL-init/exit-code must be linked to the DLL only
     static void     Init();     // called directly after loading the DLL
-    static void     Exit();     // called directly befor unloading the DLL
 };
 
 
diff --git a/sd/source/ui/app/sddll.cxx b/sd/source/ui/app/sddll.cxx
index 9eaf833..dcba6df 100644
--- a/sd/source/ui/app/sddll.cxx
+++ b/sd/source/ui/app/sddll.cxx
@@ -128,26 +128,4 @@ void SdDLL::Init()
     SdrObjFactory::InsertMakeUserDataHdl(LINK(&aSdObjectFactory, SdObjectFactory, MakeUserData));
 }
 
-
-
-/*************************************************************************
-|*
-|* Exit
-|*
-\************************************************************************/
-
-void SdDLL::Exit()
-{
-    // called directly befor unloading the DLL
-    // do whatever you want, Sd-DLL is accessible
-
-    // Objekt-Factory austragen
-    SdrObjFactory::RemoveMakeUserDataHdl(LINK(&aSdObjectFactory, SdObjectFactory, MakeUserData));
-
-    // the SdModule must be destroyed
-    SdModule** ppShlPtr = (SdModule**) GetAppData(SHL_DRAW);
-    delete (*ppShlPtr);
-    (*ppShlPtr) = NULL;
-}
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 138baeb97dec00fa4a8cfe506f02c64d8b414755
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Sun Jul 24 21:49:24 2011 +0200

    Remove unused Debugging stuff
    
    If this is still needed, please revert it.

diff --git a/slideshow/Library_slideshow.mk b/slideshow/Library_slideshow.mk
index abbaa56..7e690c0 100644
--- a/slideshow/Library_slideshow.mk
+++ b/slideshow/Library_slideshow.mk
@@ -98,7 +98,6 @@ $(eval $(call gb_Library_add_exception_objects,slideshow,\
     slideshow/source/engine/animationnodes/sequentialtimecontainer \
     slideshow/source/engine/attributemap \
     slideshow/source/engine/color \
-    slideshow/source/engine/debug \
     slideshow/source/engine/delayevent \
     slideshow/source/engine/effectrewinder \
     slideshow/source/engine/eventmultiplexer \
diff --git a/slideshow/source/engine/animationnodes/basenode.cxx b/slideshow/source/engine/animationnodes/basenode.cxx
index a8bc7c7..3a1faf1 100644
--- a/slideshow/source/engine/animationnodes/basenode.cxx
+++ b/slideshow/source/engine/animationnodes/basenode.cxx
@@ -48,7 +48,6 @@
 #include "tools.hxx"
 #include "nodetools.hxx"
 #include "generateevent.hxx"
-#include "debug.hxx"
 
 #include <boost/bind.hpp>
 #include <vector>
@@ -311,10 +310,6 @@ public:
             mpNode->meCurrState = meToState;
             clear();
         }
-
-        // Uncomment the following line to write the node tree to file on
-        // every state change of one of its nodes.
-        //     Debug_ShowNodeTree(mpNode->mpSelf);
     }
     
     void clear() {
diff --git a/slideshow/source/engine/debug.cxx b/slideshow/source/engine/debug.cxx
deleted file mode 100644
index 1b71302..0000000
--- a/slideshow/source/engine/debug.cxx
+++ /dev/null
@@ -1,327 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org.  If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#include "precompiled_slideshow.hxx"
-
-#include "debug.hxx"
-
-#if OSL_DEBUG_LEVEL > 1
-
-#include "animationnodes/basecontainernode.hxx"
-#include "animationnodes/paralleltimecontainer.hxx"
-#include "animationnodes/sequentialtimecontainer.hxx"
-#include "animationnodes/animationtransitionfilternode.hxx"
-#include "animationnodes/animationaudionode.hxx"
-#include "animationnodes/animationcolornode.hxx"
-#include "animationnodes/animationcommandnode.hxx"
-#include "animationnodes/animationpathmotionnode.hxx"
-#include "animationnodes/animationsetnode.hxx"
-#include "animationnodes/animationtransformnode.hxx"
-#include "animationnodes/propertyanimationnode.hxx"
-
-#include <com/sun/star/animations/XAnimationNode.hpp>
-#include <com/sun/star/animations/Event.hpp>
-
-#include <cstdio>
-#include <cstdarg>
-
-using ::rtl::OUString;
-using namespace ::com::sun::star;
-
-
-namespace slideshow { namespace internal {
-
-namespace {
-
-class NodeContainer : public BaseContainerNode
-{
-public:
-    void ShowChildrenState (void) const;
-};
-
-
-
-    
-OUString DebugGetDescription (const AnimationNodeSharedPtr& rpNode)
-{
-    if (::boost::dynamic_pointer_cast<BaseContainerNode>(rpNode))
-    {
-        // Node is a container.
-        if (::boost::dynamic_pointer_cast<ParallelTimeContainer>(rpNode))
-            return OUString(RTL_CONSTASCII_USTRINGPARAM("ParallelTimeContainer"));
-        else if (::boost::dynamic_pointer_cast<SequentialTimeContainer>(rpNode))
-            return OUString(RTL_CONSTASCII_USTRINGPARAM("SequentialTimeContainer"));
-        else
-            return OUString(RTL_CONSTASCII_USTRINGPARAM("<unknown container>"));
-    }
-    else if (::boost::dynamic_pointer_cast<AnimationTransitionFilterNode>(rpNode))
-        return OUString(RTL_CONSTASCII_USTRINGPARAM("AnimationTransitionFilterNode"));
-    else if (::boost::dynamic_pointer_cast<AnimationAudioNode>(rpNode))
-        return OUString(RTL_CONSTASCII_USTRINGPARAM("AnimationAudioNode"));
-    else if (::boost::dynamic_pointer_cast<AnimationColorNode>(rpNode))
-        return OUString(RTL_CONSTASCII_USTRINGPARAM("AnimationColorNode"));
-    else if (::boost::dynamic_pointer_cast<AnimationCommandNode>(rpNode))
-        return OUString(RTL_CONSTASCII_USTRINGPARAM("AnimationCommandNode"));
-    else if (::boost::dynamic_pointer_cast<AnimationPathMotionNode>(rpNode))
-        return OUString(RTL_CONSTASCII_USTRINGPARAM("AnimationPathMotionNode"));
-    else if (::boost::dynamic_pointer_cast<AnimationSetNode>(rpNode))
-        return OUString(RTL_CONSTASCII_USTRINGPARAM("AnimationSetNode"));
-    else if (::boost::dynamic_pointer_cast<AnimationTransformNode>(rpNode))
-        return OUString(RTL_CONSTASCII_USTRINGPARAM("AnimationTransformNode"));
-    else if (::boost::dynamic_pointer_cast<PropertyAnimationNode>(rpNode))
-        return OUString(RTL_CONSTASCII_USTRINGPARAM("PropertyAnimationNode"));
-    else
-        return OUString(RTL_CONSTASCII_USTRINGPARAM("<unknown node type>"));
-}
-
-
-
-
-void DebugShowState (const AnimationNodeSharedPtr& rpNode)
-{
-    if ( ! rpNode)
-        return;
-
-    OUString sState;
-    OUString sStateColor;
-    switch (rpNode->getState())
-    {
-        default:
-        case AnimationNode::INVALID:
-            sState = OUString(RTL_CONSTASCII_USTRINGPARAM("Invalid"));
-            sStateColor = OUString(RTL_CONSTASCII_USTRINGPARAM("firebrick1"));
-            break;
-        case AnimationNode::UNRESOLVED:
-            sState = OUString(RTL_CONSTASCII_USTRINGPARAM("Unresolved"));
-            sStateColor = OUString(RTL_CONSTASCII_USTRINGPARAM("dodgerblue4"));
-            break;
-        case AnimationNode::RESOLVED:
-            sState = OUString(RTL_CONSTASCII_USTRINGPARAM("Resolved"));
-            sStateColor = OUString(RTL_CONSTASCII_USTRINGPARAM("dodgerblue"));
-            break;
-        case AnimationNode::ACTIVE:
-            sState = OUString(RTL_CONSTASCII_USTRINGPARAM("Active"));
-            sStateColor = OUString(RTL_CONSTASCII_USTRINGPARAM("seagreen1"));
-            break;
-        case AnimationNode::FROZEN:
-            sState = OUString(RTL_CONSTASCII_USTRINGPARAM("Frozen"));
-            sStateColor = OUString(RTL_CONSTASCII_USTRINGPARAM("lightskyblue1"));
-            break;
-        case AnimationNode::ENDED:
-            sState = OUString(RTL_CONSTASCII_USTRINGPARAM("Ended"));
-            sStateColor = OUString(RTL_CONSTASCII_USTRINGPARAM("slategray3"));
-            break;
-    }
-    
-    const uno::Any aBegin (rpNode->getXAnimationNode()->getBegin());
-    OUString sTrigger;
-    if (aBegin.hasValue())
-    {
-        animations::Event aEvent;
-        double nTimeOffset;
-        const static char* sEventTriggers[] = {
-            "NONE", "ON_BEGIN", "ON_END", "BEGIN_EVENT", "END_EVENT", "ON_CLICK",
-            "ON_DBL_CLICK", "ON_MOUSE_ENTER", "ON_MOUSE_LEAVE", "ON_NEXT", "ON_PREV",
-            "ON_STOP_AUDIO", "REPEAT"};
-        if (aBegin >>= aEvent)
-        {
-            sTrigger = OUString::createFromAscii(sEventTriggers[aEvent.Trigger]);
-        }
-        else if (aBegin >>= nTimeOffset)
-        {
-            sTrigger = OUString::valueOf(nTimeOffset);
-        }
-        else
-        {
-            sTrigger = OUString(RTL_CONSTASCII_USTRINGPARAM("other"));
-        }
-    }
-    else
-        sTrigger = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("void"));
-
-    TRACE("Node state: n%x [label=\"%x / %x / %s\\n%s\\n%s\",style=filled,fillcolor=\"%s\"]\r",
-        rpNode.get(),
-        rpNode.get(),
-        rpNode->getXAnimationNode().get(),
-        ::rtl::OUStringToOString(sState, RTL_TEXTENCODING_ASCII_US).getStr(),
-        ::rtl::OUStringToOString(DebugGetDescription(rpNode), RTL_TEXTENCODING_ASCII_US).getStr(),
-        ::rtl::OUStringToOString(sTrigger, RTL_TEXTENCODING_ASCII_US).getStr(),
-        ::rtl::OUStringToOString(sStateColor, RTL_TEXTENCODING_ASCII_US).getStr());
-
-    BaseContainerNodeSharedPtr pContainer (
-        ::boost::dynamic_pointer_cast<BaseContainerNode>(rpNode));
-    if (pContainer)
-        ::boost::static_pointer_cast<NodeContainer>(rpNode)->ShowChildrenState();
-}
-
-
-
-
-void NodeContainer::ShowChildrenState (void) const
-{
-    for (std::size_t nIndex=0; nIndex<maChildren.size(); ++nIndex)
-    {
-        TRACE("Node connection: n%x -> n%x", this, maChildren[nIndex].get());
-        DebugShowState(maChildren[nIndex]);
-    }
-}
-
-
-
-
-AnimationNodeSharedPtr DebugGetTreeRoot (const BaseNodeSharedPtr& rpNode)
-{
-    BaseNodeSharedPtr pNode (rpNode);
-    if (pNode)
-    {
-        BaseNodeSharedPtr pParent (pNode->getParentNode());
-        while (pParent)
-        {
-            pNode = pParent;
-            pParent = pNode->getParentNode();
-        }
-    }
-    return pNode;
-}
-
-} // end of anonymous namespace
-
-
-
-
-void Debug_ShowNodeTree (const AnimationNodeSharedPtr& rpNode)
-{
-    DebugTraceScope aTraceScope ("NodeTree");
-    
-    DebugShowState(DebugGetTreeRoot(::boost::dynamic_pointer_cast<BaseNode>(rpNode)));
-}
-
-
-
-
-//----- Tracing ---------------------------------------------------------------
-
-extern "C" {
-
-    namespace {
-
-    class TraceData
-    {
-    public:
-        TraceData (void)
-            : mnIndentation(0),
-              mpFile(fopen(TRACE_LOG_FILE_NAME, "w")),
-              maTime()
-        {
-        }
-        
-        int mnIndentation;
-        FILE* mpFile;
-        ::canvas::tools::ElapsedTime maTime;
-    };
-    static TraceData gTraceData;
-
-    inline void SAL_CALL DebugTrace (
-        const int nIndentationOffset,
-        const sal_Char* sFormat,
-        va_list args)
-    {
-        if (gTraceData.mpFile != NULL)
-        {
-            // Write line head with current time and indentation.
-            // Adapt indentation.
-            if (nIndentationOffset < 0)
-                gTraceData.mnIndentation += nIndentationOffset;
-            fprintf(gTraceData.mpFile, "%10.8f ", gTraceData.maTime.getElapsedTime());
-            for (int nIndentation=0; nIndentation<gTraceData.mnIndentation; ++nIndentation)
-                fprintf(gTraceData.mpFile, "    ");
-            if (nIndentationOffset > 0)
-                gTraceData.mnIndentation += nIndentationOffset;
-
-            // Write message.
-            vfprintf(gTraceData.mpFile, sFormat, args);
-            fprintf(gTraceData.mpFile, "\n");
-            fflush(gTraceData.mpFile);
-        }
-    }
-
-} // end of anonymous namespace
-
-    
-} // end of extern "C"
-
-void SAL_CALL DebugTraceBegin (const sal_Char* sFormat, ...)
-{
-    va_list args;
-    va_start(args, sFormat);
-    DebugTrace(+1,sFormat, args);
-    va_end(args);
-}
-    
-void SAL_CALL DebugTraceEnd (const sal_Char* sFormat, ...)
-{
-    va_list args;
-    va_start(args, sFormat);
-    DebugTrace(-1,sFormat, args);
-    va_end(args);
-}
-
-void SAL_CALL DebugTraceMessage (const sal_Char* sFormat, ...)
-{
-    va_list args;
-    va_start(args, sFormat);
-    DebugTrace(0,sFormat, args);
-    va_end(args);
-}
-
-
-
-DebugTraceScope::DebugTraceScope (const sal_Char* sFormat, ...)
-    : msMessage(new sal_Char[mnBufferSize])
-{
-    va_list args;
-    va_start(args, sFormat);
-        
-    msMessage[mnBufferSize-1] = 0;
-    vsnprintf(msMessage, mnBufferSize-1, sFormat, args);
-    TRACE_BEGIN("[ %s", msMessage);
-    va_end(args);
-}
-
-DebugTraceScope::~DebugTraceScope (void)
-{
-    TRACE_END("] %s", msMessage);
-    delete [] msMessage;
-}
-
-
-} }
-
-#endif // OSL_DEBUG_LEVEL > 1
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/slideshow/source/engine/eventqueue.cxx b/slideshow/source/engine/eventqueue.cxx
index c347200..df5cd16 100644
--- a/slideshow/source/engine/eventqueue.cxx
+++ b/slideshow/source/engine/eventqueue.cxx
@@ -33,7 +33,6 @@
 #include <canvas/debug.hxx>
 #include <tools/diagnose_ex.h>
 #include <canvas/verbosetrace.hxx>
-#include "debug.hxx"
 
 #include <comphelper/anytostring.hxx>
 #include <cppuhelper/exc_hlp.hxx>
diff --git a/slideshow/source/inc/debug.hxx b/slideshow/source/inc/debug.hxx
deleted file mode 100644
index 4bf7d43..0000000
--- a/slideshow/source/inc/debug.hxx
+++ /dev/null
@@ -1,80 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org.  If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef INCLUDED_SLIDESHOW_DEBUG_HXX
-#define INCLUDED_SLIDESHOW_DEBUG_HXX
-
-#include <osl/diagnose.h>
-
-#if OSL_DEBUG_LEVEL > 1
-
-#include "animationnode.hxx"
-
-
-namespace slideshow { namespace internal {
-
-void Debug_ShowNodeTree (const AnimationNodeSharedPtr& rpNode);
-
-// Change this to a valid filename.  The file is created anew with every
-// office start (and execution of at least one TRACE... command.)
-#define TRACE_LOG_FILE_NAME "d:\\tmp\\log.txt"
-
-class DebugTraceScope
-{
-public:
-    DebugTraceScope (const sal_Char* sFormat, ...);
-    ~DebugTraceScope (void);
-private:
-    static const sal_Int32 mnBufferSize = 512;
-    sal_Char* msMessage;
-};
-
-void SAL_CALL DebugTraceBegin (const sal_Char* sFormat, ...);
-void SAL_CALL DebugTraceEnd (const sal_Char* sFormat, ...);
-void SAL_CALL DebugTraceMessage (const sal_Char* sFormat, ...);
-
-} } // end of namespace ::slideshow::internal
-
-
-#define TRACE_BEGIN DebugTraceBegin
-#define TRACE_END   DebugTraceEnd
-#define TRACE       DebugTraceMessage
-#define TRACE_SCOPE DebugTraceScope aTraceScope
-
-#else // OSL_DEBUG_LEVEL > 1
-
-#define TRACE_BEGIN 1 ? ((void)0) : DebugTraceBegin
-#define TRACE_END   1 ? ((void)0) : DebugTraceEnd
-#define TRACE       1 ? ((void)0) : DebugTraceMessage
-#define TRACE_SCOPE
-
-#endif // OSL_DEBUG_LEVEL > 1
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/slideshow/source/inc/delayevent.hxx b/slideshow/source/inc/delayevent.hxx
index c4db6e6..63ce381 100644
--- a/slideshow/source/inc/delayevent.hxx
+++ b/slideshow/source/inc/delayevent.hxx
@@ -31,7 +31,6 @@
 #include <boost/function.hpp>
 
 #include "event.hxx"
-#include "debug.hxx"
 #include <boost/noncopyable.hpp>
 
 namespace slideshow {
diff --git a/slideshow/source/inc/event.hxx b/slideshow/source/inc/event.hxx
index 2c0c338..1cd7860 100644
--- a/slideshow/source/inc/event.hxx
+++ b/slideshow/source/inc/event.hxx
@@ -29,7 +29,6 @@
 #define INCLUDED_SLIDESHOW_EVENT_HXX
 
 #include "disposable.hxx"
-#include "debug.hxx"
 #include <rtl/ustring.hxx>
 #include <boost/shared_ptr.hpp>
 #include <vector>


More information about the Libreoffice-commits mailing list