From 1f59e2cec3f4a22d612ca6cff06930c3d4bb77ca Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 12 Jan 2015 11:38:12 +0200 Subject: 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 --- vcl/generic/print/prtsetup.cxx | 14 ++++++-------- vcl/generic/print/prtsetup.hxx | 3 +-- 2 files changed, 7 insertions(+), 10 deletions(-) (limited to 'vcl/generic') diff --git a/vcl/generic/print/prtsetup.cxx b/vcl/generic/print/prtsetup.cxx index cbe60c35f3f5..ed5cadcbb6ba 100644 --- a/vcl/generic/print/prtsetup.cxx +++ b/vcl/generic/print/prtsetup.cxx @@ -92,9 +92,15 @@ RTSDialog::RTSDialog(const PrinterInfo& rJobData, vcl::Window* pParent) } RTSDialog::~RTSDialog() +{ + dispose(); +} + +void RTSDialog::dispose() { delete m_pPaperPage; delete m_pDevicePage; + TabDialog::dispose(); } IMPL_LINK( RTSDialog, ActivatePage, TabControl*, pTabCtrl ) @@ -185,10 +191,6 @@ RTSPaperPage::RTSPaperPage(RTSDialog* pParent) update(); } -RTSPaperPage::~RTSPaperPage() -{ -} - void RTSPaperPage::update() { const PPDKey* pKey = NULL; @@ -353,10 +355,6 @@ RTSDevicePage::RTSDevicePage( RTSDialog* pParent ) } } -RTSDevicePage::~RTSDevicePage() -{ -} - sal_uLong RTSDevicePage::getDepth() { sal_uInt16 nSelectPos = m_pDepthBox->GetSelectEntryPos(); diff --git a/vcl/generic/print/prtsetup.hxx b/vcl/generic/print/prtsetup.hxx index 6d641bedadf9..17852fc1a3fd 100644 --- a/vcl/generic/print/prtsetup.hxx +++ b/vcl/generic/print/prtsetup.hxx @@ -64,6 +64,7 @@ class RTSDialog : public TabDialog public: RTSDialog(const ::psp::PrinterInfo& rJobData, vcl::Window* pParent = NULL); virtual ~RTSDialog(); + virtual void dispose() SAL_OVERRIDE; const ::psp::PrinterInfo& getSetup() const { return m_aJobData; } }; @@ -86,7 +87,6 @@ class RTSPaperPage : public TabPage DECL_LINK( SelectHdl, ListBox* ); public: RTSPaperPage( RTSDialog* ); - virtual ~RTSPaperPage(); void update(); @@ -112,7 +112,6 @@ class RTSDevicePage : public TabPage DECL_LINK( ModifyHdl, Edit* ); public: RTSDevicePage( RTSDialog* ); - virtual ~RTSDevicePage(); sal_uLong getLevel(); sal_uLong getPDFDevice(); -- cgit