[Libreoffice-commits] core.git: compilerplugins/clang slideshow/source

Noel Grandin noel at peralex.com
Thu Jul 16 23:49:54 PDT 2015


 compilerplugins/clang/unusedmethods.cxx                              |   92 ++++++----
 slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.hxx |   16 -
 slideshow/source/engine/animationnodes/animationbasenode.hxx         |    3 
 slideshow/source/engine/animationnodes/basenode.hxx                  |    6 
 slideshow/source/engine/pointersymbol.hxx                            |    7 
 slideshow/source/engine/rehearsetimingsactivity.cxx                  |   14 -
 slideshow/source/engine/shapes/viewshape.hxx                         |   10 -
 slideshow/source/engine/slide/shapemanagerimpl.cxx                   |   23 --
 slideshow/source/engine/slide/shapemanagerimpl.hxx                   |    6 
 slideshow/source/engine/slide/userpaintoverlay.cxx                   |   23 --
 slideshow/source/engine/transitions/slidechangebase.hxx              |    3 
 slideshow/source/engine/usereventqueue.cxx                           |    2 
 slideshow/source/inc/activitiesqueue.hxx                             |    7 
 slideshow/source/inc/doctreenode.hxx                                 |    7 
 slideshow/source/inc/listenercontainer.hxx                           |    1 
 slideshow/source/inc/mouseeventhandler.hxx                           |   30 ---
 slideshow/source/inc/shapemanager.hxx                                |    8 
 slideshow/source/inc/slidebitmap.hxx                                 |    1 
 slideshow/source/inc/unoviewcontainer.hxx                            |    4 
 slideshow/source/inc/viewupdate.hxx                                  |    7 
 20 files changed, 58 insertions(+), 212 deletions(-)

New commits:
commit 5a7bf1b32c3699c9ca40d60e61403a3b587f35ff
Author: Noel Grandin <noel at peralex.com>
Date:   Thu Jul 16 14:45:53 2015 +0200

    loplugin:unusedmethods slideshow
    
    Change-Id: I66b6cddb638a9fc1228d3ea9df5d112300a00eb3
    Reviewed-on: https://gerrit.libreoffice.org/17128
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noelgrandin at gmail.com>

diff --git a/compilerplugins/clang/unusedmethods.cxx b/compilerplugins/clang/unusedmethods.cxx
index 6d0303d..a137a21 100644
--- a/compilerplugins/clang/unusedmethods.cxx
+++ b/compilerplugins/clang/unusedmethods.cxx
@@ -35,9 +35,6 @@ to get it to work :-)
 
 TODO deal with calls to superclass/member constructors from other constructors, so
      we can find unused constructors
-TODO deal with free functions and static methods
-TODO track instantiations of template class constructor methods
-TODO track instantiation of overridden methods when a template class is instantiated
 */
 
 namespace {
@@ -71,18 +68,20 @@ public:
     }
 
     bool VisitCallExpr(CallExpr* );
-    bool VisitCXXMethodDecl( const CXXMethodDecl* decl );
+    bool VisitFunctionDecl( const FunctionDecl* decl );
     bool VisitDeclRefExpr( const DeclRefExpr* );
-    bool TraverseCXXMethodDecl(CXXMethodDecl * decl) { return RecursiveASTVisitor::TraverseCXXMethodDecl(decl); }
+    bool VisitCXXConstructExpr( const CXXConstructExpr* );
 };
 
