[Libreoffice-commits] core.git: include/sfx2 include/svl include/svtools sfx2/source slideshow/source svtools/source

Noel Grandin noel.grandin at collabora.co.uk
Mon Nov 7 09:40:20 UTC 2016


 include/sfx2/dispatch.hxx                          |    4 ++--
 include/sfx2/emojiview.hxx                         |    4 ++--
 include/sfx2/objface.hxx                           |    4 ++--
 include/sfx2/templatecontaineritem.hxx             |    5 ++---
 include/sfx2/templatelocalview.hxx                 |    4 ++--
 include/svl/itemprop.hxx                           |    4 ++--
 include/svl/nfkeytab.hxx                           |    4 ++--
 include/svl/stylepool.hxx                          |    4 ++--
 include/svtools/HtmlWriter.hxx                     |    4 ++--
 include/svtools/colrdlg.hxx                        |    4 ++--
 include/svtools/imap.hxx                           |    4 ++--
 include/svtools/scriptedtext.hxx                   |    4 ++--
 include/svtools/treelist.hxx                       |    4 ++--
 sfx2/source/bastyp/fltlst.hxx                      |    4 ++--
 sfx2/source/inc/workwin.hxx                        |    4 ++--
 slideshow/source/engine/animationfactory.cxx       |    5 ++---
 slideshow/source/engine/shapes/viewappletshape.hxx |    4 ++--
 slideshow/source/engine/shapes/viewmediashape.hxx  |    4 ++--
 slideshow/source/inc/shapeattributelayer.hxx       |   17 ++---------------
 svtools/source/brwbox/datwin.hxx                   |    4 ++--
 20 files changed, 40 insertions(+), 55 deletions(-)

New commits:
commit 41ea741cd843776cd600d33b28a7f0e35345e0d0
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Mon Nov 7 10:42:33 2016 +0200

    loplugin:unnecessaryvirtual in sfx2..svtools
    
    Change-Id: Ib34e14806f7cc9a97ecfd68687ab17ee5c1f022b
    Reviewed-on: https://gerrit.libreoffice.org/30652
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
    Tested-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/include/sfx2/dispatch.hxx b/include/sfx2/dispatch.hxx
index a510a93..51e05b8 100644
--- a/include/sfx2/dispatch.hxx
+++ b/include/sfx2/dispatch.hxx
@@ -76,7 +76,7 @@ enum class SfxSlotFilterState
 };
 
 
