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
diff --git a/compilerplugins/clang/vclwidgets.cxx b/compilerplugins/clang/vclwidgets.cxx
index 1f8e05b..040c5ba 100644
--- a/compilerplugins/clang/vclwidgets.cxx
+++ b/compilerplugins/clang/vclwidgets.cxx
@@ -82,18 +82,11 @@ bool VCLWidgets::VisitCXXRecordDecl(const CXXRecordDecl * recordDecl) {
    }
    if (!recordDecl->isCompleteDefinition())
        return true;
    // check if this field is derived from Window
    // check if this class is derived from Window
    if (!isDerivedFromWindow(recordDecl)) {
        return true;
    }
    bool foundVclPtr = false;
    for(auto fieldDecl : recordDecl->fields()) {
        if (fieldDecl->getType().getAsString().find("VclPtr") != std::string::npos) {
           foundVclPtr = true;
           break;
        }
    }
    if (!foundVclPtr) {
    if (!recordDecl->hasUserDeclaredDestructor()) {
        return true;
    }
    bool foundDispose = false;
@@ -106,7 +99,7 @@ bool VCLWidgets::VisitCXXRecordDecl(const CXXRecordDecl * recordDecl) {
    if (!foundDispose) {
        report(
            DiagnosticsEngine::Warning,
            "vcl::Window subclass with VclPtr members should declare a dispose() method.",
            "vcl::Window subclass with destructor should declare a dispose() method.",
            recordDecl->getLocation())
          << recordDecl->getSourceRange();
    }
diff --git a/include/vcl/ctrl.hxx b/include/vcl/ctrl.hxx
index d85c858..4d1f903 100644
--- a/include/vcl/ctrl.hxx
+++ b/include/vcl/ctrl.hxx
@@ -127,6 +127,7 @@ public:
    explicit        Control( vcl::Window* pParent, WinBits nWinStyle = 0 );
    explicit        Control( vcl::Window* pParent, const ResId& );
    virtual         ~Control();
    virtual void    dispose() SAL_OVERRIDE;

    virtual void    EnableRTL ( bool bEnable = true ) SAL_OVERRIDE;

diff --git a/include/vcl/dockingarea.hxx b/include/vcl/dockingarea.hxx
index 7fa2ad5..4bc2def 100644
--- a/include/vcl/dockingarea.hxx
+++ b/include/vcl/dockingarea.hxx
@@ -37,6 +37,7 @@ private:
public:
    explicit        DockingAreaWindow( vcl::Window* pParent );
    virtual         ~DockingAreaWindow();
    virtual void    dispose() SAL_OVERRIDE;

    void            SetAlign( WindowAlign eNewAlign );
    WindowAlign     GetAlign() const;
diff --git a/include/vcl/dockwin.hxx b/include/vcl/dockwin.hxx
index dac66c7..685dcd462 100644
--- a/include/vcl/dockwin.hxx
+++ b/include/vcl/dockwin.hxx
@@ -299,6 +299,7 @@ public:
    DockingWindow(vcl::Window* pParent, const OString& rID, const OUString& rUIXMLDescription,
        const css::uno::Reference<css::frame::XFrame> &rFrame = css::uno::Reference<css::frame::XFrame>());
    virtual ~DockingWindow();
    virtual void dispose() SAL_OVERRIDE;

    virtual void    StartDocking();
    virtual bool    Docking( const Point& rPos, Rectangle& rRect );
diff --git a/include/vcl/field.hxx b/include/vcl/field.hxx
index 179c16a..fc51b62 100644
--- a/include/vcl/field.hxx
+++ b/include/vcl/field.hxx
@@ -485,7 +485,6 @@ class VCL_DLLPUBLIC PatternField : public SpinField, public PatternFormatter
{
public:
    explicit                PatternField( vcl::Window* pParent, WinBits nWinStyle );
    virtual                 ~PatternField();

    virtual bool            PreNotify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
    virtual bool            Notify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
@@ -505,7 +504,6 @@ protected:
public:
    explicit                NumericField( vcl::Window* pParent, WinBits nWinStyle );
    explicit                NumericField( vcl::Window* pParent, const ResId& );
    virtual                 ~NumericField();

    virtual bool            PreNotify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
    virtual bool            Notify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
@@ -535,7 +533,6 @@ protected:
public:
    explicit                MetricField( vcl::Window* pParent, WinBits nWinStyle );
    explicit                MetricField( vcl::Window* pParent, const ResId& );
    virtual                 ~MetricField();

    virtual bool            PreNotify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
    virtual bool            Notify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
@@ -602,7 +599,6 @@ class VCL_DLLPUBLIC CurrencyField : public SpinField, public CurrencyFormatter
{
public:
    CurrencyField( vcl::Window* pParent, WinBits nWinStyle );
    virtual ~CurrencyField();

    virtual bool            PreNotify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
    virtual bool            Notify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
@@ -696,7 +692,6 @@ class VCL_DLLPUBLIC PatternBox : public ComboBox, public PatternFormatter
{
public:
                            PatternBox( vcl::Window* pParent, WinBits nWinStyle );
                            virtual ~PatternBox();

    virtual bool            PreNotify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
    virtual bool            Notify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
@@ -715,7 +710,6 @@ class VCL_DLLPUBLIC NumericBox : public ComboBox, public NumericFormatter
{
public:
    explicit                NumericBox( vcl::Window* pParent, WinBits nWinStyle );
    virtual                 ~NumericBox();

    virtual Size            CalcMinimumSize() const SAL_OVERRIDE;

@@ -739,7 +733,6 @@ class VCL_DLLPUBLIC MetricBox : public ComboBox, public MetricFormatter
{
public:
    explicit                MetricBox( vcl::Window* pParent, WinBits nWinStyle );
    virtual                 ~MetricBox();

    virtual bool            PreNotify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
    virtual bool            Notify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
@@ -772,7 +765,6 @@ class VCL_DLLPUBLIC CurrencyBox : public ComboBox, public CurrencyFormatter
{
public:
    explicit                CurrencyBox( vcl::Window* pParent, WinBits nWinStyle );
    virtual                 ~CurrencyBox();

    virtual bool            PreNotify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
    virtual bool            Notify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
@@ -793,7 +785,6 @@ class VCL_DLLPUBLIC DateBox : public ComboBox, public DateFormatter
{
public:
    explicit                DateBox( vcl::Window* pParent, WinBits nWinStyle );
    virtual                 ~DateBox();

    virtual bool            PreNotify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
    virtual bool            Notify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
@@ -813,7 +804,6 @@ class VCL_DLLPUBLIC TimeBox : public ComboBox, public TimeFormatter
{
public:
    explicit                TimeBox( vcl::Window* pParent, WinBits nWinStyle );
    virtual                 ~TimeBox();

    virtual bool            PreNotify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
    virtual bool            Notify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
diff --git a/include/vcl/fixed.hxx b/include/vcl/fixed.hxx
index f11f0e0..19c070e 100644
--- a/include/vcl/fixed.hxx
+++ b/include/vcl/fixed.hxx
@@ -141,7 +141,6 @@ private:

public:
    explicit        FixedBitmap( vcl::Window* pParent, WinBits nStyle = 0 );
    virtual         ~FixedBitmap();

    virtual void    Paint( const Rectangle& rRect ) SAL_OVERRIDE;
    virtual void    Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags ) SAL_OVERRIDE;
@@ -179,7 +178,6 @@ protected:
public:
    explicit        FixedImage( vcl::Window* pParent, WinBits nStyle = 0 );
    explicit        FixedImage( vcl::Window* pParent, const ResId& );
    virtual         ~FixedImage();

    virtual void    Paint( const Rectangle& rRect ) SAL_OVERRIDE;
    virtual void    Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags ) SAL_OVERRIDE;
diff --git a/include/vcl/fixedhyper.hxx b/include/vcl/fixedhyper.hxx
index c85bd1c..2fc8e2f 100644
--- a/include/vcl/fixedhyper.hxx
+++ b/include/vcl/fixedhyper.hxx
@@ -66,11 +66,6 @@ class VCL_DLLPUBLIC FixedHyperlink : public FixedText
        */
        FixedHyperlink( vcl::Window* pParent, WinBits nWinStyle = 0 );

        /** dtor

        */
        virtual ~FixedHyperlink();

        /** overwrites Window::GetFocus().

            Changes the color of the text and shows a focus rectangle.
diff --git a/include/vcl/longcurr.hxx b/include/vcl/longcurr.hxx
index 0c2d1a9..0dbe82c 100644
--- a/include/vcl/longcurr.hxx
+++ b/include/vcl/longcurr.hxx
@@ -90,7 +90,6 @@ private:

public:
                    LongCurrencyField( vcl::Window* pParent, WinBits nWinStyle );
                    virtual ~LongCurrencyField();

    virtual bool    PreNotify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
    virtual bool    Notify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
@@ -117,7 +116,6 @@ class VCL_DLLPUBLIC LongCurrencyBox : public ComboBox, public LongCurrencyFormat
{
public:
                    LongCurrencyBox( vcl::Window* pParent, WinBits nWinStyle );
                    virtual ~LongCurrencyBox();

    virtual bool    PreNotify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
    virtual bool    Notify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
diff --git a/include/vcl/lstbox.hxx b/include/vcl/lstbox.hxx
index 29d2199..fdbce07 100644
--- a/include/vcl/lstbox.hxx
+++ b/include/vcl/lstbox.hxx
@@ -83,6 +83,7 @@ public:
    explicit            ListBox( vcl::Window* pParent, WinBits nStyle = WB_BORDER );
    explicit            ListBox( vcl::Window* pParent, const ResId& );
    virtual             ~ListBox();
    virtual void        dispose() SAL_OVERRIDE;

    virtual void        Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags ) SAL_OVERRIDE;
    virtual void        Resize() SAL_OVERRIDE;
diff --git a/include/vcl/menubtn.hxx b/include/vcl/menubtn.hxx
index 41e03c6..eb2c446 100644
--- a/include/vcl/menubtn.hxx
+++ b/include/vcl/menubtn.hxx
@@ -57,6 +57,7 @@ protected:
public:
    explicit        MenuButton( vcl::Window* pParent, WinBits nStyle = 0 );
    virtual         ~MenuButton();
    virtual void    dispose() SAL_OVERRIDE;

    virtual void    MouseButtonDown( const MouseEvent& rMEvt ) SAL_OVERRIDE;
    virtual void    KeyInput( const KeyEvent& rKEvt ) SAL_OVERRIDE;
diff --git a/include/vcl/morebtn.hxx b/include/vcl/morebtn.hxx
index 4dbd6da5..936cbba 100644
--- a/include/vcl/morebtn.hxx
+++ b/include/vcl/morebtn.hxx
@@ -35,7 +35,7 @@ class VCL_DLLPUBLIC MoreButton : public PushButton
{
private:
    ImplMoreButtonData* mpMBData;
    sal_uLong               mnDelta;
    sal_uLong           mnDelta;
    MapUnit             meUnit;
    bool                mbState;

@@ -50,6 +50,7 @@ protected:
public:
    explicit            MoreButton( vcl::Window* pParent, WinBits nStyle = 0 );
    virtual             ~MoreButton();
    virtual void        dispose() SAL_OVERRIDE;

    void                Click() SAL_OVERRIDE;

diff --git a/include/vcl/popupmenuwindow.hxx b/include/vcl/popupmenuwindow.hxx
index 266738a17..13d699f 100644
--- a/include/vcl/popupmenuwindow.hxx
+++ b/include/vcl/popupmenuwindow.hxx
@@ -30,6 +30,7 @@ private:
public:
    PopupMenuFloatingWindow( vcl::Window* pParent, WinBits nStyle = (WB_SYSTEMFLOATWIN|WB_SYSTEMWINDOW|WB_NOBORDER) );
    virtual ~PopupMenuFloatingWindow();
    virtual void dispose() SAL_OVERRIDE;

    sal_uInt16      GetMenuStackLevel() const;
    void            SetMenuStackLevel( sal_uInt16 nLevel );
diff --git a/include/vcl/prgsbar.hxx b/include/vcl/prgsbar.hxx
index 782b2c5..43d3406 100644
--- a/include/vcl/prgsbar.hxx
+++ b/include/vcl/prgsbar.hxx
@@ -61,8 +61,8 @@ private:
    Point               maPos;
    long                mnPrgsWidth;
    long                mnPrgsHeight;
    sal_uInt16              mnPercent;
    sal_uInt16              mnPercentCount;
    sal_uInt16          mnPercent;
    sal_uInt16          mnPercentCount;
    bool                mbCalcNew;

    using Window::ImplInit;
@@ -72,7 +72,6 @@ private:

public:
                        ProgressBar( vcl::Window* pParent, WinBits nWinBits = WB_STDPROGRESSBAR );
                        virtual ~ProgressBar();

    virtual void        Paint( const Rectangle& rRect ) SAL_OVERRIDE;
    virtual void        Resize() SAL_OVERRIDE;
diff --git a/include/vcl/scrbar.hxx b/include/vcl/scrbar.hxx
index f3bef63..27871af 100644
--- a/include/vcl/scrbar.hxx
+++ b/include/vcl/scrbar.hxx
@@ -91,6 +91,7 @@ private:
public:
    explicit        ScrollBar( vcl::Window* pParent, WinBits nStyle = WB_VERT );
    virtual         ~ScrollBar();
    virtual void    dispose() SAL_OVERRIDE;

    virtual void    MouseButtonDown( const MouseEvent& rMEvt ) SAL_OVERRIDE;
    virtual void    Tracking( const TrackingEvent& rTEvt ) SAL_OVERRIDE;
diff --git a/include/vcl/spin.hxx b/include/vcl/spin.hxx
index 4fb25f3..ad261f2 100644
--- a/include/vcl/spin.hxx
+++ b/include/vcl/spin.hxx
@@ -57,7 +57,6 @@ private:

public:
    explicit        SpinButton( vcl::Window* pParent, WinBits nStyle = 0 );
    virtual         ~SpinButton();

    void            Up();
    void            Down();
diff --git a/include/vcl/split.hxx b/include/vcl/split.hxx
index fbc8332..c167ce7 100644
--- a/include/vcl/split.hxx
+++ b/include/vcl/split.hxx
@@ -28,7 +28,7 @@
class VCL_DLLPUBLIC Splitter : public vcl::Window
{
private:
    vcl::Window*             mpRefWin;
    vcl::Window*        mpRefWin;
    long                mnSplitPos;
    long                mnLastSplitPos;
    long                mnStartSplitPos;
@@ -63,6 +63,7 @@ protected:
public:
    explicit            Splitter( vcl::Window* pParent, WinBits nStyle = WB_VSCROLL );
    virtual             ~Splitter();
    virtual void        dispose() SAL_OVERRIDE;

    void                StartSplit();
    void                EndSplit();
diff --git a/include/vcl/splitwin.hxx b/include/vcl/splitwin.hxx
index 157f0c2..009f9e9 100644
--- a/include/vcl/splitwin.hxx
+++ b/include/vcl/splitwin.hxx
@@ -123,7 +123,8 @@ private:
                        SplitWindow & operator= (const SplitWindow &) SAL_DELETED_FUNCTION;
public:
                        SplitWindow( vcl::Window* pParent, WinBits nStyle = 0 );
                        virtual ~SplitWindow();
    virtual             ~SplitWindow();
    virtual void        dispose() SAL_OVERRIDE;

    virtual void        StartSplit();
    virtual void        Split();
diff --git a/include/vcl/status.hxx b/include/vcl/status.hxx
index a9ad080..6824233 100644
--- a/include/vcl/status.hxx
+++ b/include/vcl/status.hxx
@@ -85,9 +85,9 @@ private:
    long                mnCalcHeight;
    long                mnTextY;
    long                mnItemY;
    sal_uInt16              mnCurItemId;
    sal_uInt16              mnPercent;
    sal_uInt16              mnPercentCount;
    sal_uInt16          mnCurItemId;
    sal_uInt16          mnPercent;
    sal_uInt16          mnPercentCount;
    bool                mbVisibleItems;
    bool                mbFormat;
    bool                mbProgressMode;
@@ -113,7 +113,8 @@ private:
public:
                        StatusBar( vcl::Window* pParent,
                                   WinBits nWinStyle = WB_BORDER | WB_RIGHT );
                        virtual ~StatusBar();
    virtual             ~StatusBar();
    virtual void        dispose() SAL_OVERRIDE;

    void                AdjustItemWidthsForHiDPI(bool bAdjustHiDPI);

diff --git a/include/vcl/tabctrl.hxx b/include/vcl/tabctrl.hxx
index 526bc25..a3b8aa0 100644
--- a/include/vcl/tabctrl.hxx
+++ b/include/vcl/tabctrl.hxx
@@ -42,13 +42,13 @@ private:
    long                mnLastHeight;
    long                mnBtnSize;
    long                mnMaxPageWidth;
    sal_uInt16              mnActPageId;
    sal_uInt16              mnCurPageId;
    sal_uInt16          mnActPageId;
    sal_uInt16          mnCurPageId;
    bool                mbFormat;
    bool                mbRestoreHelpId;
    bool                mbRestoreUnqId;
    bool                mbSmallInvalidate;
    bool                    mbLayoutDirty;
    bool                mbLayoutDirty;
    Link                maActivateHdl;
    Link                maDeactivateHdl;

@@ -83,6 +83,7 @@ public:
                        TabControl( vcl::Window* pParent,
                                    WinBits nStyle = WB_STDTABCONTROL );
                        virtual ~TabControl();
    virtual void        dispose() SAL_OVERRIDE;

    virtual void        MouseButtonDown( const MouseEvent& rMEvt ) SAL_OVERRIDE;
    virtual void        KeyInput( const KeyEvent& rKEvt ) SAL_OVERRIDE;
diff --git a/include/vcl/tabdlg.hxx b/include/vcl/tabdlg.hxx
index f02efc7..f02e2a7 100644
--- a/include/vcl/tabdlg.hxx
+++ b/include/vcl/tabdlg.hxx
@@ -41,7 +41,8 @@ public:
                        TabDialog( vcl::Window* pParent,
                                   WinBits nStyle = WB_STDTABDIALOG );
                        TabDialog( vcl::Window* pParent, const OUString& rID, const OUString& rUIXMLDescription );
                        virtual ~TabDialog();
    virtual             ~TabDialog();
    virtual void        dispose() SAL_OVERRIDE;

    virtual void        StateChanged( StateChangedType nStateChange ) SAL_OVERRIDE;

diff --git a/include/vcl/throbber.hxx b/include/vcl/throbber.hxx
index aaf8edf..f7cbbed 100644
--- a/include/vcl/throbber.hxx
+++ b/include/vcl/throbber.hxx
@@ -48,6 +48,7 @@ public:
public:
    Throbber(vcl::Window* i_parentWindow, WinBits i_style, const ImageSet i_imageSet = IMAGES_AUTO);
    virtual ~Throbber();
    virtual void dispose() SAL_OVERRIDE;

    // Properties
    void            setStepTime( sal_Int32 nStepTime )  { mnStepTime = nStepTime; }
diff --git a/include/vcl/toolbox.hxx b/include/vcl/toolbox.hxx
index d723e6ee..8c72c3c 100644
--- a/include/vcl/toolbox.hxx
+++ b/include/vcl/toolbox.hxx
@@ -281,7 +281,8 @@ protected:
public:
                        ToolBox( vcl::Window* pParent, WinBits nStyle = 0 );
                        ToolBox( vcl::Window* pParent, const ResId& rResId );
                        virtual ~ToolBox();
    virtual             ~ToolBox();
    virtual void        dispose() SAL_OVERRIDE;

    virtual void        Click();
    void                DoubleClick();
diff --git a/vcl/generic/print/prtsetup.cxx b/vcl/generic/print/prtsetup.cxx
index cbe60c3..ed5cadc 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 6d641be..17852fc 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();
diff --git a/vcl/inc/helpwin.hxx b/vcl/inc/helpwin.hxx
index b6beda3..c092d29 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 82d33c00f..375d3cd 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 bfc8a29..7af9e1e 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();
diff --git a/vcl/source/app/help.cxx b/vcl/source/app/help.cxx
index 8a3a1f8..859f0c8 100644
--- a/vcl/source/app/help.cxx
+++ b/vcl/source/app/help.cxx
@@ -290,11 +290,17 @@ HelpTextWindow::HelpTextWindow( vcl::Window* pParent, const OUString& rText, sal

HelpTextWindow::~HelpTextWindow()
{
    dispose();
}

void HelpTextWindow::dispose()
{
    maShowTimer.Stop();
    maHideTimer.Stop();

    if( this == ImplGetSVData()->maHelpData.mpHelpWin )
        ImplGetSVData()->maHelpData.mpHelpWin = NULL;
    FloatingWindow::dispose();
}

void HelpTextWindow::SetHelpText( const OUString& rHelpText )
diff --git a/vcl/source/control/ctrl.cxx b/vcl/source/control/ctrl.cxx
index 411243c..155952d 100644
--- a/vcl/source/control/ctrl.cxx
+++ b/vcl/source/control/ctrl.cxx
@@ -67,7 +67,13 @@ Control::Control( vcl::Window* pParent, const ResId& rResId ) :

Control::~Control()
{
   dispose();
}

void Control::dispose()
{
    delete mpControlData, mpControlData = NULL;
    Window::dispose();
}

void Control::EnableRTL( bool bEnable )
diff --git a/vcl/source/control/field.cxx b/vcl/source/control/field.cxx
index c71b726..cb6b46b 100644
--- a/vcl/source/control/field.cxx
+++ b/vcl/source/control/field.cxx
@@ -842,10 +842,6 @@ void NumericField::ImplLoadRes( const ResId& rResId )
        mnSpinSize = ReadLongRes();
}

NumericField::~NumericField()
{
}

bool NumericField::PreNotify( NotifyEvent& rNEvt )
{
        if ( (rNEvt.GetType() == MouseNotifyEvent::KEYINPUT) && !rNEvt.GetKeyEvent()->GetKeyCode().IsMod2() )
@@ -979,10 +975,6 @@ Size NumericBox::CalcMinimumSize() const
    return aRet;
}

NumericBox::~NumericBox()
{
}

bool NumericBox::PreNotify( NotifyEvent& rNEvt )
{
    if ( (rNEvt.GetType() == MouseNotifyEvent::KEYINPUT) && !rNEvt.GetKeyEvent()->GetKeyCode().IsMod2() )
@@ -1679,10 +1671,6 @@ void MetricField::ImplLoadRes( const ResId& rResId )
    Reformat();
}

MetricField::~MetricField()
{
}

void MetricField::SetUnit( FieldUnit nNewUnit )
{
    sal_Int64 nRawMax = GetMax( nNewUnit );
@@ -1826,10 +1814,6 @@ Size MetricBox::CalcMinimumSize() const
    return aRet;
}

MetricBox::~MetricBox()
{
}

bool MetricBox::PreNotify( NotifyEvent& rNEvt )
{
    if ( (rNEvt.GetType() == MouseNotifyEvent::KEYINPUT) && !rNEvt.GetKeyEvent()->GetKeyCode().IsMod2()  )
@@ -2056,10 +2040,6 @@ CurrencyField::CurrencyField( vcl::Window* pParent, WinBits nWinStyle ) :
    Reformat();
}

CurrencyField::~CurrencyField()
{
}

bool CurrencyField::PreNotify( NotifyEvent& rNEvt )
{
    if ( (rNEvt.GetType() == MouseNotifyEvent::KEYINPUT) && !rNEvt.GetKeyEvent()->GetKeyCode().IsMod2() )
@@ -2138,10 +2118,6 @@ CurrencyBox::CurrencyBox( vcl::Window* pParent, WinBits nWinStyle ) :
    Reformat();
}

CurrencyBox::~CurrencyBox()
{
}

bool CurrencyBox::PreNotify( NotifyEvent& rNEvt )
{
    if ( (rNEvt.GetType() == MouseNotifyEvent::KEYINPUT) && !rNEvt.GetKeyEvent()->GetKeyCode().IsMod2() )
diff --git a/vcl/source/control/field2.cxx b/vcl/source/control/field2.cxx
index 4bf320f..3f343b2 100644
--- a/vcl/source/control/field2.cxx
+++ b/vcl/source/control/field2.cxx
@@ -820,10 +820,6 @@ PatternField::PatternField( vcl::Window* pParent, WinBits nWinStyle ) :
    Reformat();
}

PatternField::~PatternField()
{
}

bool PatternField::PreNotify( NotifyEvent& rNEvt )
{
    if ( (rNEvt.GetType() == MouseNotifyEvent::KEYINPUT) && !rNEvt.GetKeyEvent()->GetKeyCode().IsMod2() )
@@ -870,10 +866,6 @@ PatternBox::PatternBox( vcl::Window* pParent, WinBits nWinStyle ) :
    Reformat();
}

PatternBox::~PatternBox()
{
}

bool PatternBox::PreNotify( NotifyEvent& rNEvt )
{
    if ( (rNEvt.GetType() == MouseNotifyEvent::KEYINPUT) && !rNEvt.GetKeyEvent()->GetKeyCode().IsMod2() )
@@ -1738,10 +1730,6 @@ DateField::DateField( vcl::Window* pParent, WinBits nWinStyle ) :
    ResetLastDate();
}

DateField::~DateField()
{
}

bool DateField::PreNotify( NotifyEvent& rNEvt )
{
    if ( (rNEvt.GetType() == MouseNotifyEvent::KEYINPUT) && IsStrictFormat() &&
@@ -1841,10 +1829,6 @@ DateBox::DateBox( vcl::Window* pParent, WinBits nWinStyle ) :
    Reformat();
}

DateBox::~DateBox()
{
}

bool DateBox::PreNotify( NotifyEvent& rNEvt )
{
    if ( (rNEvt.GetType() == MouseNotifyEvent::KEYINPUT) && IsStrictFormat() &&
@@ -2532,10 +2516,6 @@ TimeField::TimeField( vcl::Window* pParent, WinBits nWinStyle ) :
    Reformat();
}

TimeField::~TimeField()
{
}

bool TimeField::PreNotify( NotifyEvent& rNEvt )
{
    if ( (rNEvt.GetType() == MouseNotifyEvent::KEYINPUT) && !rNEvt.GetKeyEvent()->GetKeyCode().IsMod2() )
@@ -2673,10 +2653,6 @@ TimeBox::TimeBox( vcl::Window* pParent, WinBits nWinStyle ) :
    Reformat();
}

TimeBox::~TimeBox()
{
}

bool TimeBox::PreNotify( NotifyEvent& rNEvt )
{
    if ( (rNEvt.GetType() == MouseNotifyEvent::KEYINPUT) && !rNEvt.GetKeyEvent()->GetKeyCode().IsMod2() )
diff --git a/vcl/source/control/fixed.cxx b/vcl/source/control/fixed.cxx
index 5ee2a95..4f111bf 100644
--- a/vcl/source/control/fixed.cxx
+++ b/vcl/source/control/fixed.cxx
@@ -754,10 +754,6 @@ FixedBitmap::FixedBitmap( vcl::Window* pParent, WinBits nStyle ) :
    ImplInit( pParent, nStyle );
}

FixedBitmap::~FixedBitmap()
{
}

void FixedBitmap::ImplDraw( OutputDevice* pDev, sal_uLong /* nDrawFlags */,
                            const Point& rPos, const Size& rSize )
{
@@ -921,10 +917,6 @@ FixedImage::FixedImage( vcl::Window* pParent, const ResId& rResId ) :
        Show();
}

FixedImage::~FixedImage()
{
}

void FixedImage::ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags,
                           const Point& rPos, const Size& rSize )
{
diff --git a/vcl/source/control/fixedhyper.cxx b/vcl/source/control/fixedhyper.cxx
index 6926a0c..db36f90 100644
--- a/vcl/source/control/fixedhyper.cxx
+++ b/vcl/source/control/fixedhyper.cxx
@@ -26,10 +26,6 @@ FixedHyperlink::FixedHyperlink(vcl::Window* pParent, WinBits nWinStyle)
    Initialize();
}

FixedHyperlink::~FixedHyperlink()
{
}

void FixedHyperlink::Initialize()
{
    // saves the old pointer
diff --git a/vcl/source/control/ilstbox.cxx b/vcl/source/control/ilstbox.cxx
index 9a18684..dd9cf52 100644
--- a/vcl/source/control/ilstbox.cxx
+++ b/vcl/source/control/ilstbox.cxx
@@ -536,7 +536,13 @@ ImplListBoxWindow::ImplListBoxWindow( vcl::Window* pParent, WinBits nWinStyle ) 

ImplListBoxWindow::~ImplListBoxWindow()
{
    dispose();
}

void ImplListBoxWindow::dispose()
{
    delete mpEntryList;
    Control::dispose();
}

void ImplListBoxWindow::ImplInitSettings( bool bFont, bool bForeground, bool bBackground )
diff --git a/vcl/source/control/longcurr.cxx b/vcl/source/control/longcurr.cxx
index 5f081be..77724b0 100644
--- a/vcl/source/control/longcurr.cxx
+++ b/vcl/source/control/longcurr.cxx
@@ -468,10 +468,6 @@ LongCurrencyField::LongCurrencyField( vcl::Window* pParent, WinBits nWinStyle ) 
    Reformat();
}

LongCurrencyField::~LongCurrencyField()
{
}

bool LongCurrencyField::PreNotify( NotifyEvent& rNEvt )
{
    if( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT )
@@ -546,10 +542,6 @@ LongCurrencyBox::LongCurrencyBox( vcl::Window* pParent, WinBits nWinStyle ) :
    Reformat();
}

LongCurrencyBox::~LongCurrencyBox()
{
}

bool LongCurrencyBox::PreNotify( NotifyEvent& rNEvt )
{
    if( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT )
diff --git a/vcl/source/control/lstbox.cxx b/vcl/source/control/lstbox.cxx
index ee856fc..23da0e84 100644
--- a/vcl/source/control/lstbox.cxx
+++ b/vcl/source/control/lstbox.cxx
@@ -70,6 +70,11 @@ ListBox::ListBox( vcl::Window* pParent, const ResId& rResId ) :

ListBox::~ListBox()
{
    dispose();
}

void ListBox::dispose()
{
    CallEventListeners( VCLEVENT_OBJECT_DYING );

    // When destroying the FloatWin TH does a GrabFocus to the Parent:
@@ -81,6 +86,7 @@ ListBox::~ListBox()
    delete mpFloatWin;
    delete mpImplWin;
    delete mpBtn;
    Control::dispose();
}

void ListBox::ImplInitListBoxData()
diff --git a/vcl/source/control/menubtn.cxx b/vcl/source/control/menubtn.cxx
index a78c561..f388867 100644
--- a/vcl/source/control/menubtn.cxx
+++ b/vcl/source/control/menubtn.cxx
@@ -82,8 +82,14 @@ MenuButton::MenuButton( vcl::Window* pParent, WinBits nWinBits )

MenuButton::~MenuButton()
{
    dispose();
}

void MenuButton::dispose()
{
    delete mpMenuTimer;
    delete mpOwnMenu;
    PushButton::dispose();
}

IMPL_LINK_NOARG(MenuButton, ImplMenuTimeoutHdl)
diff --git a/vcl/source/control/morebtn.cxx b/vcl/source/control/morebtn.cxx
index 95cd171..eb28f3a 100644
--- a/vcl/source/control/morebtn.cxx
+++ b/vcl/source/control/morebtn.cxx
@@ -80,8 +80,14 @@ MoreButton::MoreButton( vcl::Window* pParent, WinBits nStyle ) :

MoreButton::~MoreButton()
{
    dispose();
}

void MoreButton::dispose()
{
    delete mpMBData->mpItemList;
    delete mpMBData;
    PushButton::dispose();
}

void MoreButton::Click()
diff --git a/vcl/source/control/prgsbar.cxx b/vcl/source/control/prgsbar.cxx
index d6443cd..a89afac 100644
--- a/vcl/source/control/prgsbar.cxx
+++ b/vcl/source/control/prgsbar.cxx
@@ -56,10 +56,6 @@ ProgressBar::ProgressBar( vcl::Window* pParent, WinBits nWinStyle ) :
    ImplInit();
}

ProgressBar::~ProgressBar()
{
}

void ProgressBar::ImplInitSettings( bool bFont,
                                    bool bForeground, bool bBackground )
{
diff --git a/vcl/source/control/scrbar.cxx b/vcl/source/control/scrbar.cxx
index 98d7533..b1411d7 100644
--- a/vcl/source/control/scrbar.cxx
+++ b/vcl/source/control/scrbar.cxx
@@ -125,7 +125,13 @@ ScrollBar::ScrollBar( vcl::Window* pParent, WinBits nStyle ) :

ScrollBar::~ScrollBar()
{
    dispose();
}

void ScrollBar::dispose()
{
    delete mpData;
    Control::dispose();
}

void ScrollBar::ImplUpdateRects( bool bUpdate )
diff --git a/vcl/source/control/spinbtn.cxx b/vcl/source/control/spinbtn.cxx
index 9b16b47..c9feafa 100644
--- a/vcl/source/control/spinbtn.cxx
+++ b/vcl/source/control/spinbtn.cxx
@@ -55,10 +55,6 @@ SpinButton::SpinButton( vcl::Window* pParent, WinBits nStyle )
    ImplInit( pParent, nStyle );
}

SpinButton::~SpinButton()
{
}

IMPL_LINK( SpinButton, ImplTimeout, Timer*, pTimer )
{
    if ( pTimer->GetTimeout() == GetSettings().GetMouseSettings().GetButtonStartRepeat() )
diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx
index 3d54413..73987a1 100644
--- a/vcl/source/control/tabctrl.cxx
+++ b/vcl/source/control/tabctrl.cxx
@@ -192,6 +192,11 @@ TabControl::TabControl( vcl::Window* pParent, WinBits nStyle ) :

TabControl::~TabControl()
{
    dispose();
}

void TabControl::dispose()
{
    Window *pParent = GetParent();
    if (pParent && pParent->IsDialog())
        GetParent()->RemoveChildEventListener( LINK( this, TabControl, ImplWindowEventListener ) );
@@ -205,6 +210,7 @@ TabControl::~TabControl()
            delete mpTabCtrlData->mpListBox;
        delete mpTabCtrlData;
    }
    Control::dispose();
}

ImplTabItem* TabControl::ImplGetItem( sal_uInt16 nId ) const
diff --git a/vcl/source/control/throbber.cxx b/vcl/source/control/throbber.cxx
index 347f24a..e91f24b 100644
--- a/vcl/source/control/throbber.cxx
+++ b/vcl/source/control/throbber.cxx
@@ -59,7 +59,13 @@ Throbber::Throbber( vcl::Window* i_parentWindow, WinBits i_style, const ImageSet

Throbber::~Throbber()
{
    dispose();
}

void Throbber::dispose()
{
    maWaitTimer.Stop();
    ImageControl::dispose();
}

namespace
diff --git a/vcl/source/edit/vclmedit.cxx b/vcl/source/edit/vclmedit.cxx
index 0ceabaf..c0406c6 100644
--- a/vcl/source/edit/vclmedit.cxx
+++ b/vcl/source/edit/vclmedit.cxx
@@ -47,7 +47,8 @@ private:

public:
                    TextWindow( vcl::Window* pParent );
                    virtual ~TextWindow();
    virtual         ~TextWindow();
    virtual void    dispose() SAL_OVERRIDE;

    ExtTextEngine*  GetTextEngine() const { return mpExtTextEngine; }
    ExtTextView*    GetTextView() const { return mpExtTextView; }
@@ -730,8 +731,14 @@ TextWindow::TextWindow( vcl::Window* pParent ) : Window( pParent )

TextWindow::~TextWindow()
{
    dispose();
}

void TextWindow::dispose()
{
    delete mpExtTextView;
    delete mpExtTextEngine;
    Window::dispose();
}

void TextWindow::MouseMove( const MouseEvent& rMEvt )
diff --git a/vcl/source/window/dockingarea.cxx b/vcl/source/window/dockingarea.cxx
index 623ea96..1aad1dc 100644
--- a/vcl/source/window/dockingarea.cxx
+++ b/vcl/source/window/dockingarea.cxx
@@ -92,7 +92,13 @@ DockingAreaWindow::DockingAreaWindow( vcl::Window* pParent ) :

DockingAreaWindow::~DockingAreaWindow()
{
    dispose();
}

void DockingAreaWindow::dispose()
{
    delete mpImplData;
    Window::dispose();
}

void DockingAreaWindow::DataChanged( const DataChangedEvent& rDCEvt )
diff --git a/vcl/source/window/dockmgr.cxx b/vcl/source/window/dockmgr.cxx
index a389216..7b0f1c3 100644
--- a/vcl/source/window/dockmgr.cxx
+++ b/vcl/source/window/dockmgr.cxx
@@ -57,6 +57,7 @@ public:
    ImplDockFloatWin2( vcl::Window* pParent, WinBits nWinBits,
                      ImplDockingWindowWrapper* pDockingWin );
    virtual ~ImplDockFloatWin2();
    virtual void dispose() SAL_OVERRIDE;

    virtual void    Move() SAL_OVERRIDE;
    virtual void    Resize() SAL_OVERRIDE;
@@ -97,8 +98,14 @@ ImplDockFloatWin2::ImplDockFloatWin2( vcl::Window* pParent, WinBits nWinBits,

ImplDockFloatWin2::~ImplDockFloatWin2()
{
    dispose();
}

void ImplDockFloatWin2::dispose()
{
    if( mnLastUserEvent )
        Application::RemoveUserEvent( mnLastUserEvent );
    FloatingWindow::dispose();
}

IMPL_LINK_NOARG(ImplDockFloatWin2, DockTimerHdl)
@@ -477,6 +484,7 @@ private:
public:
    ImplPopupFloatWin( vcl::Window* pParent, ImplDockingWindowWrapper* pDockingWin, bool bHasGrip );
    virtual ~ImplPopupFloatWin();
    virtual void dispose() SAL_OVERRIDE;

    virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible() SAL_OVERRIDE;
    virtual void        Paint( const Rectangle& rRect ) SAL_OVERRIDE;
@@ -513,7 +521,13 @@ ImplPopupFloatWin::ImplPopupFloatWin( vcl::Window* pParent, ImplDockingWindowWra

ImplPopupFloatWin::~ImplPopupFloatWin()
{
    dispose();
}

void ImplPopupFloatWin::dispose()
{
    mpDockingWin = NULL;
    FloatingWindow::dispose();
}

::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > ImplPopupFloatWin::CreateAccessible()
diff --git a/vcl/source/window/dockwin.cxx b/vcl/source/window/dockwin.cxx
index 94e32d3..549d8c4 100644
--- a/vcl/source/window/dockwin.cxx
+++ b/vcl/source/window/dockwin.cxx
@@ -73,6 +73,7 @@ public:
    ImplDockFloatWin( vcl::Window* pParent, WinBits nWinBits,
                      DockingWindow* pDockingWin );
    virtual ~ImplDockFloatWin();
    virtual void dispose() SAL_OVERRIDE;

    virtual void    Move() SAL_OVERRIDE;
    virtual void    Resize() SAL_OVERRIDE;
@@ -111,8 +112,14 @@ ImplDockFloatWin::ImplDockFloatWin( vcl::Window* pParent, WinBits nWinBits,

ImplDockFloatWin::~ImplDockFloatWin()
{
    dispose();
}

void ImplDockFloatWin::dispose()
{
    if( mnLastUserEvent )
        Application::RemoveUserEvent( mnLastUserEvent );
    FloatingWindow::dispose();
}

IMPL_LINK_NOARG(ImplDockFloatWin, DockTimerHdl)
@@ -460,6 +467,11 @@ DockingWindow::DockingWindow(vcl::Window* pParent, const OString& rID,

DockingWindow::~DockingWindow()
{
    dispose();
}

void DockingWindow::dispose()
{
    if ( IsFloatingMode() )
    {
        Show( false, SHOW_NOFOCUSCHANGE );
@@ -467,6 +479,7 @@ DockingWindow::~DockingWindow()
    }
    delete mpImplData;
    mpImplData = NULL;
    Window::dispose();
}

void DockingWindow::Tracking( const TrackingEvent& rTEvt )
diff --git a/vcl/source/window/popupmenuwindow.cxx b/vcl/source/window/popupmenuwindow.cxx
index 1a33ff9..fec8ebc 100644
--- a/vcl/source/window/popupmenuwindow.cxx
+++ b/vcl/source/window/popupmenuwindow.cxx
@@ -46,7 +46,13 @@ PopupMenuFloatingWindow::PopupMenuFloatingWindow( vcl::Window* pParent, WinBits 

PopupMenuFloatingWindow::~PopupMenuFloatingWindow()
{
    dispose();
}

void PopupMenuFloatingWindow::dispose()
{
    delete mpImplData;
    FloatingWindow::dispose();
}

sal_uInt16 PopupMenuFloatingWindow::GetMenuStackLevel() const
diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index 0015caf..2c63c67 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -80,10 +80,6 @@ PrintDialog::PrintPreviewWindow::PrintPreviewWindow( vcl::Window* i_pParent )
    maVertDim->SetText( OUString( "2.0in" ) );
}

PrintDialog::PrintPreviewWindow::~PrintPreviewWindow()
{
}

const sal_Int32 PrintDialog::PrintPreviewWindow::PREVIEW_BITMAP_WIDTH = 1600;

void PrintDialog::PrintPreviewWindow::DataChanged( const DataChangedEvent& i_rDCEvt )
@@ -310,10 +306,6 @@ PrintDialog::ShowNupOrderWindow::ShowNupOrderWindow( vcl::Window* i_pParent )
    ImplInitSettings();
}

PrintDialog::ShowNupOrderWindow::~ShowNupOrderWindow()
{
}

void PrintDialog::ShowNupOrderWindow::ImplInitSettings()
{
    SetBackground( Wallpaper( GetSettings().GetStyleSettings().GetFieldColor() ) );
@@ -719,6 +711,11 @@ PrintDialog::PrintDialog( vcl::Window* i_pParent, const std::shared_ptr<PrinterC

PrintDialog::~PrintDialog()
{
    dispose();
}

void PrintDialog::dispose()
{
    delete mpCustomOptionsUIBuilder;
}

diff --git a/vcl/source/window/split.cxx b/vcl/source/window/split.cxx
index 947dc98..bd4b3fec 100644
--- a/vcl/source/window/split.cxx
+++ b/vcl/source/window/split.cxx
@@ -151,8 +151,14 @@ Splitter::Splitter( vcl::Window* pParent, WinBits nStyle ) :

Splitter::~Splitter()
{
    dispose();
}

void Splitter::dispose()
{
    TaskPaneList *pTList = GetSystemWindow()->GetTaskPaneList();
    pTList->RemoveWindow( this );
    Window::dispose();
}

void Splitter::SetHorizontal(bool bNew)
diff --git a/vcl/source/window/splitwin.cxx b/vcl/source/window/splitwin.cxx
index 86db812..9f63ae3 100644
--- a/vcl/source/window/splitwin.cxx
+++ b/vcl/source/window/splitwin.cxx
@@ -1347,9 +1347,15 @@ SplitWindow::SplitWindow( vcl::Window* pParent, WinBits nStyle ) :

SplitWindow::~SplitWindow()
{
    dispose();
}

void SplitWindow::dispose()
{
    // delete Sets
    ImplDeleteSet( mpMainSet );
    mpMainSet = NULL; //NULL for base-class callbacks during dtoring
    DockingWindow::dispose();
}

void SplitWindow::ImplSetWindowSize( long nDelta )
diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx
index bca642e23..15db5b5 100644
--- a/vcl/source/window/status.cxx
+++ b/vcl/source/window/status.cxx
@@ -151,6 +151,11 @@ StatusBar::StatusBar( vcl::Window* pParent, WinBits nStyle ) :

StatusBar::~StatusBar()
{
    dispose();
}

void StatusBar::dispose()
{
    // delete all items
    for ( size_t i = 0, n = mpItemList->size(); i < n; ++i ) {
        delete (*mpItemList)[ i ];
@@ -160,6 +165,7 @@ StatusBar::~StatusBar()
    // delete VirtualDevice
    delete mpImplData->mpVirDev;
    delete mpImplData;
    Window::dispose();
}

void StatusBar::AdjustItemWidthsForHiDPI(bool bAdjustHiDPI)
diff --git a/vcl/source/window/tabdlg.cxx b/vcl/source/window/tabdlg.cxx
index f15a2a0..9612ada 100644
--- a/vcl/source/window/tabdlg.cxx
+++ b/vcl/source/window/tabdlg.cxx
@@ -221,7 +221,13 @@ TabDialog::TabDialog( vcl::Window* pParent, const OUString& rID, const OUString&

TabDialog::~TabDialog()
{
    dispose();
}

void TabDialog::dispose()
{
    delete mpFixedLine;
    Dialog::dispose();
}

void TabDialog::StateChanged( StateChangedType nType )
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index 7cf7a23..f0da66c 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -1570,6 +1570,11 @@ ToolBox::ToolBox( vcl::Window* pParent, const ResId& rResId ) :

ToolBox::~ToolBox()
{
    dispose();
}

void ToolBox::dispose()
{
    // custom menu event still running?
    if( mpData->mnEventId )
        Application::RemoveUserEvent( mpData->mnEventId );
@@ -1601,6 +1606,7 @@ ToolBox::~ToolBox()
            pSVData->maCtrlData.mpTBDragMgr = NULL;
        }
    }
    DockingWindow::dispose();
}

ImplToolItem* ToolBox::ImplGetItem( sal_uInt16 nItemId ) const
diff --git a/vcl/unx/generic/app/i18n_status.cxx b/vcl/unx/generic/app/i18n_status.cxx
index b779c52..fb49388 100644
--- a/vcl/unx/generic/app/i18n_status.cxx
+++ b/vcl/unx/generic/app/i18n_status.cxx
@@ -52,7 +52,6 @@ class StatusWindow : public WorkWindow
protected:
    StatusWindow( WinBits nWinBits );
public:
    virtual ~StatusWindow();

    virtual void setPosition( SalFrame* );
    virtual void setText( const OUString & ) = 0;
@@ -67,8 +66,6 @@ StatusWindow::StatusWindow( WinBits nWinBits ) :
{
}

StatusWindow::~StatusWindow() {}

void StatusWindow::setPosition( SalFrame* )
{
}
diff --git a/vcl/workben/outdevgrind.cxx b/vcl/workben/outdevgrind.cxx
index 528eae3..72869d1 100644
--- a/vcl/workben/outdevgrind.cxx
+++ b/vcl/workben/outdevgrind.cxx
@@ -72,7 +72,6 @@ class TestWindow : public Dialog
            Show();
        }

        virtual ~TestWindow() {}
        virtual void Paint( const Rectangle& rRect ) SAL_OVERRIDE;
};

diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx
index f272ccb..9860d7d 100644
--- a/vcl/workben/vcldemo.cxx
+++ b/vcl/workben/vcldemo.cxx
@@ -1385,8 +1385,13 @@ public:
    }
    virtual ~DemoWin()
    {
        dispose();
    }
    virtual void dispose() SAL_OVERRIDE
    {
        mxThread.clear();
        mrRenderer.removeInvalidate(this);
        WorkWindow::dispose();
    }
    virtual void MouseButtonDown(const MouseEvent& rMEvt) SAL_OVERRIDE
    {
@@ -1477,14 +1482,6 @@ public:

        Show();
    }

    virtual ~DemoWidgets()
    {
        delete mpButton;
        delete mpToolbox;
        delete mpBox;
    }

    virtual void Paint(const Rectangle&) SAL_OVERRIDE
    {
        Rectangle aWholeSize(Point(0, 0),GetOutputSizePixel());