diff options
author | Noel Grandin <noel@peralex.com> | 2015-01-12 11:38:12 +0200 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2015-04-09 20:17:25 +0100 |
commit | 1f59e2cec3f4a22d612ca6cff06930c3d4bb77ca (patch) | |
tree | 22fb02505caea2c016d74b1a303cbcad1cb7614a /vcl/inc | |
parent | 9a6bf4be437102004a01ee5818e943f0e095eefe (diff) |
vcl: window destructors calling dispose
Extend plugin to warn on any vcl::Window subclass that has a destructor
and does not implement dispose.
Apply this provision to the necessary classes in vcl/
Change-Id: I05189f8df02568131d59fc44fea904c87733c8c7
Diffstat (limited to 'vcl/inc')
-rw-r--r-- | vcl/inc/helpwin.hxx | 7 | ||||
-rw-r--r-- | vcl/inc/ilstbox.hxx | 5 | ||||
-rw-r--r-- | vcl/inc/printdlg.hxx | 3 |
3 files changed, 7 insertions, 8 deletions
diff --git a/vcl/inc/helpwin.hxx b/vcl/inc/helpwin.hxx index b6beda35a6d3..c092d292d4ea 100644 --- a/vcl/inc/helpwin.hxx +++ b/vcl/inc/helpwin.hxx @@ -38,8 +38,8 @@ private: Timer maShowTimer; Timer maHideTimer; - sal_uInt16 mnHelpWinStyle; - sal_uInt16 mnStyle; + sal_uInt16 mnHelpWinStyle; + sal_uInt16 mnStyle; protected: DECL_LINK( TimerHdl, Timer* ); @@ -50,7 +50,8 @@ protected: public: HelpTextWindow( vcl::Window* pParent, const OUString& rText, sal_uInt16 nHelpWinStyle, sal_uInt16 nStyle ); - virtual ~HelpTextWindow(); + virtual ~HelpTextWindow(); + virtual void dispose() SAL_OVERRIDE; const OUString& GetHelpText() const { return maHelpText; } void SetHelpText( const OUString& rHelpText ); diff --git a/vcl/inc/ilstbox.hxx b/vcl/inc/ilstbox.hxx index 82d33c00fe45..375d3cd48382 100644 --- a/vcl/inc/ilstbox.hxx +++ b/vcl/inc/ilstbox.hxx @@ -266,7 +266,8 @@ public: virtual void FillLayoutData() const SAL_OVERRIDE; ImplListBoxWindow( vcl::Window* pParent, WinBits nWinStyle ); - virtual ~ImplListBoxWindow(); + virtual ~ImplListBoxWindow(); + virtual void dispose() SAL_OVERRIDE; ImplEntryList* GetEntryList() const { return mpEntryList; } @@ -568,7 +569,6 @@ protected: public: ImplWin( vcl::Window* pParent, WinBits nWinStyle = 0 ); - virtual ~ImplWin() {}; virtual void MouseButtonDown( const MouseEvent& rMEvt ) SAL_OVERRIDE; virtual void Paint( const Rectangle& rRect ) SAL_OVERRIDE; @@ -610,7 +610,6 @@ private: public: ImplBtn( vcl::Window* pParent, WinBits nWinStyle = 0 ); - virtual ~ImplBtn() {}; virtual void MouseButtonDown( const MouseEvent& rMEvt ) SAL_OVERRIDE; void MBDown(); diff --git a/vcl/inc/printdlg.hxx b/vcl/inc/printdlg.hxx index bfc8a29e8a74..7af9e1e8ec00 100644 --- a/vcl/inc/printdlg.hxx +++ b/vcl/inc/printdlg.hxx @@ -63,7 +63,6 @@ namespace vcl public: PrintPreviewWindow( vcl::Window* pParent ); - virtual ~PrintPreviewWindow(); virtual void Paint( const Rectangle& rRect ) SAL_OVERRIDE; virtual void Command( const CommandEvent& ) SAL_OVERRIDE; @@ -88,7 +87,6 @@ namespace vcl void ImplInitSettings(); public: ShowNupOrderWindow( vcl::Window* pParent ); - virtual ~ShowNupOrderWindow(); virtual Size GetOptimalSize() const SAL_OVERRIDE; @@ -260,6 +258,7 @@ namespace vcl public: PrintDialog( vcl::Window*, const std::shared_ptr< PrinterController >& ); virtual ~PrintDialog(); + virtual void dispose() SAL_OVERRIDE; bool isPrintToFile(); bool isCollate(); |