Kaydet (Commit) 41ea741c authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:unnecessaryvirtual in sfx2..svtools

Change-Id: Ib34e14806f7cc9a97ecfd68687ab17ee5c1f022b
Reviewed-on: https://gerrit.libreoffice.org/30652Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
Tested-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 028cc38a
......@@ -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,
......
......@@ -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);
......
......@@ -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;
......
......@@ -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
......
......@@ -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);
......
......@@ -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,
......
......@@ -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]; }
......
......@@ -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 );
};
......
......@@ -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);
......
......@@ -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;}
......
......@@ -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 );
......
......@@ -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
......
......@@ -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* );
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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; }
......
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