From 6e67c03dc0225fc66343546b14e902b9d238b1a3 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Wed, 14 Mar 2012 13:27:56 +0100 Subject: Enable -Wnon-virtual-dtor for GCC 4.6 ...which has the necessary features to support it. Change a lot of classes to either contain a protected non-virtual dtor (which is backwards compatible, so even works for cppumaker-generated UNO headers) or a public virtual one. cppuhelper/propertysetmixin.hxx still needs to disable the warning, as the relevant class has a non-virtual dtor but friends, which would still cause GCC to warn. Includes a patch for libcmis, intended to be upstreamed. --- extensions/source/propctrlr/browserline.hxx | 3 +++ extensions/source/propctrlr/browserlistbox.hxx | 3 +++ extensions/source/propctrlr/commoncontrol.hxx | 3 +++ extensions/source/propctrlr/composeduiupdate.hxx | 3 +++ extensions/source/propctrlr/propcontrolobserver.hxx | 3 +++ extensions/source/propctrlr/proplinelistener.hxx | 3 +++ extensions/source/update/check/actionlistener.hxx | 3 +++ extensions/source/update/check/download.hxx | 3 +++ extensions/source/update/check/updatecheckconfig.hxx | 3 +++ extensions/source/update/check/updatecheckconfiglistener.hxx | 3 +++ 10 files changed, 30 insertions(+) (limited to 'extensions') diff --git a/extensions/source/propctrlr/browserline.hxx b/extensions/source/propctrlr/browserline.hxx index 0f0b2f30a81a..be88c81b3b01 100644 --- a/extensions/source/propctrlr/browserline.hxx +++ b/extensions/source/propctrlr/browserline.hxx @@ -52,6 +52,9 @@ namespace pcr { public: virtual void buttonClicked( OBrowserLine* _pLine, sal_Bool _bPrimary ) = 0; + + protected: + ~IButtonClickListener() {} }; //======================================================================== diff --git a/extensions/source/propctrlr/browserlistbox.hxx b/extensions/source/propctrlr/browserlistbox.hxx index c5c46ef4898a..a2f0ea8545b5 100644 --- a/extensions/source/propctrlr/browserlistbox.hxx +++ b/extensions/source/propctrlr/browserlistbox.hxx @@ -90,6 +90,9 @@ namespace pcr virtual void SAL_CALL focusGained( const ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XPropertyControl >& Control ) throw (::com::sun::star::uno::RuntimeException) = 0; virtual void SAL_CALL valueChanged( const ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XPropertyControl >& Control ) throw (::com::sun::star::uno::RuntimeException) = 0; virtual void SAL_CALL activateNextControl( const ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XPropertyControl >& CurrentControl ) throw (::com::sun::star::uno::RuntimeException) = 0; + + protected: + ~IControlContext() {} }; //======================================================================== diff --git a/extensions/source/propctrlr/commoncontrol.hxx b/extensions/source/propctrlr/commoncontrol.hxx index a38f0e027255..5be4d409613b 100644 --- a/extensions/source/propctrlr/commoncontrol.hxx +++ b/extensions/source/propctrlr/commoncontrol.hxx @@ -79,6 +79,9 @@ namespace pcr { public: virtual void modified() = 0; + + protected: + ~IModifyListener() {} }; //======================================================================== diff --git a/extensions/source/propctrlr/composeduiupdate.hxx b/extensions/source/propctrlr/composeduiupdate.hxx index 0ee9a98eeaf7..1a9617cf6948 100644 --- a/extensions/source/propctrlr/composeduiupdate.hxx +++ b/extensions/source/propctrlr/composeduiupdate.hxx @@ -56,6 +56,9 @@ namespace pcr { public: virtual ::sal_Bool SAL_CALL hasPropertyByName( const ::rtl::OUString& _rName ) throw (::com::sun::star::uno::RuntimeException) = 0; + + protected: + ~IPropertyExistenceCheck() {} }; //==================================================================== diff --git a/extensions/source/propctrlr/propcontrolobserver.hxx b/extensions/source/propctrlr/propcontrolobserver.hxx index d1d48ab8b80a..c42aa438b32f 100644 --- a/extensions/source/propctrlr/propcontrolobserver.hxx +++ b/extensions/source/propctrlr/propcontrolobserver.hxx @@ -47,6 +47,9 @@ namespace pcr public: virtual void focusGained( const ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XPropertyControl >& _Control ) = 0; virtual void valueChanged( const ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XPropertyControl >& _Control ) = 0; + + protected: + ~IPropertyControlObserver() {} }; //........................................................................ diff --git a/extensions/source/propctrlr/proplinelistener.hxx b/extensions/source/propctrlr/proplinelistener.hxx index 4d72352cbc5b..6f116b195ab4 100644 --- a/extensions/source/propctrlr/proplinelistener.hxx +++ b/extensions/source/propctrlr/proplinelistener.hxx @@ -42,6 +42,9 @@ namespace pcr public: virtual void Clicked( const ::rtl::OUString& _rName, sal_Bool _bPrimary ) = 0; virtual void Commit( const ::rtl::OUString& _rName, const ::com::sun::star::uno::Any& _rVal ) = 0; + + protected: + ~IPropertyLineListener() {} }; //............................................................................ diff --git a/extensions/source/update/check/actionlistener.hxx b/extensions/source/update/check/actionlistener.hxx index a1c4571900bf..c4f16c695115 100644 --- a/extensions/source/update/check/actionlistener.hxx +++ b/extensions/source/update/check/actionlistener.hxx @@ -41,6 +41,9 @@ class IActionListener : public rtl::IReference virtual void pause() = 0; virtual void resume() = 0; virtual void closeAfterFailure() = 0; + +protected: + ~IActionListener() {} }; #endif //INCLUDED_ACTION_LISTENER_HXX diff --git a/extensions/source/update/check/download.hxx b/extensions/source/update/check/download.hxx index 00106660b4af..afa7c1468624 100644 --- a/extensions/source/update/check/download.hxx +++ b/extensions/source/update/check/download.hxx @@ -52,6 +52,9 @@ struct DownloadInteractionHandler : public rtl::IReference // called when download has been finished virtual void downloadFinished(const rtl::OUString& rFileName) = 0; + +protected: + ~DownloadInteractionHandler() {} }; diff --git a/extensions/source/update/check/updatecheckconfig.hxx b/extensions/source/update/check/updatecheckconfig.hxx index 255b717c0372..743130d011fd 100644 --- a/extensions/source/update/check/updatecheckconfig.hxx +++ b/extensions/source/update/check/updatecheckconfig.hxx @@ -41,6 +41,9 @@ struct IByNameAccess { virtual ::com::sun::star::uno::Any getValue(const sal_Char * pName) = 0; + +protected: + ~IByNameAccess() {} }; /* This helper class provides by name access to a sequence of named values */ diff --git a/extensions/source/update/check/updatecheckconfiglistener.hxx b/extensions/source/update/check/updatecheckconfiglistener.hxx index fc7ee7926252..849919f35267 100644 --- a/extensions/source/update/check/updatecheckconfiglistener.hxx +++ b/extensions/source/update/check/updatecheckconfiglistener.hxx @@ -39,6 +39,9 @@ struct UpdateCheckConfigListener : public rtl::IReference { virtual void autoCheckStatusChanged(bool enabled) = 0; virtual void autoCheckIntervalChanged() = 0; + +protected: + ~UpdateCheckConfigListener() {} }; #endif -- cgit v1.2.3