diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2012-03-14 13:27:56 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-03-14 13:32:02 +0100 |
commit | 6e67c03dc0225fc66343546b14e902b9d238b1a3 (patch) | |
tree | 6e078783d65e280a721b4e46f0ae0ca6b950f121 /comphelper | |
parent | fe4be5047988782f3143a1af505c5eecb3f2af5a (diff) |
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.
Diffstat (limited to 'comphelper')
9 files changed, 26 insertions, 2 deletions
diff --git a/comphelper/inc/comphelper/accessiblecomponenthelper.hxx b/comphelper/inc/comphelper/accessiblecomponenthelper.hxx index 582d77a99283..25e5bdd05285 100644 --- a/comphelper/inc/comphelper/accessiblecomponenthelper.hxx +++ b/comphelper/inc/comphelper/accessiblecomponenthelper.hxx @@ -77,7 +77,10 @@ namespace comphelper struct OAccessibleComponentHelper_Base : public ::cppu::ImplHelper1< ::com::sun::star::accessibility::XAccessibleComponent > - {}; + { + protected: + ~OAccessibleComponentHelper_Base() {} + }; /** a helper class for implementing an AccessibleContext which at the same time supports an XAccessibleComponent interface. diff --git a/comphelper/inc/comphelper/accessibleselectionhelper.hxx b/comphelper/inc/comphelper/accessibleselectionhelper.hxx index 972113ffb115..73b446f70cb6 100644 --- a/comphelper/inc/comphelper/accessibleselectionhelper.hxx +++ b/comphelper/inc/comphelper/accessibleselectionhelper.hxx @@ -56,6 +56,8 @@ namespace comphelper OCommonAccessibleSelection(); + ~OCommonAccessibleSelection(); + protected: // access to context - still waiting to be overwritten diff --git a/comphelper/inc/comphelper/accessiblewrapper.hxx b/comphelper/inc/comphelper/accessiblewrapper.hxx index d091f9fb458a..48aeed10c625 100644 --- a/comphelper/inc/comphelper/accessiblewrapper.hxx +++ b/comphelper/inc/comphelper/accessiblewrapper.hxx @@ -61,7 +61,10 @@ namespace comphelper struct OAccessibleWrapper_Base : public ::cppu::ImplHelper1 < ::com::sun::star::accessibility::XAccessible > - {}; + { + protected: + ~OAccessibleWrapper_Base() {} + }; /** a class which aggregates a proxy for an XAccessible, and wrapping the context returned by this XAccessible. diff --git a/comphelper/inc/comphelper/asyncnotification.hxx b/comphelper/inc/comphelper/asyncnotification.hxx index 0ca35a3bf2a5..eca91a169e5c 100644 --- a/comphelper/inc/comphelper/asyncnotification.hxx +++ b/comphelper/inc/comphelper/asyncnotification.hxx @@ -87,6 +87,9 @@ namespace comphelper virtual void SAL_CALL acquire() = 0; virtual void SAL_CALL release() = 0; + + protected: + ~IEventProcessor() {} }; //==================================================================== diff --git a/comphelper/inc/comphelper/componentbase.hxx b/comphelper/inc/comphelper/componentbase.hxx index db3e558904b9..7c82ea371a96 100644 --- a/comphelper/inc/comphelper/componentbase.hxx +++ b/comphelper/inc/comphelper/componentbase.hxx @@ -71,6 +71,8 @@ namespace comphelper { } + ~ComponentBase() {} + /** marks the instance as initialized Subsequent instantiations of a ComponentMethodGuard won't throw the NotInitializedException now. diff --git a/comphelper/inc/comphelper/embeddedobjectcontainer.hxx b/comphelper/inc/comphelper/embeddedobjectcontainer.hxx index 8d1aab98ed24..d58d288f3360 100644 --- a/comphelper/inc/comphelper/embeddedobjectcontainer.hxx +++ b/comphelper/inc/comphelper/embeddedobjectcontainer.hxx @@ -52,6 +52,9 @@ namespace comphelper virtual com::sun::star::uno::Reference < com::sun::star::embed::XStorage > getStorage() const = 0; virtual ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler > getInteractionHandler() const = 0; virtual bool isEnableSetModified() const = 0; + + protected: + ~IEmbeddedHelper() {} }; struct EmbedImpl; diff --git a/comphelper/inc/comphelper/propagg.hxx b/comphelper/inc/comphelper/propagg.hxx index 6286e9d79088..b6b2df61f221 100644 --- a/comphelper/inc/comphelper/propagg.hxx +++ b/comphelper/inc/comphelper/propagg.hxx @@ -83,6 +83,9 @@ public: preferences for the given property */ virtual sal_Int32 getPreferedPropertyId(const ::rtl::OUString& _rName) = 0; + +protected: + ~IPropertyInfoService() {} }; /** diff --git a/comphelper/inc/comphelper/serviceinfohelper.hxx b/comphelper/inc/comphelper/serviceinfohelper.hxx index e742c938cb4e..39c95ee4f558 100644 --- a/comphelper/inc/comphelper/serviceinfohelper.hxx +++ b/comphelper/inc/comphelper/serviceinfohelper.hxx @@ -51,6 +51,9 @@ public: // helper static void addToSequence( ::com::sun::star::uno::Sequence< ::rtl::OUString >& rSeq, sal_uInt16 nServices, /* sal_Char* */... ) throw(); static sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& SupportedServices ) throw(); + +protected: + ~ServiceInfoHelper() {} }; } diff --git a/comphelper/source/misc/accessibleselectionhelper.cxx b/comphelper/source/misc/accessibleselectionhelper.cxx index 44fb4cb7bdb3..4b77e4fa809f 100644 --- a/comphelper/source/misc/accessibleselectionhelper.cxx +++ b/comphelper/source/misc/accessibleselectionhelper.cxx @@ -46,6 +46,8 @@ namespace comphelper { } + OCommonAccessibleSelection::~OCommonAccessibleSelection() {} + //-------------------------------------------------------------------- void SAL_CALL OCommonAccessibleSelection::selectAccessibleChild( sal_Int32 nChildIndex ) throw (IndexOutOfBoundsException, RuntimeException) { |