summaryrefslogtreecommitdiff
path: root/sw/source/uibase/sidebar
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/uibase/sidebar')
-rw-r--r--sw/source/uibase/sidebar/PageColumnControl.cxx2
-rw-r--r--sw/source/uibase/sidebar/PageColumnControl.hxx2
-rw-r--r--sw/source/uibase/sidebar/PageMarginControl.cxx2
-rw-r--r--sw/source/uibase/sidebar/PageMarginControl.hxx2
-rw-r--r--sw/source/uibase/sidebar/PageOrientationControl.cxx2
-rw-r--r--sw/source/uibase/sidebar/PageOrientationControl.hxx2
-rw-r--r--sw/source/uibase/sidebar/PagePropertyPanel.cxx4
-rw-r--r--sw/source/uibase/sidebar/PagePropertyPanel.hxx8
-rw-r--r--sw/source/uibase/sidebar/PageSizeControl.cxx2
-rw-r--r--sw/source/uibase/sidebar/PageSizeControl.hxx2
-rw-r--r--sw/source/uibase/sidebar/WrapPropertyPanel.cxx12
-rw-r--r--sw/source/uibase/sidebar/WrapPropertyPanel.hxx15
12 files changed, 36 insertions, 19 deletions
diff --git a/sw/source/uibase/sidebar/PageColumnControl.cxx b/sw/source/uibase/sidebar/PageColumnControl.cxx
index 703b4cee03f4..6e9c39f62f51 100644
--- a/sw/source/uibase/sidebar/PageColumnControl.cxx
+++ b/sw/source/uibase/sidebar/PageColumnControl.cxx
@@ -82,7 +82,7 @@ PageColumnControl::~PageColumnControl(void)
void PageColumnControl::dispose()
{
- delete mpColumnValueSet;
+ mpColumnValueSet.clear();
maMoreButton.disposeAndClear();
::svx::sidebar::PopupControl::dispose();
}
diff --git a/sw/source/uibase/sidebar/PageColumnControl.hxx b/sw/source/uibase/sidebar/PageColumnControl.hxx
index ef81b4d1dbb8..79e22ccfd40f 100644
--- a/sw/source/uibase/sidebar/PageColumnControl.hxx
+++ b/sw/source/uibase/sidebar/PageColumnControl.hxx
@@ -48,7 +48,7 @@ public:
virtual void dispose() SAL_OVERRIDE;
private:
- ::svx::sidebar::ValueSetWithTextControl* mpColumnValueSet;
+ VclPtr<::svx::sidebar::ValueSetWithTextControl> mpColumnValueSet;
VclPtr<PushButton> maMoreButton;
sal_uInt16 mnColumnType;
diff --git a/sw/source/uibase/sidebar/PageMarginControl.cxx b/sw/source/uibase/sidebar/PageMarginControl.cxx
index d0f71e6c4055..46eb3960b2f4 100644
--- a/sw/source/uibase/sidebar/PageMarginControl.cxx
+++ b/sw/source/uibase/sidebar/PageMarginControl.cxx
@@ -138,7 +138,7 @@ PageMarginControl::~PageMarginControl()
void PageMarginControl::dispose()
{
- delete mpMarginValueSet;
+ mpMarginValueSet.clear();
StoreUserCustomValues();
diff --git a/sw/source/uibase/sidebar/PageMarginControl.hxx b/sw/source/uibase/sidebar/PageMarginControl.hxx
index 8ab4c1b34917..f6d8d28cef61 100644
--- a/sw/source/uibase/sidebar/PageMarginControl.hxx
+++ b/sw/source/uibase/sidebar/PageMarginControl.hxx
@@ -64,7 +64,7 @@ public:
virtual void dispose() SAL_OVERRIDE;
private:
- ::svx::sidebar::ValueSetWithTextControl* mpMarginValueSet;
+ VclPtr<::svx::sidebar::ValueSetWithTextControl> mpMarginValueSet;
VclPtr<FixedText> maCustom;
VclPtr<FixedText> maLeft;
diff --git a/sw/source/uibase/sidebar/PageOrientationControl.cxx b/sw/source/uibase/sidebar/PageOrientationControl.cxx
index 96494e601220..c4d9357d0d4f 100644
--- a/sw/source/uibase/sidebar/PageOrientationControl.cxx
+++ b/sw/source/uibase/sidebar/PageOrientationControl.cxx
@@ -68,7 +68,7 @@ PageOrientationControl::~PageOrientationControl(void)
void PageOrientationControl::dispose()
{
- delete mpOrientationValueSet;
+ mpOrientationValueSet.clear();
::svx::sidebar::PopupControl::dispose();
}
diff --git a/sw/source/uibase/sidebar/PageOrientationControl.hxx b/sw/source/uibase/sidebar/PageOrientationControl.hxx
index 2f86a48df859..2bf1f6773e72 100644
--- a/sw/source/uibase/sidebar/PageOrientationControl.hxx
+++ b/sw/source/uibase/sidebar/PageOrientationControl.hxx
@@ -41,7 +41,7 @@ public:
virtual void dispose() SAL_OVERRIDE;
private:
- ::svx::sidebar::ValueSetWithTextControl* mpOrientationValueSet;
+ VclPtr<::svx::sidebar::ValueSetWithTextControl> mpOrientationValueSet;
bool mbLandscape;
diff --git a/sw/source/uibase/sidebar/PagePropertyPanel.cxx b/sw/source/uibase/sidebar/PagePropertyPanel.cxx
index 13db3215afb9..1ce8f61fe3af 100644
--- a/sw/source/uibase/sidebar/PagePropertyPanel.cxx
+++ b/sw/source/uibase/sidebar/PagePropertyPanel.cxx
@@ -215,6 +215,10 @@ void PagePropertyPanel::dispose()
mpPageULMarginItem.reset();
mpPageSizeItem.reset();
+ mpToolBoxOrientation.clear();
+ mpToolBoxMargin.clear();
+ mpToolBoxSize.clear();
+ mpToolBoxColumn.clear();
PanelLayout::dispose();
}
diff --git a/sw/source/uibase/sidebar/PagePropertyPanel.hxx b/sw/source/uibase/sidebar/PagePropertyPanel.hxx
index b2c0d6c16eed..f9dd2c09190b 100644
--- a/sw/source/uibase/sidebar/PagePropertyPanel.hxx
+++ b/sw/source/uibase/sidebar/PagePropertyPanel.hxx
@@ -108,10 +108,10 @@ namespace sw { namespace sidebar {
SfxBindings* mpBindings;
// toolboxes - on click open corresponding popup
- ToolBox* mpToolBoxOrientation;
- ToolBox* mpToolBoxMargin;
- ToolBox* mpToolBoxSize;
- ToolBox* mpToolBoxColumn;
+ VclPtr<ToolBox> mpToolBoxOrientation;
+ VclPtr<ToolBox> mpToolBoxMargin;
+ VclPtr<ToolBox> mpToolBoxSize;
+ VclPtr<ToolBox> mpToolBoxColumn;
Image* maImgSize;
Image* maImgSize_L;
diff --git a/sw/source/uibase/sidebar/PageSizeControl.cxx b/sw/source/uibase/sidebar/PageSizeControl.cxx
index 576350850aab..0906c8f02a2c 100644
--- a/sw/source/uibase/sidebar/PageSizeControl.cxx
+++ b/sw/source/uibase/sidebar/PageSizeControl.cxx
@@ -148,7 +148,7 @@ PageSizeControl::~PageSizeControl()
void PageSizeControl::dispose()
{
- delete mpSizeValueSet;
+ mpSizeValueSet.clear();
maMoreButton.disposeAndClear();
maWidthHeightField.disposeAndClear();
::svx::sidebar::PopupControl::dispose();
diff --git a/sw/source/uibase/sidebar/PageSizeControl.hxx b/sw/source/uibase/sidebar/PageSizeControl.hxx
index 5377655b556b..91f63cea737f 100644
--- a/sw/source/uibase/sidebar/PageSizeControl.hxx
+++ b/sw/source/uibase/sidebar/PageSizeControl.hxx
@@ -51,7 +51,7 @@ public:
virtual void dispose() SAL_OVERRIDE;
private:
- ::svx::sidebar::ValueSetWithTextControl* mpSizeValueSet;
+ VclPtr<::svx::sidebar::ValueSetWithTextControl> mpSizeValueSet;
VclPtr<PushButton> maMoreButton;
// hidden metric field
VclPtr<MetricField> maWidthHeightField;
diff --git a/sw/source/uibase/sidebar/WrapPropertyPanel.cxx b/sw/source/uibase/sidebar/WrapPropertyPanel.cxx
index 9c7204921934..d1fffd6b7029 100644
--- a/sw/source/uibase/sidebar/WrapPropertyPanel.cxx
+++ b/sw/source/uibase/sidebar/WrapPropertyPanel.cxx
@@ -89,6 +89,18 @@ WrapPropertyPanel::WrapPropertyPanel(
WrapPropertyPanel::~WrapPropertyPanel()
{
+ dispose();
+}
+
+void WrapPropertyPanel::dispose()
+{
+ mpRBNoWrap.clear();
+ mpRBWrapLeft.clear();
+ mpRBWrapRight.clear();
+ mpRBWrapParallel.clear();
+ mpRBWrapThrough.clear();
+ mpRBIdealWrap.clear();
+ PanelLayout::dispose();
}
void WrapPropertyPanel::Initialize()
diff --git a/sw/source/uibase/sidebar/WrapPropertyPanel.hxx b/sw/source/uibase/sidebar/WrapPropertyPanel.hxx
index d1c53394021f..c64b1331587b 100644
--- a/sw/source/uibase/sidebar/WrapPropertyPanel.hxx
+++ b/sw/source/uibase/sidebar/WrapPropertyPanel.hxx
@@ -47,23 +47,24 @@ namespace sw { namespace sidebar {
const SfxPoolItem* pState,
const bool bIsEnabled) SAL_OVERRIDE;
+ virtual ~WrapPropertyPanel();
+ virtual void dispose() SAL_OVERRIDE;
private:
WrapPropertyPanel(
vcl::Window* pParent,
const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxFrame,
SfxBindings* pBindings );
- virtual ~WrapPropertyPanel();
::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > mxFrame;
SfxBindings* mpBindings;
- RadioButton* mpRBNoWrap;
- RadioButton* mpRBWrapLeft;
- RadioButton* mpRBWrapRight;
- RadioButton* mpRBWrapParallel;
- RadioButton* mpRBWrapThrough;
- RadioButton* mpRBIdealWrap;
+ VclPtr<RadioButton> mpRBNoWrap;
+ VclPtr<RadioButton> mpRBWrapLeft;
+ VclPtr<RadioButton> mpRBWrapRight;
+ VclPtr<RadioButton> mpRBWrapParallel;
+ VclPtr<RadioButton> mpRBWrapThrough;
+ VclPtr<RadioButton> mpRBIdealWrap;
//Image resource.
ImageList aWrapIL;