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 /vcl | |
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 'vcl')
-rw-r--r-- | vcl/headless/svpframe.cxx | 1 | ||||
-rw-r--r-- | vcl/inc/textlayout.hxx | 3 | ||||
-rw-r--r-- | vcl/inc/vcl/ImageListProvider.hxx | 3 | ||||
-rw-r--r-- | vcl/inc/vcl/apptypes.hxx | 2 | ||||
-rw-r--r-- | vcl/inc/vcl/fontmanager.hxx | 3 | ||||
-rw-r--r-- | vcl/inc/vcl/mnemonicengine.hxx | 3 | ||||
-rw-r--r-- | vcl/inc/vcl/quickselectionengine.hxx | 3 | ||||
-rw-r--r-- | vcl/inc/vcl/svapp.hxx | 3 | ||||
-rw-r--r-- | vcl/inc/vcl/unowrap.hxx | 3 | ||||
-rw-r--r-- | vcl/inc/vcl/vclevent.hxx | 3 | ||||
-rw-r--r-- | vcl/unx/generic/dtrans/X11_selection.hxx | 3 | ||||
-rw-r--r-- | vcl/unx/gtk/window/gtkframe.cxx | 3 |
12 files changed, 32 insertions, 1 deletions
diff --git a/vcl/headless/svpframe.cxx b/vcl/headless/svpframe.cxx index 45c9dadcd61a..fcaed35df461 100644 --- a/vcl/headless/svpframe.cxx +++ b/vcl/headless/svpframe.cxx @@ -45,6 +45,7 @@ namespace { struct DamageTracker : public basebmp::IBitmapDeviceDamageTracker { DamageTracker( SvpSalFrame& rFrame ) : m_rFrame( rFrame ) {} + virtual ~DamageTracker() {} virtual void damaged( const basegfx::B2IBox& rDamageRect ) const { m_rFrame.damaged( rDamageRect ); diff --git a/vcl/inc/textlayout.hxx b/vcl/inc/textlayout.hxx index 5902573f8746..12278b5b93a2 100644 --- a/vcl/inc/textlayout.hxx +++ b/vcl/inc/textlayout.hxx @@ -55,6 +55,9 @@ namespace vcl virtual bool GetCaretPositions( const XubString& _rText, sal_Int32* _pCaretXArray, xub_StrLen _nStartIndex, xub_StrLen _nLength ) const = 0; virtual xub_StrLen GetTextBreak( const XubString& _rText, long _nMaxTextWidth, xub_StrLen _nStartIndex, xub_StrLen _nLength ) const = 0; virtual bool DecomposeTextRectAction() const = 0; + + protected: + ~ITextLayout() {} }; //==================================================================== diff --git a/vcl/inc/vcl/ImageListProvider.hxx b/vcl/inc/vcl/ImageListProvider.hxx index 7fc678b485fd..8f769a4c5192 100644 --- a/vcl/inc/vcl/ImageListProvider.hxx +++ b/vcl/inc/vcl/ImageListProvider.hxx @@ -49,6 +49,9 @@ namespace vcl { public: virtual ImageList getImageList(ImageListType) SAL_THROW (( com::sun::star::lang::IllegalArgumentException )) = 0; + + protected: + ~IImageListProvider() {} }; } /* vcl */ diff --git a/vcl/inc/vcl/apptypes.hxx b/vcl/inc/vcl/apptypes.hxx index e9f3dd711edf..12969bef4d02 100644 --- a/vcl/inc/vcl/apptypes.hxx +++ b/vcl/inc/vcl/apptypes.hxx @@ -51,7 +51,7 @@ class VCL_DLLPUBLIC ApplicationProperty { public: - + virtual ~ApplicationProperty() {} TYPEINFO(); }; diff --git a/vcl/inc/vcl/fontmanager.hxx b/vcl/inc/vcl/fontmanager.hxx index 78481e477818..0760e3069432 100644 --- a/vcl/inc/vcl/fontmanager.hxx +++ b/vcl/inc/vcl/fontmanager.hxx @@ -544,6 +544,9 @@ public: virtual bool queryOverwriteFile( const rtl::OUString& rFile ) = 0; virtual void importFontFailed( const rtl::OUString& rFile, FailCondition ) = 0; virtual bool isCanceled() = 0; + + protected: + ~ImportFontCallback() {} }; /* system dependendent font matching diff --git a/vcl/inc/vcl/mnemonicengine.hxx b/vcl/inc/vcl/mnemonicengine.hxx index 79f6856cb704..b827ec0a8dd9 100644 --- a/vcl/inc/vcl/mnemonicengine.hxx +++ b/vcl/inc/vcl/mnemonicengine.hxx @@ -119,6 +119,9 @@ namespace vcl to <member>FirstSearchEntry</member> or <member>NextSearchEntry</member>. */ virtual void ExecuteSearchEntry( const void* _pEntry ) const = 0; + + protected: + ~IMnemonicEntryList() {} }; //==================================================================== diff --git a/vcl/inc/vcl/quickselectionengine.hxx b/vcl/inc/vcl/quickselectionengine.hxx index d3dc157d2c6c..c5c9669e6a38 100644 --- a/vcl/inc/vcl/quickselectionengine.hxx +++ b/vcl/inc/vcl/quickselectionengine.hxx @@ -65,6 +65,9 @@ namespace vcl /** selects a given entry */ virtual void SelectEntry( StringEntryIdentifier _entry ) = 0; + + protected: + ~ISearchableStringList() {} }; //==================================================================== diff --git a/vcl/inc/vcl/svapp.hxx b/vcl/inc/vcl/svapp.hxx index 2c26c55e33d7..8d2818ed10db 100644 --- a/vcl/inc/vcl/svapp.hxx +++ b/vcl/inc/vcl/svapp.hxx @@ -135,6 +135,9 @@ class VCL_DLLPUBLIC PropertyHandler { public: virtual void Property( ApplicationProperty& ) = 0; + +protected: + ~PropertyHandler() {} }; // --------------- diff --git a/vcl/inc/vcl/unowrap.hxx b/vcl/inc/vcl/unowrap.hxx index 3691014d7477..e51794501b40 100644 --- a/vcl/inc/vcl/unowrap.hxx +++ b/vcl/inc/vcl/unowrap.hxx @@ -87,6 +87,9 @@ public: // Accessibility virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible( Menu* pMenu, sal_Bool bIsMenuBar ) = 0; + +protected: + ~UnoWrapperBase() {} }; #endif // _VCL_UNOWRAP_HXX diff --git a/vcl/inc/vcl/vclevent.hxx b/vcl/inc/vcl/vclevent.hxx index 51c5591f09f7..002391b45458 100644 --- a/vcl/inc/vcl/vclevent.hxx +++ b/vcl/inc/vcl/vclevent.hxx @@ -201,6 +201,7 @@ private: public: VclSimpleEvent( sal_uLong n ) { nId = n; } + virtual ~VclSimpleEvent() {} TYPEINFO(); sal_uLong GetId() const { return nId; } @@ -214,6 +215,7 @@ private: public: VclWindowEvent( Window* pWin, sal_uLong n, void* pDat = NULL ) : VclSimpleEvent(n) { pWindow = pWin; pData = pDat; } + virtual ~VclWindowEvent() {} TYPEINFO(); Window* GetWindow() const { return pWindow; } @@ -242,6 +244,7 @@ private: public: VclMenuEvent( Menu* pM, sal_uLong n, sal_uInt16 nPos ) : VclSimpleEvent(n) { pMenu = pM; mnPos = nPos; } + virtual ~VclMenuEvent() {} TYPEINFO(); Menu* GetMenu() const { return pMenu; } diff --git a/vcl/unx/generic/dtrans/X11_selection.hxx b/vcl/unx/generic/dtrans/X11_selection.hxx index ad02ca36c2c1..fef676254eba 100644 --- a/vcl/unx/generic/dtrans/X11_selection.hxx +++ b/vcl/unx/generic/dtrans/X11_selection.hxx @@ -71,6 +71,9 @@ namespace x11 { virtual com::sun::star::uno::Reference< XInterface > getReference() = 0; // returns a reference that will keep the SelectionAdaptor alive until the // refernce is released + + protected: + ~SelectionAdaptor() {} }; class DropTarget : diff --git a/vcl/unx/gtk/window/gtkframe.cxx b/vcl/unx/gtk/window/gtkframe.cxx index 3c3a757139a4..4137a8d56dd7 100644 --- a/vcl/unx/gtk/window/gtkframe.cxx +++ b/vcl/unx/gtk/window/gtkframe.cxx @@ -351,6 +351,9 @@ struct DamageTracker : public basebmp::IBitmapDeviceDamageTracker { DamageTracker(GtkSalFrame& rFrame) : m_rFrame(rFrame) {} + + virtual ~DamageTracker() {} + virtual void damaged(const basegfx::B2IBox& rDamageRect) const { m_rFrame.damaged(rDamageRect); |