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 /sfx2 | |
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 'sfx2')
-rw-r--r-- | sfx2/inc/sfx2/docmacromode.hxx | 3 | ||||
-rw-r--r-- | sfx2/inc/sfx2/docstoragemodifylistener.hxx | 3 | ||||
-rw-r--r-- | sfx2/inc/sfx2/itemwrapper.hxx | 6 | ||||
-rw-r--r-- | sfx2/inc/sfx2/sfxstatuslistener.hxx | 3 | ||||
-rw-r--r-- | sfx2/inc/sfx2/taskpane.hxx | 6 | ||||
-rw-r--r-- | sfx2/inc/sfx2/templdlg.hxx | 3 | ||||
-rw-r--r-- | sfx2/source/doc/docundomanager.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/inc/templdgi.hxx | 1 |
8 files changed, 27 insertions, 0 deletions
diff --git a/sfx2/inc/sfx2/docmacromode.hxx b/sfx2/inc/sfx2/docmacromode.hxx index 48b58b4ecd9b..a9f2a9dfeeed 100644 --- a/sfx2/inc/sfx2/docmacromode.hxx +++ b/sfx2/inc/sfx2/docmacromode.hxx @@ -192,6 +192,9 @@ namespace sfx2 showBrokenSignatureWarning( const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& _rxInteraction ) const = 0; + + protected: + ~IMacroDocumentAccess() {} }; //==================================================================== diff --git a/sfx2/inc/sfx2/docstoragemodifylistener.hxx b/sfx2/inc/sfx2/docstoragemodifylistener.hxx index b6ac0da8becb..3bf32be455cb 100644 --- a/sfx2/inc/sfx2/docstoragemodifylistener.hxx +++ b/sfx2/inc/sfx2/docstoragemodifylistener.hxx @@ -53,6 +53,9 @@ namespace sfx2 public: /// indicates the root or a sub storage of the document has been modified virtual void storageIsModified() = 0; + + protected: + ~IModifiableDocument() {} }; //==================================================================== diff --git a/sfx2/inc/sfx2/itemwrapper.hxx b/sfx2/inc/sfx2/itemwrapper.hxx index 55d7c9b2a4d3..b440b7cf90b8 100644 --- a/sfx2/inc/sfx2/itemwrapper.hxx +++ b/sfx2/inc/sfx2/itemwrapper.hxx @@ -105,6 +105,8 @@ public: inline explicit SingleItemWrapper( sal_uInt16 nSlot ) : mnSlot( nSlot ) {} + virtual ~SingleItemWrapper() {} + /** Returns the SID this wrapper works on. */ inline sal_uInt16 GetSlotId() const { return mnSlot; } @@ -146,6 +148,8 @@ public: inline explicit ValueItemWrapper( sal_uInt16 nSlot ) : SingleItemWrapper< ItemT, ValueT >( nSlot ) {} + virtual ~ValueItemWrapper() {} + virtual ValueT GetItemValue( const ItemT& rItem ) const { return static_cast< ValueT >( rItem.GetValue() ); } virtual void SetItemValue( ItemT& rItem, ValueT aValue ) const @@ -171,6 +175,8 @@ public: inline explicit IdentItemWrapper( sal_uInt16 nSlot ) : SingleItemWrapper< ItemT, const ItemT& >( nSlot ) {} + virtual ~IdentItemWrapper() {} + virtual const ItemT& GetItemValue( const ItemT& rItem ) const { return rItem; } virtual void SetItemValue( ItemT& rItem, const ItemT& rValue ) const diff --git a/sfx2/inc/sfx2/sfxstatuslistener.hxx b/sfx2/inc/sfx2/sfxstatuslistener.hxx index 2fa370e717b7..e2ff595e80d8 100644 --- a/sfx2/inc/sfx2/sfxstatuslistener.hxx +++ b/sfx2/inc/sfx2/sfxstatuslistener.hxx @@ -46,6 +46,9 @@ class SfxStatusListenerInterface { public: virtual void StateChanged( sal_uInt16 nSlotId, SfxItemState eState, const SfxPoolItem* pState ) = 0; + + protected: + ~SfxStatusListenerInterface() {} }; class SFX2_DLLPUBLIC SfxStatusListener : diff --git a/sfx2/inc/sfx2/taskpane.hxx b/sfx2/inc/sfx2/taskpane.hxx index fe0f2bb788c7..ca3edb5de682 100644 --- a/sfx2/inc/sfx2/taskpane.hxx +++ b/sfx2/inc/sfx2/taskpane.hxx @@ -55,6 +55,9 @@ namespace sfx2 { public: virtual void ActivateToolPanel( const ::rtl::OUString& i_rPanelURL ) = 0; + + protected: + ~ITaskPaneToolPanelAccess() {} }; //================================================================================================================== @@ -95,6 +98,9 @@ namespace sfx2 const ::rtl::OUString& i_rLHS, const ::rtl::OUString& i_rRHS ) const = 0; + + protected: + ~IToolPanelCompare() {} }; //================================================================================================================== diff --git a/sfx2/inc/sfx2/templdlg.hxx b/sfx2/inc/sfx2/templdlg.hxx index e235e760698c..02132266e6d3 100644 --- a/sfx2/inc/sfx2/templdlg.hxx +++ b/sfx2/inc/sfx2/templdlg.hxx @@ -47,6 +47,9 @@ class ISfxTemplateCommon public: virtual SfxStyleFamily GetActualFamily() const = 0; virtual String GetSelectedEntry() const = 0; + +protected: + ~ISfxTemplateCommon() {} }; // class SfxTemplateDialog ----------------------------------------------- diff --git a/sfx2/source/doc/docundomanager.cxx b/sfx2/source/doc/docundomanager.cxx index a51f8071a845..6c3948163e4c 100644 --- a/sfx2/source/doc/docundomanager.cxx +++ b/sfx2/source/doc/docundomanager.cxx @@ -184,6 +184,8 @@ namespace sfx2 { } + virtual ~SolarMutexFacade() {} + virtual void acquire() { Application::GetSolarMutex().acquire(); diff --git a/sfx2/source/inc/templdgi.hxx b/sfx2/source/inc/templdgi.hxx index ea05d074b4cd..895e0af68a27 100644 --- a/sfx2/source/inc/templdgi.hxx +++ b/sfx2/source/inc/templdgi.hxx @@ -111,6 +111,7 @@ private: SfxCommonTemplateDialog_Impl* pDialog; public: ISfxTemplateCommon_Impl( SfxCommonTemplateDialog_Impl* pDialogP ) : pDialog( pDialogP ) {} + virtual ~ISfxTemplateCommon_Impl() {} virtual SfxStyleFamily GetActualFamily() const { return pDialog->GetActualFamily(); } virtual String GetSelectedEntry() const { return pDialog->GetSelectedEntry(); } }; |