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. --- xmloff/inc/xmloff/XMLSettingsExportContext.hxx | 2 ++ xmloff/inc/xmloff/settingsstore.hxx | 3 +++ xmloff/source/forms/callbacks.hxx | 9 +++++++++ 3 files changed, 14 insertions(+) (limited to 'xmloff') diff --git a/xmloff/inc/xmloff/XMLSettingsExportContext.hxx b/xmloff/inc/xmloff/XMLSettingsExportContext.hxx index aea52317e90a..b3be0276e780 100644 --- a/xmloff/inc/xmloff/XMLSettingsExportContext.hxx +++ b/xmloff/inc/xmloff/XMLSettingsExportContext.hxx @@ -58,6 +58,8 @@ namespace xmloff virtual ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > GetServiceFactory() const = 0; + protected: + ~XMLSettingsExportContext() {} }; //........................................................................ diff --git a/xmloff/inc/xmloff/settingsstore.hxx b/xmloff/inc/xmloff/settingsstore.hxx index af9ac084d20f..b9f5f04c45bd 100644 --- a/xmloff/inc/xmloff/settingsstore.hxx +++ b/xmloff/inc/xmloff/settingsstore.hxx @@ -49,6 +49,9 @@ public: filterStreamsToStorage( const com::sun::star::uno::Reference< com::sun::star::embed::XStorage > &xStorage, const com::sun::star::uno::Sequence& aConfigProps ) = 0; + +protected: + ~DocumentSettingsSerializer() {} }; #endif // _XMLOFF_SETTINGS_STORE_HXX diff --git a/xmloff/source/forms/callbacks.hxx b/xmloff/source/forms/callbacks.hxx index 4bf0f7de2690..ed3818aafbae 100644 --- a/xmloff/source/forms/callbacks.hxx +++ b/xmloff/source/forms/callbacks.hxx @@ -63,6 +63,9 @@ namespace xmloff virtual ::rtl::OUString getObjectStyleName( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxObject ) = 0; + + protected: + ~IFormsExportContext() {} }; //===================================================================== @@ -75,6 +78,9 @@ namespace xmloff const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxElement, const ::com::sun::star::uno::Sequence< ::com::sun::star::script::ScriptEventDescriptor >& _rEvents ) = 0; + + protected: + ~IEventAttacherManager() {} }; //===================================================================== @@ -86,6 +92,9 @@ namespace xmloff virtual void registerEvents( const ::com::sun::star::uno::Sequence< ::com::sun::star::script::ScriptEventDescriptor >& _rEvents ) = 0; + + protected: + ~IEventAttacher() {} }; //......................................................................... -- cgit