diff options
author | Noel Grandin <noel@peralex.com> | 2015-03-10 09:07:06 +0200 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2015-04-10 10:55:36 +0100 |
commit | d7a84ce8406096b455d81f50cd50ca2e877adc06 (patch) | |
tree | b1dd2b5a4860cf2c9664e2ff3087b8dbb9db7576 /reportdesign | |
parent | Audit and correct misc. clears -> disposeAndClears. (diff) | |
download | core-d7a84ce8406096b455d81f50cd50ca2e877adc06.tar.gz core-d7a84ce8406096b455d81f50cd50ca2e877adc06.zip |
vclwidget: only call dispose() once
by using a new utility method in vcl::Window
This means that we don't have to make all our dispose
methods safe to call more than once.
Change-Id: I2110c7de4a86c70fdc97dd8fd318c86b56865374
Diffstat (limited to 'reportdesign')
-rw-r--r-- | reportdesign/source/ui/dlg/AddField.cxx | 4 | ||||
-rw-r--r-- | reportdesign/source/ui/dlg/CondFormat.cxx | 2 | ||||
-rw-r--r-- | reportdesign/source/ui/dlg/Condition.cxx | 4 | ||||
-rw-r--r-- | reportdesign/source/ui/dlg/DateTime.cxx | 2 | ||||
-rw-r--r-- | reportdesign/source/ui/dlg/Formula.cxx | 2 | ||||
-rw-r--r-- | reportdesign/source/ui/dlg/GroupsSorting.cxx | 4 | ||||
-rw-r--r-- | reportdesign/source/ui/dlg/Navigator.cxx | 2 | ||||
-rw-r--r-- | reportdesign/source/ui/dlg/PageNumber.cxx | 2 | ||||
-rw-r--r-- | reportdesign/source/ui/inc/ColorListener.hxx | 1 | ||||
-rw-r--r-- | reportdesign/source/ui/misc/ColorListener.cxx | 6 | ||||
-rw-r--r-- | reportdesign/source/ui/report/DesignView.cxx | 4 | ||||
-rw-r--r-- | reportdesign/source/ui/report/ReportSection.cxx | 2 | ||||
-rw-r--r-- | reportdesign/source/ui/report/ReportWindow.cxx | 2 | ||||
-rw-r--r-- | reportdesign/source/ui/report/ScrollHelper.cxx | 2 | ||||
-rw-r--r-- | reportdesign/source/ui/report/SectionWindow.cxx | 2 | ||||
-rw-r--r-- | reportdesign/source/ui/report/StartMarker.cxx | 2 | ||||
-rw-r--r-- | reportdesign/source/ui/report/ViewsWindow.cxx | 2 | ||||
-rw-r--r-- | reportdesign/source/ui/report/propbrw.cxx | 2 |
18 files changed, 27 insertions, 20 deletions
diff --git a/reportdesign/source/ui/dlg/AddField.cxx b/reportdesign/source/ui/dlg/AddField.cxx index 0a36669aa06a..7fdfaea91b92 100644 --- a/reportdesign/source/ui/dlg/AddField.cxx +++ b/reportdesign/source/ui/dlg/AddField.cxx @@ -114,7 +114,7 @@ OAddFieldWindowListBox::OAddFieldWindowListBox( OAddFieldWindow* _pParent ) OAddFieldWindowListBox::~OAddFieldWindowListBox() { - dispose(); + disposeOnce(); } void OAddFieldWindowListBox::dispose() @@ -216,7 +216,7 @@ OAddFieldWindow::OAddFieldWindow(vcl::Window* pParent OAddFieldWindow::~OAddFieldWindow() { - dispose(); + disposeOnce(); } void OAddFieldWindow::dispose() diff --git a/reportdesign/source/ui/dlg/CondFormat.cxx b/reportdesign/source/ui/dlg/CondFormat.cxx index c537b0a3b3ba..ddd8ea1f8bf7 100644 --- a/reportdesign/source/ui/dlg/CondFormat.cxx +++ b/reportdesign/source/ui/dlg/CondFormat.cxx @@ -130,7 +130,7 @@ namespace rptui ConditionalFormattingDialog::~ConditionalFormattingDialog() { - dispose(); + disposeOnce(); } void ConditionalFormattingDialog::dispose() diff --git a/reportdesign/source/ui/dlg/Condition.cxx b/reportdesign/source/ui/dlg/Condition.cxx index bc60825e71ab..dacc9ce42c12 100644 --- a/reportdesign/source/ui/dlg/Condition.cxx +++ b/reportdesign/source/ui/dlg/Condition.cxx @@ -156,7 +156,7 @@ OColorPopup::OColorPopup(vcl::Window* _pParent,Condition* _pCondition) OColorPopup::~OColorPopup() { - dispose(); + disposeOnce(); } void OColorPopup::dispose() @@ -309,7 +309,7 @@ sal_uInt16 Condition::mapToolbarItemToSlotId(sal_uInt16 nItemId) const Condition::~Condition() { - dispose(); + disposeOnce(); } void Condition::dispose() diff --git a/reportdesign/source/ui/dlg/DateTime.cxx b/reportdesign/source/ui/dlg/DateTime.cxx index b768e17be432..caad1e3bf1aa 100644 --- a/reportdesign/source/ui/dlg/DateTime.cxx +++ b/reportdesign/source/ui/dlg/DateTime.cxx @@ -113,7 +113,7 @@ ODateTimeDialog::ODateTimeDialog( vcl::Window* _pParent ODateTimeDialog::~ODateTimeDialog() { - dispose(); + disposeOnce(); } void ODateTimeDialog::dispose() diff --git a/reportdesign/source/ui/dlg/Formula.cxx b/reportdesign/source/ui/dlg/Formula.cxx index c59d778ba7e0..1c78e8a36337 100644 --- a/reportdesign/source/ui/dlg/Formula.cxx +++ b/reportdesign/source/ui/dlg/Formula.cxx @@ -87,7 +87,7 @@ void FormulaDialog::fill() FormulaDialog::~FormulaDialog() { - dispose(); + disposeOnce(); } void FormulaDialog::dispose() diff --git a/reportdesign/source/ui/dlg/GroupsSorting.cxx b/reportdesign/source/ui/dlg/GroupsSorting.cxx index 2b51436d9ca6..b80b81dbae09 100644 --- a/reportdesign/source/ui/dlg/GroupsSorting.cxx +++ b/reportdesign/source/ui/dlg/GroupsSorting.cxx @@ -214,7 +214,7 @@ OFieldExpressionControl::OFieldExpressionControl(OGroupsSortingDialog* _pParentD OFieldExpressionControl::~OFieldExpressionControl() { - dispose(); + disposeOnce(); } @@ -1010,7 +1010,7 @@ OGroupsSortingDialog::OGroupsSortingDialog(vcl::Window* _pParent, bool _bReadOnl OGroupsSortingDialog::~OGroupsSortingDialog() { - dispose(); + disposeOnce(); } void OGroupsSortingDialog::dispose() diff --git a/reportdesign/source/ui/dlg/Navigator.cxx b/reportdesign/source/ui/dlg/Navigator.cxx index bef13a2d5938..fb898fed9060 100644 --- a/reportdesign/source/ui/dlg/Navigator.cxx +++ b/reportdesign/source/ui/dlg/Navigator.cxx @@ -256,7 +256,7 @@ NavigatorTree::NavigatorTree( vcl::Window* pParent,OReportController& _rControll NavigatorTree::~NavigatorTree() { - dispose(); + disposeOnce(); } void NavigatorTree::dispose() diff --git a/reportdesign/source/ui/dlg/PageNumber.cxx b/reportdesign/source/ui/dlg/PageNumber.cxx index 08672e1c50c1..f7a799a53832 100644 --- a/reportdesign/source/ui/dlg/PageNumber.cxx +++ b/reportdesign/source/ui/dlg/PageNumber.cxx @@ -63,7 +63,7 @@ OPageNumberDialog::OPageNumberDialog( vcl::Window* _pParent OPageNumberDialog::~OPageNumberDialog() { - dispose(); + disposeOnce(); } void OPageNumberDialog::dispose() diff --git a/reportdesign/source/ui/inc/ColorListener.hxx b/reportdesign/source/ui/inc/ColorListener.hxx index e85da835e3df..c0ebffb83922 100644 --- a/reportdesign/source/ui/inc/ColorListener.hxx +++ b/reportdesign/source/ui/inc/ColorListener.hxx @@ -48,6 +48,7 @@ namespace rptui public: OColorListener(vcl::Window* _pParent,const OUString& _sColorEntry); virtual ~OColorListener(); + virtual void dispose() SAL_OVERRIDE; using Window::Notify; // SfxListener diff --git a/reportdesign/source/ui/misc/ColorListener.cxx b/reportdesign/source/ui/misc/ColorListener.cxx index 8bbd52dd88ad..abe070802e9b 100644 --- a/reportdesign/source/ui/misc/ColorListener.cxx +++ b/reportdesign/source/ui/misc/ColorListener.cxx @@ -40,7 +40,13 @@ OColorListener::OColorListener(vcl::Window* _pParent ,const OUString& _sColorEnt OColorListener::~OColorListener() { + disposeOnce(); +} + +void OColorListener::dispose() +{ EndListening(m_aExtendedColorConfig); + vcl::Window::dispose(); } void OColorListener::Notify(SfxBroadcaster & /*rBc*/, SfxHint const & rHint) diff --git a/reportdesign/source/ui/report/DesignView.cxx b/reportdesign/source/ui/report/DesignView.cxx index bcf3890c9190..9d15fa38ee41 100644 --- a/reportdesign/source/ui/report/DesignView.cxx +++ b/reportdesign/source/ui/report/DesignView.cxx @@ -62,7 +62,7 @@ class OTaskWindow : public vcl::Window VclPtr<PropBrw> m_pPropWin; public: OTaskWindow(vcl::Window* _pParent) : Window(_pParent),m_pPropWin(NULL){} - virtual ~OTaskWindow() { dispose(); } + virtual ~OTaskWindow() { disposeOnce(); } virtual void dispose() SAL_OVERRIDE { m_pPropWin.clear(); vcl::Window::dispose(); } inline void setPropertyBrowser(PropBrw* _pPropWin) @@ -127,7 +127,7 @@ ODesignView::ODesignView( vcl::Window* pParent, ODesignView::~ODesignView() { - dispose(); + disposeOnce(); } void ODesignView::dispose() diff --git a/reportdesign/source/ui/report/ReportSection.cxx b/reportdesign/source/ui/report/ReportSection.cxx index b4716cb0052b..22a1d986e98d 100644 --- a/reportdesign/source/ui/report/ReportSection.cxx +++ b/reportdesign/source/ui/report/ReportSection.cxx @@ -111,7 +111,7 @@ OReportSection::OReportSection(OSectionWindow* _pParent,const uno::Reference< re OReportSection::~OReportSection() { - dispose(); + disposeOnce(); } void OReportSection::dispose() diff --git a/reportdesign/source/ui/report/ReportWindow.cxx b/reportdesign/source/ui/report/ReportWindow.cxx index 10b69e75c3e8..25097bf5446a 100644 --- a/reportdesign/source/ui/report/ReportWindow.cxx +++ b/reportdesign/source/ui/report/ReportWindow.cxx @@ -85,7 +85,7 @@ OReportWindow::OReportWindow(OScrollWindowHelper* _pParent,ODesignView* _pView) OReportWindow::~OReportWindow() { - dispose(); + disposeOnce(); } void OReportWindow::dispose() diff --git a/reportdesign/source/ui/report/ScrollHelper.cxx b/reportdesign/source/ui/report/ScrollHelper.cxx index 6641ad23a705..7185223871bf 100644 --- a/reportdesign/source/ui/report/ScrollHelper.cxx +++ b/reportdesign/source/ui/report/ScrollHelper.cxx @@ -69,7 +69,7 @@ OScrollWindowHelper::OScrollWindowHelper( ODesignView* _pDesignView) OScrollWindowHelper::~OScrollWindowHelper() { - dispose(); + disposeOnce(); } void OScrollWindowHelper::dispose() diff --git a/reportdesign/source/ui/report/SectionWindow.cxx b/reportdesign/source/ui/report/SectionWindow.cxx index 8edd7466b6d1..37a22873d296 100644 --- a/reportdesign/source/ui/report/SectionWindow.cxx +++ b/reportdesign/source/ui/report/SectionWindow.cxx @@ -100,7 +100,7 @@ OSectionWindow::OSectionWindow( OViewsWindow* _pParent,const uno::Reference< rep OSectionWindow::~OSectionWindow() { - dispose(); + disposeOnce(); } void OSectionWindow::dispose() diff --git a/reportdesign/source/ui/report/StartMarker.cxx b/reportdesign/source/ui/report/StartMarker.cxx index 1ada64e1677d..06ae171a2baf 100644 --- a/reportdesign/source/ui/report/StartMarker.cxx +++ b/reportdesign/source/ui/report/StartMarker.cxx @@ -80,7 +80,7 @@ OStartMarker::OStartMarker(OSectionWindow* _pParent,const OUString& _sColorEntry OStartMarker::~OStartMarker() { - dispose(); + disposeOnce(); } void OStartMarker::dispose() diff --git a/reportdesign/source/ui/report/ViewsWindow.cxx b/reportdesign/source/ui/report/ViewsWindow.cxx index 9ca2c79e134e..b8e159fd9c97 100644 --- a/reportdesign/source/ui/report/ViewsWindow.cxx +++ b/reportdesign/source/ui/report/ViewsWindow.cxx @@ -185,7 +185,7 @@ OViewsWindow::OViewsWindow( OReportWindow* _pReportWindow) OViewsWindow::~OViewsWindow() { - dispose(); + disposeOnce(); } void OViewsWindow::dispose() diff --git a/reportdesign/source/ui/report/propbrw.cxx b/reportdesign/source/ui/report/propbrw.cxx index ef019a79ce33..426c612c9e94 100644 --- a/reportdesign/source/ui/report/propbrw.cxx +++ b/reportdesign/source/ui/report/propbrw.cxx @@ -185,7 +185,7 @@ PropBrw::PropBrw(const Reference< XComponentContext >& _xORB, vcl::Window* pPare PropBrw::~PropBrw() { - dispose(); + disposeOnce(); } void PropBrw::dispose() |