summaryrefslogtreecommitdiff
path: root/vcl/generic
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-01-12 11:38:12 +0200
committerMichael Meeks <michael.meeks@collabora.com>2015-04-09 20:17:25 +0100
commit1f59e2cec3f4a22d612ca6cff06930c3d4bb77ca (patch)
tree22fb02505caea2c016d74b1a303cbcad1cb7614a /vcl/generic
parent9a6bf4be437102004a01ee5818e943f0e095eefe (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/generic')
-rw-r--r--vcl/generic/print/prtsetup.cxx14
-rw-r--r--vcl/generic/print/prtsetup.hxx3
2 files changed, 7 insertions, 10 deletions
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
@@ -93,8 +93,14 @@ 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();