From 0f96b3f33f98ecd56f0fe55a65315d6762ff978a Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 7 Nov 2016 09:31:52 +0200 Subject: loplugin:unnecessaryvirtual in test..vbahelper Change-Id: I0e110af6eab798e11f96d0f7d282d59440d91965 Reviewed-on: https://gerrit.libreoffice.org/30649 Reviewed-by: Noel Grandin Tested-by: Noel Grandin --- include/test/mtfxmldump.hxx | 4 ++-- include/test/primitive2dxmldump.hxx | 4 ++-- include/test/xmlwriter.hxx | 4 ++-- include/toolkit/awt/scrollabledialog.hxx | 2 +- include/tools/simplerm.hxx | 4 ++-- include/unoidl/unoidl.hxx | 8 ++++---- include/vbahelper/vbacollectionimpl.hxx | 2 +- ucb/source/ucp/webdav-neon/DAVTypes.hxx | 4 ++-- ucb/source/ucp/webdav-neon/PropfindCache.hxx | 8 ++++---- unotools/source/config/viewoptions.cxx | 4 ++-- vbahelper/source/msforms/vbalistcontrolhelper.hxx | 3 +-- vbahelper/source/vbahelper/vbaapplicationbase.cxx | 6 +++--- vbahelper/source/vbahelper/vbacommandbarhelper.cxx | 3 +-- 13 files changed, 27 insertions(+), 29 deletions(-) diff --git a/include/test/mtfxmldump.hxx b/include/test/mtfxmldump.hxx index 6fc24e61992e..38087d6f8f3a 100644 --- a/include/test/mtfxmldump.hxx +++ b/include/test/mtfxmldump.hxx @@ -21,7 +21,7 @@ class XmlWriter; enum class MetaActionType; -class OOO_DLLPUBLIC_TEST MetafileXmlDump +class OOO_DLLPUBLIC_TEST MetafileXmlDump final { o3tl::enumarray maFilter; @@ -29,7 +29,7 @@ class OOO_DLLPUBLIC_TEST MetafileXmlDump public: MetafileXmlDump(); - virtual ~MetafileXmlDump(); + ~MetafileXmlDump(); void filterActionType(const MetaActionType nActionType, bool bShouldFilter); void filterAllActionTypes(); diff --git a/include/test/primitive2dxmldump.hxx b/include/test/primitive2dxmldump.hxx index b885234bdc67..80ef271ee720 100644 --- a/include/test/primitive2dxmldump.hxx +++ b/include/test/primitive2dxmldump.hxx @@ -19,7 +19,7 @@ #include -class OOO_DLLPUBLIC_TEST Primitive2dXmlDump +class OOO_DLLPUBLIC_TEST Primitive2dXmlDump final { private: std::vector maFilter; @@ -27,7 +27,7 @@ private: public: Primitive2dXmlDump(); - virtual ~Primitive2dXmlDump(); + ~Primitive2dXmlDump(); /** The actual result that will be used for testing. diff --git a/include/test/xmlwriter.hxx b/include/test/xmlwriter.hxx index 836a12384795..96a5314d8d48 100644 --- a/include/test/xmlwriter.hxx +++ b/include/test/xmlwriter.hxx @@ -18,7 +18,7 @@ class SvStream; -class OOO_DLLPUBLIC_TEST XmlWriter +class OOO_DLLPUBLIC_TEST XmlWriter final { private: SvStream* mpStream; @@ -26,7 +26,7 @@ private: public: XmlWriter(SvStream* pStream); - virtual ~XmlWriter(); + ~XmlWriter(); void startDocument(); void endDocument(); diff --git a/include/toolkit/awt/scrollabledialog.hxx b/include/toolkit/awt/scrollabledialog.hxx index 1003a536e1cb..c414c8f3966e 100644 --- a/include/toolkit/awt/scrollabledialog.hxx +++ b/include/toolkit/awt/scrollabledialog.hxx @@ -63,7 +63,7 @@ namespace toolkit void setScrollVisibility( ScrollBarVisibility rState ); DECL_LINK( ScrollBarHdl, ScrollBar*, void ); - virtual void ResetScrollBars(); + void ResetScrollBars(); // Window virtual void Resize() override; }; diff --git a/include/tools/simplerm.hxx b/include/tools/simplerm.hxx index 7560f4bc64c7..b670dab21a3d 100644 --- a/include/tools/simplerm.hxx +++ b/include/tools/simplerm.hxx @@ -30,7 +30,7 @@ class InternalResMgr; -class TOOLS_DLLPUBLIC SimpleResMgr +class TOOLS_DLLPUBLIC SimpleResMgr final { protected: osl::Mutex m_aAccessSafety; @@ -48,7 +48,7 @@ public: SimpleResMgr( const sal_Char* pPrefixName, const LanguageTag& rLocale); - virtual ~SimpleResMgr(); + ~SimpleResMgr(); static SimpleResMgr* Create( const sal_Char* pPrefixName, const LanguageTag& rLocale );// only in VCL diff --git a/include/unoidl/unoidl.hxx b/include/unoidl/unoidl.hxx index 4ab5d31e0047..7d9af0a0156c 100644 --- a/include/unoidl/unoidl.hxx +++ b/include/unoidl/unoidl.hxx @@ -24,14 +24,14 @@ namespace unoidl { -class LO_DLLPUBLIC_UNOIDL NoSuchFileException { +class LO_DLLPUBLIC_UNOIDL NoSuchFileException final { public: SAL_DLLPRIVATE NoSuchFileException(rtl::OUString const & uri): uri_(uri) {} SAL_DLLPRIVATE NoSuchFileException(NoSuchFileException const & other): uri_(other.uri_) {} - virtual SAL_DLLPRIVATE ~NoSuchFileException() throw (); + SAL_DLLPRIVATE ~NoSuchFileException() throw (); const rtl::OUString& getUri() const { return uri_; } @@ -41,7 +41,7 @@ private: rtl::OUString uri_; }; -class LO_DLLPUBLIC_UNOIDL FileFormatException { +class LO_DLLPUBLIC_UNOIDL FileFormatException final { public: SAL_DLLPRIVATE FileFormatException( rtl::OUString const & uri, rtl::OUString const & detail): @@ -52,7 +52,7 @@ public: uri_(other.uri_), detail_(other.detail_) {} - virtual SAL_DLLPRIVATE ~FileFormatException() throw (); + SAL_DLLPRIVATE ~FileFormatException() throw (); const rtl::OUString& getUri() const { return uri_; } diff --git a/include/vbahelper/vbacollectionimpl.hxx b/include/vbahelper/vbacollectionimpl.hxx index 114380795df2..60d48c228758 100644 --- a/include/vbahelper/vbacollectionimpl.hxx +++ b/include/vbahelper/vbacollectionimpl.hxx @@ -273,7 +273,7 @@ protected: return createCollectionObject( m_xIndexAccess->getByIndex( nIndex - 1 ) ); } - virtual void UpdateCollectionIndex( const css::uno::Reference< css::container::XIndexAccess >& xIndexAccess ) + void UpdateCollectionIndex( const css::uno::Reference< css::container::XIndexAccess >& xIndexAccess ) { css::uno::Reference< css::container::XNameAccess > xNameAccess( xIndexAccess, css::uno::UNO_QUERY_THROW ); m_xIndexAccess = xIndexAccess; diff --git a/ucb/source/ucp/webdav-neon/DAVTypes.hxx b/ucb/source/ucp/webdav-neon/DAVTypes.hxx index 68ac37e41038..1ce2d2a7a2f2 100644 --- a/ucb/source/ucp/webdav-neon/DAVTypes.hxx +++ b/ucb/source/ucp/webdav-neon/DAVTypes.hxx @@ -74,7 +74,7 @@ namespace webdav_ucp */ - class DAVOptions + class DAVOptions final { private: bool m_isClass1; @@ -103,7 +103,7 @@ namespace webdav_ucp DAVOptions( const DAVOptions & rOther ); - virtual ~DAVOptions(); + ~DAVOptions(); bool isClass1() const { return m_isClass1; }; void setClass1( bool Class1 = true ) { m_isClass1 = Class1; }; diff --git a/ucb/source/ucp/webdav-neon/PropfindCache.hxx b/ucb/source/ucp/webdav-neon/PropfindCache.hxx index 99ca5c65a7d3..76a951afbdcd 100644 --- a/ucb/source/ucp/webdav-neon/PropfindCache.hxx +++ b/ucb/source/ucp/webdav-neon/PropfindCache.hxx @@ -31,7 +31,7 @@ namespace webdav_ucp // net link is slow. // Define the properties cache element - class PropertyNames + class PropertyNames final { /// target time when this element becomes stale sal_uInt32 m_nStaleTime; @@ -43,7 +43,7 @@ namespace webdav_ucp PropertyNames(); explicit PropertyNames( const OUString& rURL ); PropertyNames( const PropertyNames& theOther ); - virtual ~PropertyNames(); + ~PropertyNames(); sal_uInt32 getStaleTime() const { return m_nStaleTime; }; void setStaleTime( const sal_uInt32 nStaleTime ) { m_nStaleTime = nStaleTime; }; @@ -62,14 +62,14 @@ namespace webdav_ucp typedef std::map< OUString, PropertyNames, std::less< OUString > >PropNameCache; - class PropertyNamesCache + class PropertyNamesCache final { PropNameCache m_aTheCache; osl::Mutex m_aMutex; public: PropertyNamesCache(); - virtual ~PropertyNamesCache(); + ~PropertyNamesCache(); bool getCachedPropertyNames( const OUString& URL, PropertyNames& rCacheElement ); void removeCachedPropertyNames( const OUString& URL ); diff --git a/unotools/source/config/viewoptions.cxx b/unotools/source/config/viewoptions.cxx index 874f9f13df3d..2b1c845cc524 100644 --- a/unotools/source/config/viewoptions.cxx +++ b/unotools/source/config/viewoptions.cxx @@ -85,14 +85,14 @@ sal_Int32 SvtViewOptions::m_nRefCount_Windows = 0 between added/changed/removed elements without any complex mask or bool flag information. Caches from configuration and our own one are synchronized every time - if we do so. *//*-*************************************************************************************************************/ -class SvtViewOptionsBase_Impl +class SvtViewOptionsBase_Impl final { public: enum State { STATE_NONE, STATE_FALSE, STATE_TRUE }; explicit SvtViewOptionsBase_Impl(const OUString& rList); - virtual ~SvtViewOptionsBase_Impl ( ); + ~SvtViewOptionsBase_Impl ( ); bool Exists ( const OUString& sName ); void Delete ( const OUString& sName ); OUString GetWindowState ( const OUString& sName ); diff --git a/vbahelper/source/msforms/vbalistcontrolhelper.hxx b/vbahelper/source/msforms/vbalistcontrolhelper.hxx index ad580f4812da..e60b52b9a133 100644 --- a/vbahelper/source/msforms/vbalistcontrolhelper.hxx +++ b/vbahelper/source/msforms/vbalistcontrolhelper.hxx @@ -22,13 +22,12 @@ #include -class ListControlHelper +class ListControlHelper final { css::uno::Reference< css::beans::XPropertySet > m_xProps; public: explicit ListControlHelper( const css::uno::Reference< css::beans::XPropertySet >& rxControl ) : m_xProps( rxControl ){} - virtual ~ListControlHelper() {} void SAL_CALL AddItem( const css::uno::Any& pvargItem, const css::uno::Any& pvargIndex ) throw (css::uno::RuntimeException); void SAL_CALL removeItem( const css::uno::Any& index ) throw (css::uno::RuntimeException); void SAL_CALL setRowSource( const OUString& _rowsource ) throw (css::uno::RuntimeException); diff --git a/vbahelper/source/vbahelper/vbaapplicationbase.cxx b/vbahelper/source/vbahelper/vbaapplicationbase.cxx index 80ef3040a93d..d505da474560 100644 --- a/vbahelper/source/vbahelper/vbaapplicationbase.cxx +++ b/vbahelper/source/vbahelper/vbaapplicationbase.cxx @@ -69,7 +69,7 @@ public: VbaTimer() {} - virtual ~VbaTimer() + ~VbaTimer() { m_aTimer.Stop(); } @@ -151,14 +151,14 @@ struct VbaTimerInfoHash typedef std::unordered_map< VbaTimerInfo, VbaTimer*, VbaTimerInfoHash > VbaTimerHashMap; // ====VbaApplicationBase_Impl================================== -struct VbaApplicationBase_Impl +struct VbaApplicationBase_Impl final { VbaTimerHashMap m_aTimerHash; bool mbVisible; inline VbaApplicationBase_Impl() : mbVisible( true ) {} - virtual ~VbaApplicationBase_Impl() + ~VbaApplicationBase_Impl() { // remove the remaining timers for ( VbaTimerHashMap::iterator aIter = m_aTimerHash.begin(); diff --git a/vbahelper/source/vbahelper/vbacommandbarhelper.cxx b/vbahelper/source/vbahelper/vbacommandbarhelper.cxx index 8bd5fb02a6b6..5c82007317ae 100644 --- a/vbahelper/source/vbahelper/vbacommandbarhelper.cxx +++ b/vbahelper/source/vbahelper/vbacommandbarhelper.cxx @@ -38,7 +38,7 @@ using namespace ooo::vba; typedef std::map< OUString, OUString > MSO2OOCommandbarMap; -class MSO2OOCommandbarHelper +class MSO2OOCommandbarHelper final { private: static MSO2OOCommandbarHelper* pMSO2OOCommandbarHelper; @@ -61,7 +61,6 @@ private: } public: - virtual ~MSO2OOCommandbarHelper() {}; static MSO2OOCommandbarHelper* getMSO2OOCommandbarHelper() { if( pMSO2OOCommandbarHelper == nullptr ) -- cgit v1.2.3