summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-01-26 13:26:36 +0200
committerMichael Meeks <michael.meeks@collabora.com>2015-04-09 22:05:20 +0100
commitb3dcb2996b70caabda1939c9e85545c97d78404a (patch)
tree0a8c8db9cfe053f61e90c100b7ebad7fe72605b2
parentef22212ecb813ce5c822cfbb7b1da7b4860128ef (diff)
vcl: some VclPtr fixes found by the new plugin code
Change-Id: Ib4f591aaa88d8710fdb9b672533cfa8bb024160f
-rw-r--r--include/vcl/dialog.hxx2
-rw-r--r--include/vcl/layout.hxx2
-rw-r--r--svtools/source/toolpanel/toolpaneldrawer.cxx9
-rw-r--r--svtools/source/toolpanel/toolpaneldrawer.hxx2
-rw-r--r--svx/source/sidebar/EmptyPanel.cxx1
-rw-r--r--svx/source/sidebar/text/TextUnderlineControl.cxx12
-rw-r--r--svx/source/sidebar/text/TextUnderlineControl.hxx2
-rw-r--r--svx/source/tbxctrls/grafctrl.cxx2
-rw-r--r--vcl/source/control/edit.cxx1
9 files changed, 31 insertions, 2 deletions
diff --git a/include/vcl/dialog.hxx b/include/vcl/dialog.hxx
index 95afb6acdbf4..e5a895fdba6e 100644
--- a/include/vcl/dialog.hxx
+++ b/include/vcl/dialog.hxx
@@ -62,7 +62,6 @@ private:
protected:
using Window::ImplInit;
SAL_DLLPRIVATE void ImplInit( vcl::Window* pParent, WinBits nStyle );
- virtual void dispose() SAL_OVERRIDE;
public:
SAL_DLLPRIVATE bool IsInClose() const { return mbInClose; }
@@ -83,6 +82,7 @@ public:
explicit Dialog( vcl::Window* pParent, WinBits nStyle = WB_STDDIALOG );
explicit Dialog( vcl::Window* pParent, const OUString& rID, const OUString& rUIXMLDescription );
virtual ~Dialog();
+ virtual void dispose() SAL_OVERRIDE;
virtual bool Notify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
virtual void StateChanged( StateChangedType nStateChange ) SAL_OVERRIDE;
diff --git a/include/vcl/layout.hxx b/include/vcl/layout.hxx
index fde760953db0..1f8555675f53 100644
--- a/include/vcl/layout.hxx
+++ b/include/vcl/layout.hxx
@@ -572,7 +572,7 @@ protected:
DECL_LINK(ScrollBarHdl, void *);
void InitScrollBars(const Size &rRequest);
virtual bool Notify(NotifyEvent& rNEvt) SAL_OVERRIDE;
- void dispose() SAL_OVERRIDE { m_pVScroll.disposeAndClear(); m_pHScroll.disposeAndClear(); VclBin::dispose(); }
+ void dispose() SAL_OVERRIDE { m_pVScroll.disposeAndClear(); m_pHScroll.disposeAndClear(); m_aScrollBarBox.disposeAndClear(); VclBin::dispose(); }
private:
bool m_bUserManagedScrolling;
VclPtr<ScrollBar> m_pVScroll;
diff --git a/svtools/source/toolpanel/toolpaneldrawer.cxx b/svtools/source/toolpanel/toolpaneldrawer.cxx
index 02ae7b230b53..475117ddb941 100644
--- a/svtools/source/toolpanel/toolpaneldrawer.cxx
+++ b/svtools/source/toolpanel/toolpaneldrawer.cxx
@@ -87,7 +87,16 @@ namespace svt
m_aVisualization->SetAccessibleDescription( i_rTitle );
}
+ ToolPanelDrawer::~ToolPanelDrawer()
+ {
+ dispose();
+ }
+ void ToolPanelDrawer::dispose()
+ {
+ m_aVisualization.disposeAndClear();
+ vcl::Window::dispose();
+ }
long ToolPanelDrawer::GetPreferredHeightPixel() const
{
diff --git a/svtools/source/toolpanel/toolpaneldrawer.hxx b/svtools/source/toolpanel/toolpaneldrawer.hxx
index a1d1a94da517..1f66263d0dea 100644
--- a/svtools/source/toolpanel/toolpaneldrawer.hxx
+++ b/svtools/source/toolpanel/toolpaneldrawer.hxx
@@ -63,6 +63,8 @@ namespace svt
{
public:
ToolPanelDrawer( vcl::Window& i_rParent, const OUString& i_rTitle );
+ virtual ~ToolPanelDrawer();
+ virtual void dispose() SAL_OVERRIDE;
long GetPreferredHeightPixel() const;
void SetExpanded( const bool i_bExpanded );
diff --git a/svx/source/sidebar/EmptyPanel.cxx b/svx/source/sidebar/EmptyPanel.cxx
index 3a25381a1937..e1639bfb273c 100644
--- a/svx/source/sidebar/EmptyPanel.cxx
+++ b/svx/source/sidebar/EmptyPanel.cxx
@@ -53,6 +53,7 @@ EmptyPanel::~EmptyPanel()
void EmptyPanel::dispose()
{
+ maMessageControl.disposeAndClear();
Control::dispose();
}
diff --git a/svx/source/sidebar/text/TextUnderlineControl.cxx b/svx/source/sidebar/text/TextUnderlineControl.cxx
index 054fac065e5f..bb1caeda96a8 100644
--- a/svx/source/sidebar/text/TextUnderlineControl.cxx
+++ b/svx/source/sidebar/text/TextUnderlineControl.cxx
@@ -65,6 +65,18 @@ TextUnderlineControl::TextUnderlineControl (
FreeResource();
}
+TextUnderlineControl::~TextUnderlineControl()
+{
+ dispose();
+}
+
+void TextUnderlineControl::dispose()
+{
+ maVSUnderline.disposeAndClear();
+ maPBOptions.disposeAndClear();
+ svx::sidebar::PopupControl::dispose();
+}
+
void TextUnderlineControl::initial()
{
maVSUnderline->SetColor(GetSettings().GetStyleSettings().GetHighContrastMode() ?
diff --git a/svx/source/sidebar/text/TextUnderlineControl.hxx b/svx/source/sidebar/text/TextUnderlineControl.hxx
index 8f4192e46f20..441e15798eda 100644
--- a/svx/source/sidebar/text/TextUnderlineControl.hxx
+++ b/svx/source/sidebar/text/TextUnderlineControl.hxx
@@ -36,6 +36,8 @@ public:
vcl::Window* pParent,
svx::sidebar::TextPropertyPanel& rPanel,
SfxBindings* pBindings);
+ virtual ~TextUnderlineControl();
+ virtual void dispose() SAL_OVERRIDE;
void Rearrange(FontUnderline eLine);
private:
diff --git a/svx/source/tbxctrls/grafctrl.cxx b/svx/source/tbxctrls/grafctrl.cxx
index 99093aac9443..9eb9e5b5cce3 100644
--- a/svx/source/tbxctrls/grafctrl.cxx
+++ b/svx/source/tbxctrls/grafctrl.cxx
@@ -301,6 +301,8 @@ ImplGrafControl::~ImplGrafControl()
void ImplGrafControl::dispose()
{
+ maImage.disposeAndClear();
+ maField.disposeAndClear();
Control::dispose();
}
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index 5bab0dec6eb5..f041d80bae5a 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -280,6 +280,7 @@ void Edit::dispose()
SetType(WINDOW_WINDOW);
+ mpSubEdit.disposeAndClear();
Control::dispose();
}