-class SFX2_DLLPUBLIC SfxDispatcher
+class SFX2_DLLPUBLIC SfxDispatcher final
 {
     std::unique_ptr<SfxDispatcher_Impl> xImp;
 
@@ -115,7 +115,7 @@ public:
 
     SAL_DLLPRIVATE void Construct_Impl( SfxDispatcher* pParent );
 
-    virtual             ~SfxDispatcher();
+                        ~SfxDispatcher();
 
     const SfxPoolItem*  Execute( sal_uInt16 nSlot,
                                  SfxCallMode nCall = SfxCallMode::SLOT,
diff --git a/include/sfx2/emojiview.hxx b/include/sfx2/emojiview.hxx
index 3c47c3e..80ef8a0 100644
--- a/include/sfx2/emojiview.hxx
+++ b/include/sfx2/emojiview.hxx
@@ -34,7 +34,7 @@ enum class FILTER_CATEGORY
 };
 
 // Display unicode emojis depending on the category
-class ViewFilter_Category
+class ViewFilter_Category final
 {
 public:
 
@@ -42,7 +42,7 @@ public:
         : mCategory(rCategory)
     {}
 
-    virtual ~ViewFilter_Category () {}
+    ~ViewFilter_Category () {}
 
     bool operator () (const ThumbnailViewItem *pItem);
 
diff --git a/include/sfx2/objface.hxx b/include/sfx2/objface.hxx
index a0dfc16..ac93da6 100644
--- a/include/sfx2/objface.hxx
+++ b/include/sfx2/objface.hxx
@@ -31,7 +31,7 @@ class  SfxConfigItem;
 class  SfxModule;
 class  SvStream;
 
-class SFX2_DLLPUBLIC SfxInterface
+class SFX2_DLLPUBLIC SfxInterface final
 {
 friend class SfxSlotPool;
 
@@ -49,7 +49,7 @@ public:
                                           SfxInterfaceId nClassId,
                                           const SfxInterface* pGeno,
                                           SfxSlot &rMessages, sal_uInt16 nMsgCount );
-    virtual                 ~SfxInterface();
+                            ~SfxInterface();
 
     void                    SetSlotMap( SfxSlot& rMessages, sal_uInt16 nMsgCount );
     inline sal_uInt16           Count() const;
diff --git a/include/sfx2/templatecontaineritem.hxx b/include/sfx2/templatecontaineritem.hxx
index 3aedcb2..e2f86a4 100644
--- a/include/sfx2/templatecontaineritem.hxx
+++ b/include/sfx2/templatecontaineritem.hxx
@@ -12,10 +12,9 @@
 
 #include <sfx2/templateproperties.hxx>
 
-class TemplateContainerItem
+class TemplateContainerItem final
 {
 public:
-
     sal_uInt16 mnId;
     sal_uInt16 mnRegionId;
     OUString maTitle;
@@ -23,7 +22,7 @@ public:
 
     TemplateContainerItem (sal_uInt16 nId);
 
-    virtual ~TemplateContainerItem ();
+    ~TemplateContainerItem ();
 };
 
 #endif // INCLUDED_SFX2_TEMPLATECONTAINERITEM_HXX
diff --git a/include/sfx2/templatelocalview.hxx b/include/sfx2/templatelocalview.hxx
index b0ab881..4a1579f 100644
--- a/include/sfx2/templatelocalview.hxx
+++ b/include/sfx2/templatelocalview.hxx
@@ -51,7 +51,7 @@ enum class FILTER_APPLICATION
 };
 
 // Display template items depending on the generator application
-class ViewFilter_Application
+class ViewFilter_Application final
 {
 public:
 
@@ -59,7 +59,7 @@ public:
         : mApp(App)
     {}
 
-    virtual ~ViewFilter_Application () {}
+    ~ViewFilter_Application () {}
 
     bool operator () (const ThumbnailViewItem *pItem);
 
diff --git a/include/svl/itemprop.hxx b/include/svl/itemprop.hxx
index 026e1b2..2e1d397 100644
--- a/include/svl/itemprop.hxx
+++ b/include/svl/itemprop.hxx
@@ -106,7 +106,7 @@ public:
 
 };
 
-class SVL_DLLPUBLIC SfxItemPropertySet
+class SVL_DLLPUBLIC SfxItemPropertySet final
 {
     SfxItemPropertyMap                                        m_aMap;
     mutable css::uno::Reference<css::beans::XPropertySetInfo> m_xInfo;
@@ -114,7 +114,7 @@ class SVL_DLLPUBLIC SfxItemPropertySet
 public:
                             SfxItemPropertySet( const SfxItemPropertyMapEntry *pMap ) :
                                 m_aMap(pMap) {}
-                            virtual ~SfxItemPropertySet();
+                            ~SfxItemPropertySet();
 
     void getPropertyValue( const SfxItemPropertySimpleEntry& rEntry,
                                           const SfxItemSet& rSet,
diff --git a/include/svl/nfkeytab.hxx b/include/svl/nfkeytab.hxx
index 04241b0..923d528 100644
--- a/include/svl/nfkeytab.hxx
+++ b/include/svl/nfkeytab.hxx
@@ -104,14 +104,14 @@ enum NfKeywordIndex
     NF_KEYWORD_ENTRIES_COUNT
 };
 
-class NfKeywordTable
+class NfKeywordTable final
 {
     typedef ::std::vector<OUString> Keywords_t;
     Keywords_t m_keywords;
 
 public:
     NfKeywordTable() : m_keywords(NF_KEYWORD_ENTRIES_COUNT) {};
-    virtual ~NfKeywordTable() {}
+    ~NfKeywordTable() {}
 
     OUString & operator[] (Keywords_t::size_type n) { return m_keywords[n]; }
     const OUString & operator[] (Keywords_t::size_type n) const { return m_keywords[n]; }
diff --git a/include/svl/stylepool.hxx b/include/svl/stylepool.hxx
index 71b0b57..fc8a680 100644
--- a/include/svl/stylepool.hxx
+++ b/include/svl/stylepool.hxx
@@ -26,7 +26,7 @@
 class StylePoolImpl;
 class IStylePoolIteratorAccess;
 
-class SVL_DLLPUBLIC StylePool
+class SVL_DLLPUBLIC StylePool final
 {
 private:
     std::unique_ptr<StylePoolImpl> pImpl;
@@ -65,7 +65,7 @@ public:
     IStylePoolIteratorAccess* createIterator( const bool bSkipUnusedItemSets = false,
                                                       const bool bSkipIgnorableItems = false );
 
-    virtual ~StylePool();
+    ~StylePool();
 
     static OUString nameOf( const std::shared_ptr<SfxItemSet>& pSet );
 };
diff --git a/include/svtools/HtmlWriter.hxx b/include/svtools/HtmlWriter.hxx
index 7bec609..67172fd 100644
--- a/include/svtools/HtmlWriter.hxx
+++ b/include/svtools/HtmlWriter.hxx
@@ -18,7 +18,7 @@
 
 class SvStream;
 
-class SVT_DLLPUBLIC HtmlWriter
+class SVT_DLLPUBLIC HtmlWriter final
 {
 private:
     std::vector<OString> maElementStack;
@@ -31,7 +31,7 @@ private:
 
 public:
     HtmlWriter(SvStream& rStream);
-    virtual ~HtmlWriter();
+    ~HtmlWriter();
 
     void prettyPrint(bool b);
 
diff --git a/include/svtools/colrdlg.hxx b/include/svtools/colrdlg.hxx
index f24e798..af7c27c 100644
--- a/include/svtools/colrdlg.hxx
+++ b/include/svtools/colrdlg.hxx
@@ -32,11 +32,11 @@ namespace svtools
     enum ColorPickerMode { ColorPickerMode_SELECT = 0, ColorPickerMode_ADD = 1, ColorPickerMode_MODIFY = 2 };
 }
 
-class SVT_DLLPUBLIC SvColorDialog
+class SVT_DLLPUBLIC SvColorDialog final
 {
 public:
     SvColorDialog( vcl::Window* pParent );
-    virtual ~SvColorDialog();
+    ~SvColorDialog();
 
     void            SetColor( const Color& rColor );
     const Color&    GetColor() const { return maColor;}
diff --git a/include/svtools/imap.hxx b/include/svtools/imap.hxx
index de17d95..bd31779 100644
--- a/include/svtools/imap.hxx
+++ b/include/svtools/imap.hxx
@@ -31,7 +31,7 @@ class Size;
 class Fraction;
 class IMapObject;
 
-class SVT_DLLPUBLIC ImageMap
+class SVT_DLLPUBLIC ImageMap final
 {
 private:
 
@@ -68,7 +68,7 @@ public:
                         ImageMap( const ImageMap& rImageMap );
 
                         // all IMapObjects are destroyed in the destructor
-    virtual             ~ImageMap();
+                        ~ImageMap();
 
     ImageMap&           operator=( const ImageMap& rImageMap );
 
diff --git a/include/svtools/scriptedtext.hxx b/include/svtools/scriptedtext.hxx
index 2b8e882..7d11eba 100644
--- a/include/svtools/scriptedtext.hxx
+++ b/include/svtools/scriptedtext.hxx
@@ -35,7 +35,7 @@ class Point;
 /**
 This class provides drawing text with different script types on any output devices.
 */
-class SVT_DLLPUBLIC SvtScriptedTextHelper
+class SVT_DLLPUBLIC SvtScriptedTextHelper final
 {
 private:
     std::unique_ptr<SvtScriptedTextHelper_Impl> mpImpl;             /// Implementation of class functionality.
@@ -53,7 +53,7 @@ public:
                                     const SvtScriptedTextHelper& _rCopy );
 
                                 /** Destructor. */
-    virtual                     ~SvtScriptedTextHelper();
+                                ~SvtScriptedTextHelper();
 
                                 /** Sets new fonts and recalculates the text width.
                                     @param  _pLatinFont
diff --git a/include/svtools/treelist.hxx b/include/svtools/treelist.hxx
index 73dea10..2d16287 100644
--- a/include/svtools/treelist.hxx
+++ b/include/svtools/treelist.hxx
@@ -62,7 +62,7 @@ struct SvSortData
     const SvTreeListEntry* pRight;
 };
 
-class SVT_DLLPUBLIC SvTreeList
+class SVT_DLLPUBLIC SvTreeList final
 {
     typedef std::vector<SvListView*> ListViewsType;
 
@@ -136,7 +136,7 @@ protected:
 public:
 
                         SvTreeList();
-    virtual             ~SvTreeList();
+                        ~SvTreeList();
 
     void                InsertView( SvListView* );
     void                RemoveView( SvListView* );
diff --git a/sfx2/source/bastyp/fltlst.hxx b/sfx2/source/bastyp/fltlst.hxx
index 8bb2aff..656637d 100644
--- a/sfx2/source/bastyp/fltlst.hxx
+++ b/sfx2/source/bastyp/fltlst.hxx
@@ -29,7 +29,7 @@
 #include <com/sun/star/lang/EventObject.hpp>
 #include <com/sun/star/uno/RuntimeException.hpp>
 
-class SfxFilterListener
+class SfxFilterListener final
 {
     private:
         css::uno::Reference< css::util::XRefreshable >  m_xFilterCache;
@@ -37,7 +37,7 @@ class SfxFilterListener
 
     public:
         SfxFilterListener();
-        virtual ~SfxFilterListener();
+        ~SfxFilterListener();
 
     public:
         // XRefreshListener
diff --git a/sfx2/source/inc/workwin.hxx b/sfx2/source/inc/workwin.hxx
index d0fe42d..e190516 100644
--- a/sfx2/source/inc/workwin.hxx
+++ b/sfx2/source/inc/workwin.hxx
@@ -187,7 +187,7 @@ class LayoutManagerListener : public ::cppu::WeakImplHelper<
         OUString                                         m_aLayoutManagerPropName;
 };
 
-class SfxWorkWindow
+class SfxWorkWindow final
 {
     friend class LayoutManagerListener;
 
@@ -238,7 +238,7 @@ protected:
 
 public:
                             SfxWorkWindow( vcl::Window* pWin, SfxFrame* pFrm, SfxFrame* pMaster );
-    virtual                 ~SfxWorkWindow();
+                            ~SfxWorkWindow();
     SfxBindings&            GetBindings()
                             { return *pBindings; }
     vcl::Window*                 GetWindow() const
diff --git a/slideshow/source/engine/animationfactory.cxx b/slideshow/source/engine/animationfactory.cxx
index 17714ff..adfedb5 100644
--- a/slideshow/source/engine/animationfactory.cxx
+++ b/slideshow/source/engine/animationfactory.cxx
@@ -436,7 +436,7 @@ namespace slideshow
 
                 ~GenericAnimation()
                 {
-                    end_();
+                    end();
                 }
 
                 // Animation interface
@@ -472,8 +472,7 @@ namespace slideshow
                     }
                 }
 
-                virtual void end() { end_(); }
-                void end_()
+                void end()
                 {
                     // TODO(Q2): Factor out common code (most
                     // prominently start() and end()) into base class
diff --git a/slideshow/source/engine/shapes/viewappletshape.hxx b/slideshow/source/engine/shapes/viewappletshape.hxx
index 26d8b6c..adc66cb 100644
--- a/slideshow/source/engine/shapes/viewappletshape.hxx
+++ b/slideshow/source/engine/shapes/viewappletshape.hxx
@@ -49,7 +49,7 @@ namespace slideshow
             The class is able to render the associated applet on View
             implementations.
          */
-        class ViewAppletShape
+        class ViewAppletShape final
         {
         public:
             /** Create a ViewAppletShape for the given View
@@ -80,7 +80,7 @@ namespace slideshow
 
             /** destroy the object
              */
-            virtual ~ViewAppletShape();
+            ~ViewAppletShape();
 
             /// Forbid copy construction
             ViewAppletShape(const ViewAppletShape&) = delete;
diff --git a/slideshow/source/engine/shapes/viewmediashape.hxx b/slideshow/source/engine/shapes/viewmediashape.hxx
index c04b3e9..5c0394f 100644
--- a/slideshow/source/engine/shapes/viewmediashape.hxx
+++ b/slideshow/source/engine/shapes/viewmediashape.hxx
@@ -55,7 +55,7 @@ namespace slideshow
             The class is able to render the associated media shape on
             View implementations.
          */
-        class ViewMediaShape
+        class ViewMediaShape final
         {
         public:
             /** Create a ViewMediaShape for the given View
@@ -69,7 +69,7 @@ namespace slideshow
 
             /** destroy the object
              */
-            virtual ~ViewMediaShape();
+            ~ViewMediaShape();
 
             /// Forbid copy construction
             ViewMediaShape(const ViewMediaShape&) = delete;
diff --git a/slideshow/source/inc/shapeattributelayer.hxx b/slideshow/source/inc/shapeattributelayer.hxx
index d52e8a9..e8648b5 100644
--- a/slideshow/source/inc/shapeattributelayer.hxx
+++ b/slideshow/source/inc/shapeattributelayer.hxx
@@ -47,28 +47,15 @@ namespace slideshow
             changes, clients can assume that the object's state has
             changed.
          */
-        class State
+        class State final
         {
         public:
-            virtual ~State() {}
+            ~State() {}
 
             /// Abstract, numerically encoded state ID
             typedef ::std::size_t StateId;
-
-            /** This method returns a numerical state identifier.
-
-                The state ID returned by this method abstractly
-                encodes the object's state. When this ID changes,
-                clients can assume that the object's state has
-                changed.
-
-                @return an abstract, numerical state ID.
-             */
-            ;
         };
 
-        typedef ::std::shared_ptr< State > StateSharedPtr;
-
         class ShapeAttributeLayer;
 
         typedef ::std::shared_ptr< ShapeAttributeLayer > ShapeAttributeLayerSharedPtr;
diff --git a/svtools/source/brwbox/datwin.hxx b/svtools/source/brwbox/datwin.hxx
index a3e1604..bc9299c 100644
--- a/svtools/source/brwbox/datwin.hxx
+++ b/svtools/source/brwbox/datwin.hxx
@@ -56,7 +56,7 @@ public:
 };
 
 
-class BrowserColumn
+class BrowserColumn final
 {
     sal_uInt16          _nId;
     sal_uLong           _nOriginalWidth;
@@ -67,7 +67,7 @@ class BrowserColumn
 public:
                         BrowserColumn( sal_uInt16 nItemId,
                                         const OUString& rTitle, sal_uLong nWidthPixel, const Fraction& rCurrentZoom );
-    virtual            ~BrowserColumn();
+                        ~BrowserColumn();
 
     sal_uInt16          GetId() const { return _nId; }
 


More information about the Libreoffice-commits mailing list