diff options
author | Noel Grandin <noel@peralex.com> | 2015-01-20 12:38:10 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-01-26 08:42:28 +0200 |
commit | b44cbb26efe1d0b0950b1e1613e131b506dc3876 (patch) | |
tree | 9b4d5d99e5dad0971079b997a02a6d96536709ca /sw/source/core | |
parent | 26ad60aec69310fecd918f1c2e09056aa4782320 (diff) |
new loplugin: change virtual methods to non-virtual
Where we can prove that the virtual method is never overriden.
In the case of pure-virtual methods, we remove the method entirely.
Sometimes this leads to entire methods and fields being
eliminated.
Change-Id: I138ef81c95f115dbd8c023a83cfc7e9d5d6d14ae
Diffstat (limited to 'sw/source/core')
-rw-r--r-- | sw/source/core/access/acccontext.hxx | 4 | ||||
-rw-r--r-- | sw/source/core/access/accdoc.hxx | 4 | ||||
-rw-r--r-- | sw/source/core/inc/MarkManager.hxx | 2 | ||||
-rw-r--r-- | sw/source/core/inc/SwXMLTextBlocks.hxx | 6 | ||||
-rw-r--r-- | sw/source/core/inc/bookmrk.hxx | 6 | ||||
-rw-r--r-- | sw/source/core/inc/frame.hxx | 2 | ||||
-rw-r--r-- | sw/source/core/inc/observablethread.hxx | 2 | ||||
-rw-r--r-- | sw/source/core/inc/unometa.hxx | 2 | ||||
-rw-r--r-- | sw/source/core/inc/unoport.hxx | 10 | ||||
-rw-r--r-- | sw/source/core/undo/unins.cxx | 4 |
10 files changed, 21 insertions, 21 deletions
diff --git a/sw/source/core/access/acccontext.hxx b/sw/source/core/access/acccontext.hxx index dcc8c4c23689..8d7ae18633b2 100644 --- a/sw/source/core/access/acccontext.hxx +++ b/sw/source/core/access/acccontext.hxx @@ -183,7 +183,7 @@ protected: bool IsEditableState(); - virtual ::com::sun::star::awt::Rectangle SAL_CALL + ::com::sun::star::awt::Rectangle SAL_CALL getBoundsImpl(bool bRelative) throw (css::uno::RuntimeException, std::exception); @@ -297,7 +297,7 @@ public: virtual void SAL_CALL grabFocus() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; - virtual ::com::sun::star::uno::Any SAL_CALL getAccessibleKeyBinding() + ::com::sun::star::uno::Any SAL_CALL getAccessibleKeyBinding() throw (::com::sun::star::uno::RuntimeException); virtual sal_Int32 SAL_CALL getForeground() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; diff --git a/sw/source/core/access/accdoc.hxx b/sw/source/core/access/accdoc.hxx index 8333c559be3d..7f630af8355e 100644 --- a/sw/source/core/access/accdoc.hxx +++ b/sw/source/core/access/accdoc.hxx @@ -48,8 +48,8 @@ public: void SetVisArea(); - virtual void AddChild( vcl::Window *pWin, bool bFireEvent = true ); - virtual void RemoveChild( vcl::Window *pWin ); + void AddChild( vcl::Window *pWin, bool bFireEvent = true ); + void RemoveChild( vcl::Window *pWin ); // XAccessibleContext diff --git a/sw/source/core/inc/MarkManager.hxx b/sw/source/core/inc/MarkManager.hxx index 87a4c5031d67..636389da14f3 100644 --- a/sw/source/core/inc/MarkManager.hxx +++ b/sw/source/core/inc/MarkManager.hxx @@ -68,7 +68,7 @@ namespace sw { virtual const_iterator_t getAllMarksEnd() const SAL_OVERRIDE; virtual sal_Int32 getAllMarksCount() const SAL_OVERRIDE; virtual const_iterator_t findMark(const OUString& rName) const SAL_OVERRIDE; - virtual bool hasMark(const OUString& rName) const; + bool hasMark(const OUString& rName) const; // bookmarks virtual const_iterator_t getBookmarksBegin() const SAL_OVERRIDE; diff --git a/sw/source/core/inc/SwXMLTextBlocks.hxx b/sw/source/core/inc/SwXMLTextBlocks.hxx index 4c0e16c6cfcc..b6f21ee293be 100644 --- a/sw/source/core/inc/SwXMLTextBlocks.hxx +++ b/sw/source/core/inc/SwXMLTextBlocks.hxx @@ -77,9 +77,9 @@ public: sal_uLong GetText( const OUString& rShort, OUString& ); virtual bool IsOnlyTextBlock( const OUString& rShort ) const SAL_OVERRIDE; - virtual bool IsOnlyTextBlock( sal_uInt16 nIdx ) const; - virtual void SetIsTextOnly( const OUString& rShort, bool bNewValue ); - virtual void SetIsTextOnly( sal_uInt16 nIdx, bool bNewValue ); + bool IsOnlyTextBlock( sal_uInt16 nIdx ) const; + void SetIsTextOnly( const OUString& rShort, bool bNewValue ); + void SetIsTextOnly( sal_uInt16 nIdx, bool bNewValue ); virtual sal_uLong GetMacroTable( sal_uInt16, SvxMacroTableDtor& rMacroTbl, bool bFileAlreadyOpen = false ) SAL_OVERRIDE; diff --git a/sw/source/core/inc/bookmrk.hxx b/sw/source/core/inc/bookmrk.hxx index d5bc95c9af24..f2891f4defab 100644 --- a/sw/source/core/inc/bookmrk.hxx +++ b/sw/source/core/inc/bookmrk.hxx @@ -80,7 +80,7 @@ namespace sw { virtual bool IsExpanded() const SAL_OVERRIDE { return static_cast< bool >(m_pPos2); } - virtual void SetName(const OUString& rName) + void SetName(const OUString& rName) { m_aName = rName; } virtual void SetMarkPos(const SwPosition& rNewPos); virtual void SetOtherMarkPos(const SwPosition& rNewPos); @@ -89,7 +89,7 @@ namespace sw { virtual OUString ToString( ) const SAL_OVERRIDE; - virtual void Swap() + void Swap() { if(m_pPos2) m_pPos1.swap(m_pPos2); @@ -252,7 +252,7 @@ namespace sw { bool IsChecked() const SAL_OVERRIDE; void SetChecked(bool checked) SAL_OVERRIDE; - virtual OUString toString( ) const; + OUString toString( ) const; }; } } diff --git a/sw/source/core/inc/frame.hxx b/sw/source/core/inc/frame.hxx index 0df443475a72..f103eca4db66 100644 --- a/sw/source/core/inc/frame.hxx +++ b/sw/source/core/inc/frame.hxx @@ -862,7 +862,7 @@ public: public: // if writer is NULL, dumps the layout structure as XML in layout.xml virtual void dumpAsXml(xmlTextWriterPtr writer = NULL) const; - virtual void dumpInfosAsXml(xmlTextWriterPtr writer) const; + void dumpInfosAsXml(xmlTextWriterPtr writer) const; virtual void dumpAsXmlAttributes(xmlTextWriterPtr writer) const; void dumpChildrenAsXml(xmlTextWriterPtr writer) const; bool IsCollapse() const; diff --git a/sw/source/core/inc/observablethread.hxx b/sw/source/core/inc/observablethread.hxx index 13b4527f5d74..aa589ff1ac94 100644 --- a/sw/source/core/inc/observablethread.hxx +++ b/sw/source/core/inc/observablethread.hxx @@ -78,7 +78,7 @@ class ObservableThread : public osl::Thread, */ virtual void SAL_CALL onTerminated() SAL_OVERRIDE; - virtual void threadFinished(); + void threadFinished(); private: diff --git a/sw/source/core/inc/unometa.hxx b/sw/source/core/inc/unometa.hxx index 6d041dcbb4ca..e292b3bb0e0e 100644 --- a/sw/source/core/inc/unometa.hxx +++ b/sw/source/core/inc/unometa.hxx @@ -71,7 +71,7 @@ protected: ::sw::UnoImplPtr<Impl> m_pImpl; - virtual void SAL_CALL AttachImpl( + void SAL_CALL AttachImpl( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange, const sal_uInt16 nWhich) diff --git a/sw/source/core/inc/unoport.hxx b/sw/source/core/inc/unoport.hxx index d48156f3cc02..6b32e2dd0e7c 100644 --- a/sw/source/core/inc/unoport.hxx +++ b/sw/source/core/inc/unoport.hxx @@ -198,13 +198,13 @@ public: virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault( const OUString& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; //XTextContent - virtual void SAL_CALL attach(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getAnchor( ) throw(::com::sun::star::uno::RuntimeException); + void SAL_CALL attach(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException ); + ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getAnchor( ) throw(::com::sun::star::uno::RuntimeException); //XComponent - virtual void SAL_CALL dispose() throw( ::com::sun::star::uno::RuntimeException ); - virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException ); - virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException ); + void SAL_CALL dispose() throw( ::com::sun::star::uno::RuntimeException ); + void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException ); + void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException ); //XUnoTunnel static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId(); diff --git a/sw/source/core/undo/unins.cxx b/sw/source/core/undo/unins.cxx index 4025583d9a61..51d540fb34d8 100644 --- a/sw/source/core/undo/unins.cxx +++ b/sw/source/core/undo/unins.cxx @@ -501,8 +501,8 @@ public: { } - virtual void UndoImpl( ::sw::UndoRedoContext & ); - virtual void RedoImpl( ::sw::UndoRedoContext & ); + void UndoImpl( ::sw::UndoRedoContext & ); + void RedoImpl( ::sw::UndoRedoContext & ); void SetEnd(SwPaM const& rPam); |