-static std::string niceName(const CXXMethodDecl* functionDecl)
+static std::string niceName(const FunctionDecl* functionDecl)
 {
     std::string s =
         compat::getReturnType(*functionDecl).getCanonicalType().getAsString()
-        + " " + functionDecl->getParent()->getQualifiedNameAsString()
-        + "::" + functionDecl->getNameAsString()
-        + "(";
+        + " ";
+    if (isa<CXXMethodDecl>(functionDecl)) {
+        s += dyn_cast<CXXMethodDecl>(functionDecl)->getParent()->getQualifiedNameAsString() + "::";
+    }
+    s += functionDecl->getNameAsString() + "(";
     bool bFirst = true;
     for (const ParmVarDecl *pParmVarDecl : functionDecl->params()) {
         if (bFirst)
@@ -92,27 +91,30 @@ static std::string niceName(const CXXMethodDecl* functionDecl)
         s += pParmVarDecl->getType().getCanonicalType().getAsString();
     }
     s += ")";
-    if (functionDecl->isConst()) {
+    if (isa<CXXMethodDecl>(functionDecl) && dyn_cast<CXXMethodDecl>(functionDecl)->isConst()) {
         s += " const";
     }
     return s;
 }
 
-static void logCallToRootMethods(const CXXMethodDecl* decl)
+static void logCallToRootMethods(const FunctionDecl* functionDecl)
 {
-    // For virtual/overriding methods, we need to pretend we called the root method(s),
-    // so that they get marked as used.
-    decl = decl->getCanonicalDecl();
+    functionDecl = functionDecl->getCanonicalDecl();
     bool bPrinted = false;
-    for(CXXMethodDecl::method_iterator it = decl->begin_overridden_methods();
-        it != decl->end_overridden_methods(); ++it)
-    {
-        logCallToRootMethods(*it);
-        bPrinted = true;
+    if (isa<CXXMethodDecl>(functionDecl)) {
+        // For virtual/overriding methods, we need to pretend we called the root method(s),
+        // so that they get marked as used.
+        const CXXMethodDecl* methodDecl = dyn_cast<CXXMethodDecl>(functionDecl);
+        for(CXXMethodDecl::method_iterator it = methodDecl->begin_overridden_methods();
+            it != methodDecl->end_overridden_methods(); ++it)
+        {
+            logCallToRootMethods(*it);
+            bPrinted = true;
+        }
     }
     if (!bPrinted)
     {
-        std::string s = niceName(decl);
+        std::string s = niceName(functionDecl);
         callSet.insert(s);
     }
 }
@@ -154,18 +156,42 @@ bool UnusedMethods::VisitCallExpr(CallExpr* expr)
     // if the function is templated. However, if we are inside a template function,
     // calling another function on the same template, the same problem occurs.
     // Rather than tracking all of that, just traverse anything we have not already traversed.
-    if (traversedFunctionSet.insert(calleeFunctionDecl->getQualifiedNameAsString()).second)
+    if (traversedFunctionSet.insert(niceName(calleeFunctionDecl)).second)
         TraverseFunctionDecl(calleeFunctionDecl);
 
-    CXXMethodDecl* calleeMethodDecl = dyn_cast_or_null<CXXMethodDecl>(calleeFunctionDecl);
-    if (calleeMethodDecl == nullptr) {
+    logCallToRootMethods(calleeFunctionDecl);
+    return true;
+}
+
+bool UnusedMethods::VisitCXXConstructExpr(const CXXConstructExpr* expr)
+{
+    // I don't use the normal ignoreLocation() here, because I __want__ to include files that are
+    // compiled in the $WORKDIR since they may refer to normal code
+    SourceLocation expansionLoc = compiler.getSourceManager().getExpansionLoc( expr->getLocStart() );
+    if( compiler.getSourceManager().isInSystemHeader( expansionLoc ))
+        return true;
+
+    const CXXConstructorDecl *consDecl = expr->getConstructor();
+    consDecl = consDecl->getCanonicalDecl();
+    if (consDecl->getTemplatedKind() == FunctionDecl::TemplatedKind::TK_NonTemplate
+        && !consDecl->isFunctionTemplateSpecialization()) {
         return true;
     }
-    logCallToRootMethods(calleeMethodDecl);
+    // if we see a call to a constructor, it may effectively create a whole new class,
+    // if the constructor's class is templated.
+    if (!traversedFunctionSet.insert(niceName(consDecl)).second)
+        return true;
+
+    const CXXRecordDecl* parent = consDecl->getParent();
+    for( CXXRecordDecl::ctor_iterator it = parent->ctor_begin(); it != parent->ctor_end(); ++it)
+        TraverseCXXConstructorDecl(*it);
+    for( CXXRecordDecl::method_iterator it = parent->method_begin(); it != parent->method_end(); ++it)
+        TraverseCXXMethodDecl(*it);
+
     return true;
 }
 
-bool UnusedMethods::VisitCXXMethodDecl( const CXXMethodDecl* functionDecl )
+bool UnusedMethods::VisitFunctionDecl( const FunctionDecl* functionDecl )
 {
     // I don't use the normal ignoreLocation() here, because I __want__ to include files that are
     // compiled in the $WORKDIR since they may refer to normal code
@@ -174,12 +200,10 @@ bool UnusedMethods::VisitCXXMethodDecl( const CXXMethodDecl* functionDecl )
         return true;
 
     functionDecl = functionDecl->getCanonicalDecl();
+    const CXXMethodDecl* methodDecl = dyn_cast_or_null<CXXMethodDecl>(functionDecl);
+
     // ignore method overrides, since the call will show up as being directed to the root method
-    if (functionDecl->size_overridden_methods() != 0 || functionDecl->hasAttr<OverrideAttr>()) {
-        return true;
-    }
-    // ignore static's for now. Would require generalising this plugin a little
-    if (functionDecl->isStatic()) {
+    if (methodDecl && (methodDecl->size_overridden_methods() != 0 || methodDecl->hasAttr<OverrideAttr>())) {
         return true;
     }
     // ignore stuff that forms part of the stable URE interface
@@ -187,7 +211,7 @@ bool UnusedMethods::VisitCXXMethodDecl( const CXXMethodDecl* functionDecl )
                               functionDecl->getNameInfo().getLoc()))) {
         return true;
     }
-    if (isStandardStuff(functionDecl->getParent()->getQualifiedNameAsString())) {
+    if (methodDecl && isStandardStuff(methodDecl->getParent()->getQualifiedNameAsString())) {
         return true;
     }
     if (isa<CXXDestructorDecl>(functionDecl)) {
@@ -196,7 +220,7 @@ bool UnusedMethods::VisitCXXMethodDecl( const CXXMethodDecl* functionDecl )
     if (isa<CXXConstructorDecl>(functionDecl)) {
         return true;
     }
-    if (functionDecl->isDeleted()) {
+    if (methodDecl && methodDecl->isDeleted()) {
         return true;
     }
 
@@ -214,10 +238,10 @@ bool UnusedMethods::VisitDeclRefExpr( const DeclRefExpr* declRefExpr )
         return true;
 
     const Decl* functionDecl = declRefExpr->getDecl();
-    if (!isa<CXXMethodDecl>(functionDecl)) {
+    if (!isa<FunctionDecl>(functionDecl)) {
         return true;
     }
-    logCallToRootMethods(dyn_cast<CXXMethodDecl>(functionDecl)->getCanonicalDecl());
+    logCallToRootMethods(dyn_cast<FunctionDecl>(functionDecl)->getCanonicalDecl());
     return true;
 }
 
diff --git a/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.hxx b/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.hxx
index b23f768..01443b0 100644
--- a/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.hxx
+++ b/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.hxx
@@ -296,10 +296,6 @@ public:
     */
     void pushTriangle(const glm::vec2& SlideLocation0,const glm::vec2& SlideLocation1,const glm::vec2& SlideLocation2);
 
-    /** clear all the vertices, normals, tex coordinates, and normals
-    */
-    void clearTriangles();
-
     /** guards against directly changing the vertices
 
         @return
@@ -307,18 +303,6 @@ public:
     */
     const std::vector<glm::vec3>& getVertices() const {return Vertices;}
 
-    /** guards against directly changing the vertices
-    */
-    const std::vector<glm::vec3>& getNormals() const {return Normals;}
-
-    /** guards against directly changing the vertices
-
-        @return
-        the list of Texture Coordinates
-
-    */
-    const std::vector<glm::vec2>& getTexCoords() const {return TexCoords;}
-
     /** list of Operations to be performed on this primitive.These operations will be called in the order they were pushed back in. In OpenGL this effectively uses the operations in the opposite order they were pushed back.
 
         @return
diff --git a/slideshow/source/engine/animationnodes/animationbasenode.hxx b/slideshow/source/engine/animationnodes/animationbasenode.hxx
index 429d981..6e9ab3c 100644
--- a/slideshow/source/engine/animationnodes/animationbasenode.hxx
+++ b/slideshow/source/engine/animationnodes/animationbasenode.hxx
@@ -78,9 +78,6 @@ private:
     bool isDependentSubsettedShape() const
         { return mpShapeSubset && !mbIsIndependentSubset; }
 
-    ShapeAttributeLayerHolder const & getAttributeLayerHolder() const
-        { return maAttributeLayerHolder; }
-
 private:
     ::com::sun::star::uno::Reference<
         ::com::sun::star::animations::XAnimate>     mxAnimateNode;
diff --git a/slideshow/source/engine/animationnodes/basenode.hxx b/slideshow/source/engine/animationnodes/basenode.hxx
index cf75964..799feac 100644
--- a/slideshow/source/engine/animationnodes/basenode.hxx
+++ b/slideshow/source/engine/animationnodes/basenode.hxx
@@ -53,12 +53,6 @@ struct NodeContext
           mbIsIndependentSubset( true )
         {}
 
-    void dispose()
-    {
-        maContext.dispose();
-        mpMasterShapeSubset.reset();
-    }
-
     /// Context as passed to createAnimationNode()
     SlideShowContext                 maContext;
 
diff --git a/slideshow/source/engine/pointersymbol.hxx b/slideshow/source/engine/pointersymbol.hxx
index ada82f7..4d9a89d 100644
--- a/slideshow/source/engine/pointersymbol.hxx
+++ b/slideshow/source/engine/pointersymbol.hxx
@@ -45,13 +45,6 @@ public:
                                           EventMultiplexer&                            rEventMultiplexer,
                                           const UnoViewContainer&                      rViewContainer );
 
-    /** Shows the pointer symbol.
-     */
-    void show() { setVisible(true); }
-
-    /** Hides the pointer symbol.
-     */
-    void hide() { setVisible(false); }
     /** Use this method to update the pointer's position
     */
     void setVisible( const bool bVisible );
diff --git a/slideshow/source/engine/rehearsetimingsactivity.cxx b/slideshow/source/engine/rehearsetimingsactivity.cxx
index 15d6e6e..a0c271d 100644
--- a/slideshow/source/engine/rehearsetimingsactivity.cxx
+++ b/slideshow/source/engine/rehearsetimingsactivity.cxx
@@ -120,8 +120,6 @@ public:
     // MouseEventHandler
     virtual bool handleMousePressed( awt::MouseEvent const & evt ) SAL_OVERRIDE;
     virtual bool handleMouseReleased( awt::MouseEvent const & evt ) SAL_OVERRIDE;
-    virtual bool handleMouseEntered( awt::MouseEvent const & evt ) SAL_OVERRIDE;
-    virtual bool handleMouseExited( awt::MouseEvent const & evt ) SAL_OVERRIDE;
     virtual bool handleMouseDragged( awt::MouseEvent const & evt ) SAL_OVERRIDE;
     virtual bool handleMouseMoved( awt::MouseEvent const & evt ) SAL_OVERRIDE;
 
@@ -541,18 +539,6 @@ bool RehearseTimingsActivity::MouseHandler::handleMouseReleased(
     return false;
 }
 
-bool RehearseTimingsActivity::MouseHandler::handleMouseEntered(
-    awt::MouseEvent const & /*evt*/ )
-{
-    return false;
-}
-
-bool RehearseTimingsActivity::MouseHandler::handleMouseExited(
-    awt::MouseEvent const & /*evt*/ )
-{
-    return false;
-}
-
 bool RehearseTimingsActivity::MouseHandler::handleMouseDragged(
     awt::MouseEvent const & evt )
 {
diff --git a/slideshow/source/engine/shapes/viewshape.hxx b/slideshow/source/engine/shapes/viewshape.hxx
index ed20b7e..51dfaac 100644
--- a/slideshow/source/engine/shapes/viewshape.hxx
+++ b/slideshow/source/engine/shapes/viewshape.hxx
@@ -277,16 +277,6 @@ namespace slideshow
                          const VectorOfDocTreeNodes&            rSubsets,
                          bool                                   bIsVisible ) const;
 
-            /** Calc sprite size in pixel
-
-                Converts user coordinate system to device pixel, and
-                adds antialiasing border.
-
-                @param rUserSize
-                Size of the sprite in user coordinate system (doc coordinates)
-             */
-            ::basegfx::B2DSize calcSpriteSizePixel( const ::basegfx::B2DSize& rUserSize ) const;
-
             enum{ MAX_RENDER_CACHE_ENTRIES=2 };
 
             /** Retrieve a valid iterator to renderer cache entry
diff --git a/slideshow/source/engine/slide/shapemanagerimpl.cxx b/slideshow/source/engine/slide/shapemanagerimpl.cxx
index a8d3248..c952825 100644
--- a/slideshow/source/engine/slide/shapemanagerimpl.cxx
+++ b/slideshow/source/engine/slide/shapemanagerimpl.cxx
@@ -182,18 +182,6 @@ bool ShapeManagerImpl::handleMouseReleased( awt::MouseEvent const& e )
     return false; // did not handle this event
 }
 
-bool ShapeManagerImpl::handleMouseEntered( const awt::MouseEvent& )
-{
-    // not used here
-    return false; // did not handle the event
-}
-
-bool ShapeManagerImpl::handleMouseExited( const awt::MouseEvent& )
-{
-    // not used here
-    return false; // did not handle the event
-}
-
 bool ShapeManagerImpl::handleMouseDragged( const awt::MouseEvent& )
 {
     // not used here
@@ -256,12 +244,6 @@ bool ShapeManagerImpl::update()
     return false;
 }
 
-bool ShapeManagerImpl::update( ViewSharedPtr const& /*rView*/ )
-{
-    // am not doing view-specific updates here.
-    return false;
-}
-
 bool ShapeManagerImpl::needsUpdate() const
 {
     if( mbEnabled && mpLayerManager )
@@ -301,11 +283,6 @@ void ShapeManagerImpl::addHyperlinkArea( const HyperlinkAreaSharedPtr& rArea )
     maHyperlinkShapes.insert(rArea);
 }
 
-void ShapeManagerImpl::removeHyperlinkArea( const HyperlinkAreaSharedPtr& rArea )
-{
-    maHyperlinkShapes.erase(rArea);
-}
-
 AttributableShapeSharedPtr ShapeManagerImpl::getSubsetShape( const AttributableShapeSharedPtr& rOrigShape,
                                                              const DocTreeNode&                rTreeNode )
 {
diff --git a/slideshow/source/engine/slide/shapemanagerimpl.hxx b/slideshow/source/engine/slide/shapemanagerimpl.hxx
index 6de066c..651111b 100644
--- a/slideshow/source/engine/slide/shapemanagerimpl.hxx
+++ b/slideshow/source/engine/slide/shapemanagerimpl.hxx
@@ -98,10 +98,6 @@ private:
         ::com::sun::star::awt::MouseEvent const& evt ) SAL_OVERRIDE;
     virtual bool handleMouseReleased(
         ::com::sun::star::awt::MouseEvent const& evt ) SAL_OVERRIDE;
-    virtual bool handleMouseEntered(
-        ::com::sun::star::awt::MouseEvent const& evt ) SAL_OVERRIDE;
-    virtual bool handleMouseExited(
-        ::com::sun::star::awt::MouseEvent const& evt ) SAL_OVERRIDE;
     virtual bool handleMouseDragged(
         ::com::sun::star::awt::MouseEvent const& evt ) SAL_OVERRIDE;
     virtual bool handleMouseMoved(
@@ -112,7 +108,6 @@ private:
 
 
     virtual bool update() SAL_OVERRIDE;
-    virtual bool update( ViewSharedPtr const& rView ) SAL_OVERRIDE;
     virtual bool needsUpdate() const SAL_OVERRIDE;
 
 
@@ -126,7 +121,6 @@ private:
         ::com::sun::star::uno::Reference<
            ::com::sun::star::drawing::XShape > const & xShape ) const SAL_OVERRIDE;
     virtual void addHyperlinkArea( const boost::shared_ptr<HyperlinkArea>& rArea ) SAL_OVERRIDE;
-    virtual void removeHyperlinkArea( const boost::shared_ptr<HyperlinkArea>& rArea ) SAL_OVERRIDE;
 
 
     // SubsettableShapeManager interface
diff --git a/slideshow/source/engine/slide/userpaintoverlay.cxx b/slideshow/source/engine/slide/userpaintoverlay.cxx
index cdab35a..252f9ef 100644
--- a/slideshow/source/engine/slide/userpaintoverlay.cxx
+++ b/slideshow/source/engine/slide/userpaintoverlay.cxx
@@ -296,29 +296,6 @@ namespace slideshow
                 return true;
             }
 
-            virtual bool handleMouseEntered( const awt::MouseEvent& e ) SAL_OVERRIDE
-            {
-                if( !mbActive )
-                    return false;
-
-                mbIsLastPointValid = true;
-                maLastPoint.setX( e.X );
-                maLastPoint.setY( e.Y );
-
-                return true;
-            }
-
-            virtual bool handleMouseExited( const awt::MouseEvent& ) SAL_OVERRIDE
-            {
-                if( !mbActive )
-                    return false;
-
-                mbIsLastPointValid = false;
-                mbIsLastMouseDownPosValid = false;
-
-                return true;
-            }
-
             virtual bool handleMouseDragged( const awt::MouseEvent& e ) SAL_OVERRIDE
             {
                 if( !mbActive )
diff --git a/slideshow/source/engine/transitions/slidechangebase.hxx b/slideshow/source/engine/transitions/slidechangebase.hxx
index 7887ae2..7860150 100644
--- a/slideshow/source/engine/transitions/slidechangebase.hxx
+++ b/slideshow/source/engine/transitions/slidechangebase.hxx
@@ -184,9 +184,6 @@ private:
     void addSprites( ViewEntry& rEntry );
     static void clearViewEntry( ViewEntry& rEntry );
 
-    ViewsVecT::iterator lookupView( UnoViewSharedPtr const & pView );
-    ViewsVecT::const_iterator lookupView( UnoViewSharedPtr const & pView ) const;
-
     SoundPlayerSharedPtr                mpSoundPlayer;
 
     EventMultiplexer&                   mrEventMultiplexer;
diff --git a/slideshow/source/engine/usereventqueue.cxx b/slideshow/source/engine/usereventqueue.cxx
index af5f052..1b5d1a1 100644
--- a/slideshow/source/engine/usereventqueue.cxx
+++ b/slideshow/source/engine/usereventqueue.cxx
@@ -65,8 +65,6 @@ class MouseEventHandler_ : public MouseEventHandler
 public:
     virtual bool handleMousePressed( awt::MouseEvent const& /*e*/ ) SAL_OVERRIDE { return false;}
     virtual bool handleMouseReleased( awt::MouseEvent const& /*e*/) SAL_OVERRIDE { return false;}
-    virtual bool handleMouseEntered( awt::MouseEvent const& /*e*/ ) SAL_OVERRIDE { return false;}
-    virtual bool handleMouseExited( awt::MouseEvent const& /*e*/ ) SAL_OVERRIDE { return false; }
     virtual bool handleMouseDragged( awt::MouseEvent const& /*e*/ ) SAL_OVERRIDE { return false;}
     virtual bool handleMouseMoved( awt::MouseEvent const& /*e*/ ) SAL_OVERRIDE { return false; }
 };
diff --git a/slideshow/source/inc/activitiesqueue.hxx b/slideshow/source/inc/activitiesqueue.hxx
index f9bf9ed..78057f0 100644
--- a/slideshow/source/inc/activitiesqueue.hxx
+++ b/slideshow/source/inc/activitiesqueue.hxx
@@ -86,13 +86,6 @@ namespace slideshow
             ::boost::shared_ptr< ::canvas::tools::ElapsedTime > const &
             getTimer() const { return mpTimer; }
 
-            /** returns number of all activities, waiting, reinserted and dequeued
-             */
-            std::size_t size() const
-            {
-                return maCurrentActivitiesWaiting.size() + maCurrentActivitiesReinsert.size() + maDequeuedActivities.size();
-            }
-
         private:
             ::boost::shared_ptr< ::canvas::tools::ElapsedTime > mpTimer;
 
diff --git a/slideshow/source/inc/doctreenode.hxx b/slideshow/source/inc/doctreenode.hxx
index cc8a745..584832c 100644
--- a/slideshow/source/inc/doctreenode.hxx
+++ b/slideshow/source/inc/doctreenode.hxx
@@ -68,10 +68,6 @@ namespace slideshow
                 NODETYPE_LOGICAL_CHARACTER_CELL=132
             };
 
-            // classificators for above text entity types
-            static bool isLogicalNodeType( NodeType eType ) { return eType > 127; }
-            static bool isFormattingNodeType( NodeType eType ) { return eType > 0 && eType < 128; }
-
             /** Create empty tree node
              */
             DocTreeNode() :
@@ -107,11 +103,8 @@ namespace slideshow
 
             sal_Int32           getStartIndex() const { return mnStartIndex; }
             sal_Int32           getEndIndex() const { return mnEndIndex; }
-            void                setStartIndex( sal_Int32 nIndex ) { mnStartIndex = nIndex; }
             void                setEndIndex( sal_Int32 nIndex ) { mnEndIndex = nIndex; }
 
-            NodeType            getType() const { return meType; }
-
             void                reset()
             {
                 mnStartIndex = -1;
diff --git a/slideshow/source/inc/listenercontainer.hxx b/slideshow/source/inc/listenercontainer.hxx
index cbf5ff7..8317ac9 100644
--- a/slideshow/source/inc/listenercontainer.hxx
+++ b/slideshow/source/inc/listenercontainer.hxx
@@ -34,7 +34,6 @@ struct EmptyBase
     {
         explicit EmptyClearableGuard(EmptyBase) {}
         static void clear() {}
-        static void reset() {}
     };
 
     typedef EmptyGuard           Guard;
diff --git a/slideshow/source/inc/mouseeventhandler.hxx b/slideshow/source/inc/mouseeventhandler.hxx
index d63020c..5886f29 100644
--- a/slideshow/source/inc/mouseeventhandler.hxx
+++ b/slideshow/source/inc/mouseeventhandler.hxx
@@ -76,36 +76,6 @@ namespace slideshow
              */
             virtual bool handleMouseReleased( const ::com::sun::star::awt::MouseEvent& e ) = 0;
 
-            /** Handle a mouse entered the view event.
-
-                @param e
-                The mouse event that occurred. The x,y coordinates of
-                the event are already transformed back to user
-                coordinate space, taking the inverse transform of the
-                view in which the event occurred.
-
-                @return true, if this handler has successfully
-                processed the pause event. When this method returns
-                false, possibly other, less prioritized handlers are
-                called, too.
-             */
-            virtual bool handleMouseEntered( const ::com::sun::star::awt::MouseEvent& e ) = 0;
-
-            /** Handle a mouse exited the view event.
-
-                @param e
-                The mouse event that occurred. The x,y coordinates of
-                the event are already transformed back to user
-                coordinate space, taking the inverse transform of the
-                view in which the event occurred.
-
-                @return true, if this handler has successfully
-                processed the pause event. When this method returns
-                false, possibly other, less prioritized handlers are
-                called, too.
-             */
-            virtual bool handleMouseExited( const ::com::sun::star::awt::MouseEvent& e ) = 0;
-
             /** Handle a mouse was moved with a pressed button event.
 
                 @param e
diff --git a/slideshow/source/inc/shapemanager.hxx b/slideshow/source/inc/shapemanager.hxx
index 3325b32..e0daad3 100644
--- a/slideshow/source/inc/shapemanager.hxx
+++ b/slideshow/source/inc/shapemanager.hxx
@@ -100,14 +100,6 @@ namespace slideshow
                 space coordinates.
              */
             virtual void addHyperlinkArea( const boost::shared_ptr<HyperlinkArea>& rArea ) = 0;
-
-            /** Unregister given shape as a hyperlink target
-
-                @param rArea
-                Hyperlink sensitive area. Will cease to participate in
-                hyperlink region lookup.
-             */
-            virtual void removeHyperlinkArea( const boost::shared_ptr<HyperlinkArea>& rArea ) = 0;
         };
 
         typedef ::boost::shared_ptr< ShapeManager > ShapeManagerSharedPtr;
diff --git a/slideshow/source/inc/slidebitmap.hxx b/slideshow/source/inc/slidebitmap.hxx
index cf57729..63f6c3b 100644
--- a/slideshow/source/inc/slidebitmap.hxx
+++ b/slideshow/source/inc/slidebitmap.hxx
@@ -64,7 +64,6 @@ namespace slideshow
 
             bool                draw( const ::cppcanvas::CanvasSharedPtr& rCanvas ) const;
             ::basegfx::B2ISize  getSize() const;
-            ::basegfx::B2DPoint getOutputPos() const{return maOutputPos;}
             void                move( const ::basegfx::B2DPoint& rNewPos );
             void                clip( const ::basegfx::B2DPolyPolygon& rClipPoly );
 
diff --git a/slideshow/source/inc/unoviewcontainer.hxx b/slideshow/source/inc/unoviewcontainer.hxx
index 2f0ea46..d7b0c68 100644
--- a/slideshow/source/inc/unoviewcontainer.hxx
+++ b/slideshow/source/inc/unoviewcontainer.hxx
@@ -71,12 +71,8 @@ namespace slideshow
             // the following parrots STL container concept methods
             // ===================================================
 
-            std::size_t size() const { return maViews.size(); }
             bool empty() const { return maViews.empty(); }
 
-            void clear() { maViews.clear(); }
-
-
             UnoViewVector::iterator         begin() { return maViews.begin(); }
             UnoViewVector::const_iterator   begin() const { return maViews.begin(); }
             UnoViewVector::iterator         end() { return maViews.end(); }
diff --git a/slideshow/source/inc/viewupdate.hxx b/slideshow/source/inc/viewupdate.hxx
index 3bf55be..d6fe16f 100644
--- a/slideshow/source/inc/viewupdate.hxx
+++ b/slideshow/source/inc/viewupdate.hxx
@@ -46,13 +46,6 @@ namespace slideshow
              */
             virtual bool update() = 0;
 
-            /** Perform the update action on given view only
-
-                @return true, if the update was performed
-                successfully, false otherwise.
-             */
-            virtual bool update( ViewSharedPtr const& rView ) = 0;
-
             /** Query whether updates are pending
 
                 @return true, if updates are pending. Calling update()


More information about the Libreoffice-commits mailing list