diff options
Diffstat (limited to 'sw/source/uibase/sidebar/WrapPropertyPanel.cxx')
-rw-r--r-- | sw/source/uibase/sidebar/WrapPropertyPanel.cxx | 30 |
1 files changed, 25 insertions, 5 deletions
diff --git a/sw/source/uibase/sidebar/WrapPropertyPanel.cxx b/sw/source/uibase/sidebar/WrapPropertyPanel.cxx index 9c7204921934..2dfe37c4b8c6 100644 --- a/sw/source/uibase/sidebar/WrapPropertyPanel.cxx +++ b/sw/source/uibase/sidebar/WrapPropertyPanel.cxx @@ -42,7 +42,7 @@ const char UNO_WRAPIDEAL[] = ".uno:WrapIdeal"; namespace sw { namespace sidebar { -WrapPropertyPanel* WrapPropertyPanel::Create ( +VclPtr<vcl::Window> WrapPropertyPanel::Create ( vcl::Window* pParent, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxFrame, SfxBindings* pBindings) @@ -54,10 +54,10 @@ WrapPropertyPanel* WrapPropertyPanel::Create ( if (pBindings == NULL) throw ::com::sun::star::lang::IllegalArgumentException("no SfxBindings given to WrapPropertyPanel::Create", NULL, 2); - return new WrapPropertyPanel( - pParent, - rxFrame, - pBindings); + return VclPtr<WrapPropertyPanel>::Create( + pParent, + rxFrame, + pBindings); } WrapPropertyPanel::WrapPropertyPanel( @@ -89,6 +89,26 @@ WrapPropertyPanel::WrapPropertyPanel( WrapPropertyPanel::~WrapPropertyPanel() { + disposeOnce(); +} + +void WrapPropertyPanel::dispose() +{ + mpRBNoWrap.clear(); + mpRBWrapLeft.clear(); + mpRBWrapRight.clear(); + mpRBWrapParallel.clear(); + mpRBWrapThrough.clear(); + mpRBIdealWrap.clear(); + + maSwNoWrapControl.dispose(); + maSwWrapLeftControl.dispose(); + maSwWrapRightControl.dispose(); + maSwWrapParallelControl.dispose(); + maSwWrapThroughControl.dispose(); + maSwWrapIdealControl.dispose(); + + PanelLayout::dispose(); } void WrapPropertyPanel::Initialize() |