diff options
Diffstat (limited to 'sw/source/uibase/sidebar')
-rw-r--r-- | sw/source/uibase/sidebar/PageColumnControl.cxx | 15 | ||||
-rw-r--r-- | sw/source/uibase/sidebar/PageColumnControl.hxx | 5 | ||||
-rw-r--r-- | sw/source/uibase/sidebar/PageMarginControl.cxx | 149 | ||||
-rw-r--r-- | sw/source/uibase/sidebar/PageMarginControl.hxx | 29 | ||||
-rw-r--r-- | sw/source/uibase/sidebar/PageOrientationControl.cxx | 8 | ||||
-rw-r--r-- | sw/source/uibase/sidebar/PageOrientationControl.hxx | 3 | ||||
-rw-r--r-- | sw/source/uibase/sidebar/PagePropertyPanel.cxx | 61 | ||||
-rw-r--r-- | sw/source/uibase/sidebar/PagePropertyPanel.hxx | 21 | ||||
-rw-r--r-- | sw/source/uibase/sidebar/PageSizeControl.cxx | 46 | ||||
-rw-r--r-- | sw/source/uibase/sidebar/PageSizeControl.hxx | 7 | ||||
-rw-r--r-- | sw/source/uibase/sidebar/StylePresetsPanel.cxx | 12 | ||||
-rw-r--r-- | sw/source/uibase/sidebar/StylePresetsPanel.hxx | 5 | ||||
-rw-r--r-- | sw/source/uibase/sidebar/SwPanelFactory.cxx | 12 | ||||
-rw-r--r-- | sw/source/uibase/sidebar/ThemePanel.cxx | 14 | ||||
-rw-r--r-- | sw/source/uibase/sidebar/ThemePanel.hxx | 9 | ||||
-rw-r--r-- | sw/source/uibase/sidebar/WrapPropertyPanel.cxx | 30 | ||||
-rw-r--r-- | sw/source/uibase/sidebar/WrapPropertyPanel.hxx | 22 |
17 files changed, 284 insertions, 164 deletions
diff --git a/sw/source/uibase/sidebar/PageColumnControl.cxx b/sw/source/uibase/sidebar/PageColumnControl.cxx index a8aa1223d6d7..4bec55f89fc3 100644 --- a/sw/source/uibase/sidebar/PageColumnControl.cxx +++ b/sw/source/uibase/sidebar/PageColumnControl.cxx @@ -38,7 +38,7 @@ PageColumnControl::PageColumnControl( const bool bLandscape ) : ::svx::sidebar::PopupControl( pParent, SW_RES(RID_POPUP_SWPAGE_COLUMN) ) , mpColumnValueSet( new ::svx::sidebar::ValueSetWithTextControl( ::svx::sidebar::ValueSetWithTextControl::IMAGE_TEXT, this, SW_RES(VS_COLUMN) ) ) - , maMoreButton( this, SW_RES(CB_COLUMN_MORE) ) + , maMoreButton( VclPtr<PushButton>::Create( this, SW_RES(CB_COLUMN_MORE) ) ) , mnColumnType( nColumnType ) , mrPagePropPanel(rPanel) { @@ -69,15 +69,22 @@ PageColumnControl::PageColumnControl( mpColumnValueSet->Format(); mpColumnValueSet->StartSelection(); - maMoreButton.SetClickHdl( LINK( this, PageColumnControl, MoreButtonClickHdl_Impl ) ); - maMoreButton.GrabFocus(); + maMoreButton->SetClickHdl( LINK( this, PageColumnControl, MoreButtonClickHdl_Impl ) ); + maMoreButton->GrabFocus(); FreeResource(); } PageColumnControl::~PageColumnControl() { - delete mpColumnValueSet; + disposeOnce(); +} + +void PageColumnControl::dispose() +{ + mpColumnValueSet.disposeAndClear(); + maMoreButton.disposeAndClear(); + ::svx::sidebar::PopupControl::dispose(); } IMPL_LINK(PageColumnControl, ImplColumnHdl, void *, pControl) diff --git a/sw/source/uibase/sidebar/PageColumnControl.hxx b/sw/source/uibase/sidebar/PageColumnControl.hxx index 508951a09670..79e22ccfd40f 100644 --- a/sw/source/uibase/sidebar/PageColumnControl.hxx +++ b/sw/source/uibase/sidebar/PageColumnControl.hxx @@ -45,10 +45,11 @@ public: const bool bLandscape ); virtual ~PageColumnControl(); + virtual void dispose() SAL_OVERRIDE; private: - ::svx::sidebar::ValueSetWithTextControl* mpColumnValueSet; - PushButton maMoreButton; + 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 4760baecfeaf..aee46d43e074 100644 --- a/sw/source/uibase/sidebar/PageMarginControl.cxx +++ b/sw/source/uibase/sidebar/PageMarginControl.cxx @@ -50,18 +50,18 @@ PageMarginControl::PageMarginControl( const SfxMapUnit eUnit ) : ::svx::sidebar::PopupControl( pParent, SW_RES(RID_POPUP_SWPAGE_MARGIN) ) , mpMarginValueSet( new ::svx::sidebar::ValueSetWithTextControl( ::svx::sidebar::ValueSetWithTextControl::IMAGE_TEXT, this, SW_RES(VS_MARGIN) ) ) - , maCustom(this, SW_RES(FT_CUSTOM)) - , maLeft(this, SW_RES(FT_LEFT)) - , maInner(this, SW_RES(FT_INNER)) - , maLeftMarginEdit(this, SW_RES(MF_SWLEFT_MARGIN)) - , maRight(this, SW_RES(FT_RIGHT)) - , maOuter(this, SW_RES(FT_OUTER)) - , maRightMarginEdit(this, SW_RES(MF_SWRIGHT_MARGIN)) - , maTop(this, SW_RES(FT_TOP)) - , maTopMarginEdit(this, SW_RES(MF_SWTOP_MARGIN)) - , maBottom(this, SW_RES(FT_BOTTOM)) - , maBottomMarginEdit(this, SW_RES(MF_SWBOTTOM_MARGIN)) - , maWidthHeightField( this, SW_RES(FLD_WIDTH_HEIGHT) ) + , maCustom(VclPtr<FixedText>::Create(this, SW_RES(FT_CUSTOM))) + , maLeft(VclPtr<FixedText>::Create(this, SW_RES(FT_LEFT))) + , maInner(VclPtr<FixedText>::Create(this, SW_RES(FT_INNER))) + , maLeftMarginEdit(VclPtr<MetricField>::Create(this, SW_RES(MF_SWLEFT_MARGIN))) + , maRight(VclPtr<FixedText>::Create(this, SW_RES(FT_RIGHT))) + , maOuter(VclPtr<FixedText>::Create(this, SW_RES(FT_OUTER))) + , maRightMarginEdit(VclPtr<MetricField>::Create(this, SW_RES(MF_SWRIGHT_MARGIN))) + , maTop(VclPtr<FixedText>::Create(this, SW_RES(FT_TOP))) + , maTopMarginEdit(VclPtr<MetricField>::Create(this, SW_RES(MF_SWTOP_MARGIN))) + , maBottom(VclPtr<FixedText>::Create(this, SW_RES(FT_BOTTOM))) + , maBottomMarginEdit(VclPtr<MetricField>::Create(this, SW_RES(MF_SWBOTTOM_MARGIN))) + , maWidthHeightField(VclPtr<MetricField>::Create( this, SW_RES(FLD_WIDTH_HEIGHT) ) ) , mnPageLeftMargin( aPageLRMargin.GetLeft() ) , mnPageRightMargin( aPageLRMargin.GetRight() ) , mnPageTopMargin( aPageULMargin.GetUpper() ) @@ -77,8 +77,8 @@ PageMarginControl::PageMarginControl( , mbCustomValuesUsed( false ) , mrPagePropPanel(rPanel) { - maWidthHeightField.Hide(); - SetFieldUnit( maWidthHeightField, eFUnit ); + maWidthHeightField->Hide(); + SetFieldUnit( *maWidthHeightField.get(), eFUnit ); mbUserCustomValuesAvailable = GetUserCustomValues(); @@ -93,39 +93,39 @@ PageMarginControl::PageMarginControl( SelectValueSetItem(); - SetFieldUnit( maLeftMarginEdit, eFUnit ); + SetFieldUnit( *maLeftMarginEdit.get(), eFUnit ); Link aLinkLR = LINK( this, PageMarginControl, ModifyLRMarginHdl ); - maLeftMarginEdit.SetModifyHdl( aLinkLR ); - SetMetricValue( maLeftMarginEdit, mnPageLeftMargin, meUnit ); + maLeftMarginEdit->SetModifyHdl( aLinkLR ); + SetMetricValue( *maLeftMarginEdit.get(), mnPageLeftMargin, meUnit ); - SetFieldUnit( maRightMarginEdit, eFUnit ); - maRightMarginEdit.SetModifyHdl( aLinkLR ); - SetMetricValue( maRightMarginEdit, mnPageRightMargin, meUnit ); + SetFieldUnit( *maRightMarginEdit.get(), eFUnit ); + maRightMarginEdit->SetModifyHdl( aLinkLR ); + SetMetricValue( *maRightMarginEdit.get(), mnPageRightMargin, meUnit ); Link aLinkUL = LINK( this, PageMarginControl, ModifyULMarginHdl ); - SetFieldUnit( maTopMarginEdit, eFUnit ); - maTopMarginEdit.SetModifyHdl( aLinkUL ); - SetMetricValue( maTopMarginEdit, mnPageTopMargin, meUnit ); + SetFieldUnit( *maTopMarginEdit.get(), eFUnit ); + maTopMarginEdit->SetModifyHdl( aLinkUL ); + SetMetricValue( *maTopMarginEdit.get(), mnPageTopMargin, meUnit ); - SetFieldUnit( maBottomMarginEdit, eFUnit ); - maBottomMarginEdit.SetModifyHdl( aLinkUL ); - SetMetricValue( maBottomMarginEdit, mnPageBottomMargin, meUnit ); + SetFieldUnit( *maBottomMarginEdit.get(), eFUnit ); + maBottomMarginEdit->SetModifyHdl( aLinkUL ); + SetMetricValue( *maBottomMarginEdit.get(), mnPageBottomMargin, meUnit ); SetMetricFieldMaxValues(rPageSize); if ( mbMirrored ) { - maLeft.Hide(); - maRight.Hide(); - maInner.Show(); - maOuter.Show(); + maLeft->Hide(); + maRight->Hide(); + maInner->Show(); + maOuter->Show(); } else { - maLeft.Show(); - maRight.Show(); - maInner.Hide(); - maOuter.Hide(); + maLeft->Show(); + maRight->Show(); + maInner->Hide(); + maOuter->Hide(); } FreeResource(); @@ -133,36 +133,55 @@ PageMarginControl::PageMarginControl( PageMarginControl::~PageMarginControl() { - delete mpMarginValueSet; + disposeOnce(); +} + +void PageMarginControl::dispose() +{ + mpMarginValueSet.disposeAndClear(); StoreUserCustomValues(); + + maCustom.disposeAndClear(); + maLeft.disposeAndClear(); + maInner.disposeAndClear(); + maLeftMarginEdit.disposeAndClear(); + maRight.disposeAndClear(); + maOuter.disposeAndClear(); + maRightMarginEdit.disposeAndClear(); + maTop.disposeAndClear(); + maTopMarginEdit.disposeAndClear(); + maBottom.disposeAndClear(); + maBottomMarginEdit.disposeAndClear(); + maWidthHeightField.disposeAndClear(); + ::svx::sidebar::PopupControl::dispose(); } void PageMarginControl::SetMetricFieldMaxValues(const Size& rPageSize) { - const long nML = maLeftMarginEdit.Denormalize( maLeftMarginEdit.GetValue(FUNIT_TWIP) ); - const long nMR = maRightMarginEdit.Denormalize( maRightMarginEdit.GetValue(FUNIT_TWIP) ); - const long nMT = maTopMarginEdit.Denormalize(maTopMarginEdit.GetValue(FUNIT_TWIP) ); - const long nMB = maBottomMarginEdit.Denormalize( maBottomMarginEdit.GetValue(FUNIT_TWIP) ); + const long nML = maLeftMarginEdit->Denormalize( maLeftMarginEdit->GetValue(FUNIT_TWIP) ); + const long nMR = maRightMarginEdit->Denormalize( maRightMarginEdit->GetValue(FUNIT_TWIP) ); + const long nMT = maTopMarginEdit->Denormalize(maTopMarginEdit->GetValue(FUNIT_TWIP) ); + const long nMB = maBottomMarginEdit->Denormalize( maBottomMarginEdit->GetValue(FUNIT_TWIP) ); const long nPH = LogicToLogic( rPageSize.Height(), (MapUnit)meUnit, MAP_TWIP ); const long nPW = LogicToLogic( rPageSize.Width(), (MapUnit)meUnit, MAP_TWIP ); // Left long nMax = nPW - nMR - MINBODY; - maLeftMarginEdit.SetMax(maLeftMarginEdit.Normalize(nMax), FUNIT_TWIP); + maLeftMarginEdit->SetMax(maLeftMarginEdit->Normalize(nMax), FUNIT_TWIP); // Right nMax = nPW - nML - MINBODY; - maRightMarginEdit.SetMax(maRightMarginEdit.Normalize(nMax), FUNIT_TWIP); + maRightMarginEdit->SetMax(maRightMarginEdit->Normalize(nMax), FUNIT_TWIP); //Top nMax = nPH - nMB - MINBODY; - maTopMarginEdit.SetMax(maTopMarginEdit.Normalize(nMax), FUNIT_TWIP); + maTopMarginEdit->SetMax(maTopMarginEdit->Normalize(nMax), FUNIT_TWIP); //Bottom nMax = nPH - nMT - MINBODY; - maBottomMarginEdit.SetMax(maTopMarginEdit.Normalize(nMax), FUNIT_TWIP); + maBottomMarginEdit->SetMax(maTopMarginEdit->Normalize(nMax), FUNIT_TWIP); } void PageMarginControl::FillValueSet( @@ -174,8 +193,8 @@ void PageMarginControl::FillValueSet( const OUString aTop = SW_RESSTR(STR_MARGIN_TOOLTIP_TOP); const OUString aBottom = SW_RESSTR(STR_MARGIN_TOOLTIP_BOT); - SetMetricValue( maWidthHeightField, SWPAGE_NARROW_VALUE, meUnit ); - const OUString aNarrowValText = maWidthHeightField.GetText(); + SetMetricValue( *maWidthHeightField.get(), SWPAGE_NARROW_VALUE, meUnit ); + const OUString aNarrowValText = maWidthHeightField->GetText(); OUString aHelpText = aLeft; aHelpText += aNarrowValText; aHelpText += aRight; @@ -188,8 +207,8 @@ void PageMarginControl::FillValueSet( Image((bLandscape) ? SW_RES(IMG_NARROW_L) : SW_RES(IMG_NARROW)), 0, SW_RESSTR(STR_NARROW), &aHelpText ); - SetMetricValue( maWidthHeightField, SWPAGE_NORMAL_VALUE, meUnit ); - const OUString aNormalValText = maWidthHeightField.GetText(); + SetMetricValue( *maWidthHeightField.get(), SWPAGE_NORMAL_VALUE, meUnit ); + const OUString aNormalValText = maWidthHeightField->GetText(); aHelpText = aLeft; aHelpText += aNormalValText; aHelpText += aRight; @@ -202,10 +221,10 @@ void PageMarginControl::FillValueSet( Image((bLandscape) ? SW_RES(IMG_NORMAL_L) : SW_RES(IMG_NORMAL)), 0, SW_RESSTR(STR_NORMAL), &aHelpText ); - SetMetricValue( maWidthHeightField, SWPAGE_WIDE_VALUE1, meUnit ); - const OUString aWide1ValText = maWidthHeightField.GetText(); - SetMetricValue( maWidthHeightField, SWPAGE_WIDE_VALUE2, meUnit ); - const OUString aWide2ValText = maWidthHeightField.GetText(); + SetMetricValue( *maWidthHeightField.get(), SWPAGE_WIDE_VALUE1, meUnit ); + const OUString aWide1ValText = maWidthHeightField->GetText(); + SetMetricValue( *maWidthHeightField.get(), SWPAGE_WIDE_VALUE2, meUnit ); + const OUString aWide2ValText = maWidthHeightField->GetText(); aHelpText = aLeft; aHelpText += aWide2ValText; aHelpText += aRight; @@ -221,8 +240,8 @@ void PageMarginControl::FillValueSet( const OUString aInner = SW_RESSTR(STR_MARGIN_TOOLTIP_INNER); const OUString aOuter = SW_RESSTR(STR_MARGIN_TOOLTIP_OUTER); - SetMetricValue( maWidthHeightField, SWPAGE_WIDE_VALUE3, meUnit ); - const OUString aWide3ValText = maWidthHeightField.GetText(); + SetMetricValue( *maWidthHeightField.get(), SWPAGE_WIDE_VALUE3, meUnit ); + const OUString aWide3ValText = maWidthHeightField->GetText(); aHelpText = aInner; aHelpText += aWide3ValText; aHelpText += aOuter; @@ -238,17 +257,17 @@ void PageMarginControl::FillValueSet( if ( bUserCustomValuesAvailable ) { aHelpText = mbUserCustomMirrored ? aInner : aLeft; - SetMetricValue( maWidthHeightField, mnUserCustomPageLeftMargin, meUnit ); - aHelpText += maWidthHeightField.GetText(); + SetMetricValue( *maWidthHeightField.get(), mnUserCustomPageLeftMargin, meUnit ); + aHelpText += maWidthHeightField->GetText(); aHelpText += mbUserCustomMirrored ? aOuter : aRight; - SetMetricValue( maWidthHeightField, mnUserCustomPageRightMargin, meUnit ); - aHelpText += maWidthHeightField.GetText(); + SetMetricValue( *maWidthHeightField.get(), mnUserCustomPageRightMargin, meUnit ); + aHelpText += maWidthHeightField->GetText(); aHelpText += aTop; - SetMetricValue( maWidthHeightField, mnUserCustomPageTopMargin, meUnit ); - aHelpText += maWidthHeightField.GetText(); + SetMetricValue( *maWidthHeightField.get(), mnUserCustomPageTopMargin, meUnit ); + aHelpText += maWidthHeightField->GetText(); aHelpText += aBottom; - SetMetricValue( maWidthHeightField, mnUserCustomPageBottomMargin, meUnit ); - aHelpText += maWidthHeightField.GetText(); + SetMetricValue( *maWidthHeightField.get(), mnUserCustomPageBottomMargin, meUnit ); + aHelpText += maWidthHeightField->GetText(); } else { @@ -389,8 +408,8 @@ IMPL_LINK( PageMarginControl, ModifyLRMarginHdl, MetricField *, EMPTYARG ) mpMarginValueSet->Format(); mpMarginValueSet->StartSelection(); - mnPageLeftMargin = GetCoreValue( maLeftMarginEdit, meUnit ); - mnPageRightMargin = GetCoreValue( maRightMarginEdit, meUnit ); + mnPageLeftMargin = GetCoreValue( *maLeftMarginEdit.get(), meUnit ); + mnPageRightMargin = GetCoreValue( *maRightMarginEdit.get(), meUnit ); mrPagePropPanel.ExecuteMarginLRChange( mnPageLeftMargin, mnPageRightMargin ); mbCustomValuesUsed = true; return 0; @@ -403,8 +422,8 @@ IMPL_LINK( PageMarginControl, ModifyULMarginHdl, MetricField *, EMPTYARG ) mpMarginValueSet->Format(); mpMarginValueSet->StartSelection(); - mnPageTopMargin = GetCoreValue( maTopMarginEdit, meUnit ); - mnPageBottomMargin = GetCoreValue( maBottomMarginEdit, meUnit ); + mnPageTopMargin = GetCoreValue( *maTopMarginEdit.get(), meUnit ); + mnPageBottomMargin = GetCoreValue( *maBottomMarginEdit.get(), meUnit ); mrPagePropPanel.ExecuteMarginULChange( mnPageTopMargin, mnPageBottomMargin ); mbCustomValuesUsed = true; return 0; diff --git a/sw/source/uibase/sidebar/PageMarginControl.hxx b/sw/source/uibase/sidebar/PageMarginControl.hxx index 6a0af3c4bea0..f6d8d28cef61 100644 --- a/sw/source/uibase/sidebar/PageMarginControl.hxx +++ b/sw/source/uibase/sidebar/PageMarginControl.hxx @@ -61,24 +61,25 @@ public: const FieldUnit eFUnit, const SfxMapUnit eUnit ); virtual ~PageMarginControl(); + virtual void dispose() SAL_OVERRIDE; private: - ::svx::sidebar::ValueSetWithTextControl* mpMarginValueSet; - - FixedText maCustom; - FixedText maLeft; - FixedText maInner; - MetricField maLeftMarginEdit; - FixedText maRight; - FixedText maOuter; - MetricField maRightMarginEdit; - FixedText maTop; - MetricField maTopMarginEdit; - FixedText maBottom; - MetricField maBottomMarginEdit; + VclPtr<::svx::sidebar::ValueSetWithTextControl> mpMarginValueSet; + + VclPtr<FixedText> maCustom; + VclPtr<FixedText> maLeft; + VclPtr<FixedText> maInner; + VclPtr<MetricField> maLeftMarginEdit; + VclPtr<FixedText> maRight; + VclPtr<FixedText> maOuter; + VclPtr<MetricField> maRightMarginEdit; + VclPtr<FixedText> maTop; + VclPtr<MetricField> maTopMarginEdit; + VclPtr<FixedText> maBottom; + VclPtr<MetricField> maBottomMarginEdit; // hidden metric field - MetricField maWidthHeightField; + VclPtr<MetricField> maWidthHeightField; long mnPageLeftMargin; long mnPageRightMargin; diff --git a/sw/source/uibase/sidebar/PageOrientationControl.cxx b/sw/source/uibase/sidebar/PageOrientationControl.cxx index 105eecccf13b..9e1b284a7328 100644 --- a/sw/source/uibase/sidebar/PageOrientationControl.cxx +++ b/sw/source/uibase/sidebar/PageOrientationControl.cxx @@ -63,7 +63,13 @@ PageOrientationControl::PageOrientationControl( PageOrientationControl::~PageOrientationControl() { - delete mpOrientationValueSet; + disposeOnce(); +} + +void PageOrientationControl::dispose() +{ + mpOrientationValueSet.disposeAndClear(); + ::svx::sidebar::PopupControl::dispose(); } IMPL_LINK(PageOrientationControl, ImplOrientationHdl, void *, pControl) diff --git a/sw/source/uibase/sidebar/PageOrientationControl.hxx b/sw/source/uibase/sidebar/PageOrientationControl.hxx index 15d7e785b2cc..2bf1f6773e72 100644 --- a/sw/source/uibase/sidebar/PageOrientationControl.hxx +++ b/sw/source/uibase/sidebar/PageOrientationControl.hxx @@ -38,9 +38,10 @@ public: PagePropertyPanel& rPanel, const bool bLandscape ); virtual ~PageOrientationControl(); + 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 ed4a66aeb3b1..48c7b5af3a2c 100644 --- a/sw/source/uibase/sidebar/PagePropertyPanel.cxx +++ b/sw/source/uibase/sidebar/PagePropertyPanel.cxx @@ -83,7 +83,7 @@ namespace { namespace sw { namespace sidebar { -PagePropertyPanel* PagePropertyPanel::Create ( +VclPtr<vcl::Window> PagePropertyPanel::Create ( vcl::Window* pParent, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame>& rxFrame, SfxBindings* pBindings) @@ -95,10 +95,13 @@ PagePropertyPanel* PagePropertyPanel::Create ( if (pBindings == NULL) throw ::com::sun::star::lang::IllegalArgumentException("no SfxBindings given to PagePropertyPanel::Create", NULL, 2); - return new PagePropertyPanel( - pParent, - rxFrame, - pBindings); + return VclPtr<vcl::Window>( + VclPtr<PagePropertyPanel>::Create( + + pParent, + rxFrame, + pBindings), + SAL_NO_ACQUIRE); } PagePropertyPanel::PagePropertyPanel( @@ -200,8 +203,34 @@ PagePropertyPanel::PagePropertyPanel( PagePropertyPanel::~PagePropertyPanel() { + disposeOnce(); +} + +void PagePropertyPanel::dispose() +{ delete[] maImgSize; + maImgSize = NULL; delete[] maImgSize_L; + maImgSize_L = NULL; + + mpPageItem.reset(); + mpPageLRMarginItem.reset(); + mpPageULMarginItem.reset(); + mpPageSizeItem.reset(); + + mpToolBoxOrientation.clear(); + mpToolBoxMargin.clear(); + mpToolBoxSize.clear(); + mpToolBoxColumn.clear(); + + m_aSwPagePgULControl.dispose(); + m_aSwPagePgLRControl.dispose(); + m_aSwPagePgSizeControl.dispose(); + m_aSwPagePgControl.dispose(); + m_aSwPageColControl.dispose(); + m_aSwPagePgMetricControl.dispose(); + + PanelLayout::dispose(); } void PagePropertyPanel::Initialize() @@ -266,9 +295,9 @@ void PagePropertyPanel::Initialize() mpBindings->Update( SID_ATTR_PAGE_SIZE ); } -::svx::sidebar::PopupControl* PagePropertyPanel::CreatePageOrientationControl( ::svx::sidebar::PopupContainer* pParent ) +VclPtr<::svx::sidebar::PopupControl> PagePropertyPanel::CreatePageOrientationControl( ::svx::sidebar::PopupContainer* pParent ) { - return new PageOrientationControl( pParent, *this , mpPageItem->IsLandscape() ); + return VclPtr<PageOrientationControl>::Create( pParent, *this , mpPageItem->IsLandscape() ); } IMPL_LINK( PagePropertyPanel, ClickOrientationHdl, ToolBox*, pToolBox ) @@ -343,9 +372,10 @@ void PagePropertyPanel::ClosePageOrientationPopup() maOrientationPopup.Hide(); } -::svx::sidebar::PopupControl* PagePropertyPanel::CreatePageMarginControl( ::svx::sidebar::PopupContainer* pParent ) +VclPtr<::svx::sidebar::PopupControl> PagePropertyPanel::CreatePageMarginControl( ::svx::sidebar::PopupContainer* pParent ) { - return new PageMarginControl( + return VclPtr<PageMarginControl>::Create( + pParent, *this, *mpPageLRMarginItem.get(), @@ -393,9 +423,10 @@ void PagePropertyPanel::ClosePageMarginPopup() maMarginPopup.Hide(); } -::svx::sidebar::PopupControl* PagePropertyPanel::CreatePageSizeControl( ::svx::sidebar::PopupContainer* pParent ) +VclPtr<::svx::sidebar::PopupControl> PagePropertyPanel::CreatePageSizeControl( ::svx::sidebar::PopupContainer* pParent ) { - return new PageSizeControl( + return VclPtr<PageSizeControl>::Create( + pParent, *this, mePaper, @@ -427,9 +458,10 @@ void PagePropertyPanel::ClosePageSizePopup() maSizePopup.Hide(); } -::svx::sidebar::PopupControl* PagePropertyPanel::CreatePageColumnControl( ::svx::sidebar::PopupContainer* pParent ) +VclPtr<::svx::sidebar::PopupControl> PagePropertyPanel::CreatePageColumnControl( ::svx::sidebar::PopupContainer* pParent ) { - return new PageColumnControl( + return VclPtr<PageColumnControl>::Create( + pParent, *this, mpPageColumnTypeItem->GetValue(), @@ -462,6 +494,9 @@ void PagePropertyPanel::NotifyItemUpdate( { (void)bIsEnabled; + if (IsDisposed()) + return; + switch( nSId ) { case SID_ATTR_PAGE_COLUMN: diff --git a/sw/source/uibase/sidebar/PagePropertyPanel.hxx b/sw/source/uibase/sidebar/PagePropertyPanel.hxx index 68e3bb3c074d..05119bf2b34a 100644 --- a/sw/source/uibase/sidebar/PagePropertyPanel.hxx +++ b/sw/source/uibase/sidebar/PagePropertyPanel.hxx @@ -55,7 +55,7 @@ namespace sw { namespace sidebar { public ::sfx2::sidebar::ControllerItem::ItemUpdateReceiverInterface { public: - static PagePropertyPanel* Create( + static VclPtr<vcl::Window> Create( vcl::Window* pParent, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame>& rxFrame, SfxBindings* pBindings ); @@ -72,11 +72,11 @@ namespace sw { namespace sidebar { return mpBindings; } - ::svx::sidebar::PopupControl* CreatePageOrientationControl( ::svx::sidebar::PopupContainer* pParent ); + VclPtr<::svx::sidebar::PopupControl> CreatePageOrientationControl( ::svx::sidebar::PopupContainer* pParent ); void ExecuteOrientationChange( const bool bLandscape ); void ClosePageOrientationPopup(); - ::svx::sidebar::PopupControl* CreatePageMarginControl( ::svx::sidebar::PopupContainer* pParent ); + VclPtr<::svx::sidebar::PopupControl> CreatePageMarginControl( ::svx::sidebar::PopupContainer* pParent ); void ExecuteMarginLRChange( const long nPageLeftMargin, const long nPageRightMargin ); @@ -86,31 +86,32 @@ namespace sw { namespace sidebar { void ExecutePageLayoutChange( const bool bMirrored ); void ClosePageMarginPopup(); - ::svx::sidebar::PopupControl* CreatePageSizeControl( ::svx::sidebar::PopupContainer* pParent ); + VclPtr<::svx::sidebar::PopupControl> CreatePageSizeControl( ::svx::sidebar::PopupContainer* pParent ); void ExecuteSizeChange( const Paper ePaper ); void ClosePageSizePopup(); - ::svx::sidebar::PopupControl* CreatePageColumnControl( ::svx::sidebar::PopupContainer* pParent ); + VclPtr<::svx::sidebar::PopupControl> CreatePageColumnControl( ::svx::sidebar::PopupContainer* pParent ); void ExecuteColumnChange( const sal_uInt16 nColumnType ); void ClosePageColumnPopup(); void StartUndo(); void EndUndo(); - private: PagePropertyPanel( vcl::Window* pParent, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame>& rxFrame, SfxBindings* pBindings ); + private: virtual ~PagePropertyPanel(); + virtual void dispose() SAL_OVERRIDE; 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 dedc35530ce8..bc9c0b9be335 100644 --- a/sw/source/uibase/sidebar/PageSizeControl.cxx +++ b/sw/source/uibase/sidebar/PageSizeControl.cxx @@ -43,14 +43,14 @@ PageSizeControl::PageSizeControl( const FieldUnit eFUnit ) : ::svx::sidebar::PopupControl( pParent, SW_RES(RID_POPUP_SWPAGE_SIZE) ) , mpSizeValueSet( new ::svx::sidebar::ValueSetWithTextControl( ::svx::sidebar::ValueSetWithTextControl::TEXT_TEXT, this, SW_RES(VS_SIZE) ) ) - , maMoreButton( this, SW_RES(CB_SIZE_MORE) ) - , maWidthHeightField( this, SW_RES(FLD_WIDTH_HEIGHT) ) + , maMoreButton( VclPtr<PushButton>::Create( this, SW_RES(CB_SIZE_MORE) ) ) + , maWidthHeightField( VclPtr<MetricField>::Create( this, SW_RES(FLD_WIDTH_HEIGHT) ) ) , mePaper( ePaper ) , maPaperList() , mrPagePropPanel(rPanel) { - maWidthHeightField.Hide(); - SetFieldUnit( maWidthHeightField, eFUnit ); + maWidthHeightField->Hide(); + SetFieldUnit( *maWidthHeightField.get(), eFUnit ); maPaperList.push_back( PAPER_A3 ); maPaperList.push_back( PAPER_A4 ); @@ -68,7 +68,7 @@ PageSizeControl::PageSizeControl( { OUString aMetricStr; { - const OUString aText = maWidthHeightField.GetText(); + const OUString aText = maWidthHeightField->GetText(); for (short i = aText.getLength() - 1; i >= 0; i--) { sal_Unicode c = aText[i]; @@ -86,7 +86,7 @@ PageSizeControl::PageSizeControl( } } - const LocaleDataWrapper& localeDataWrapper = maWidthHeightField.GetLocaleDataWrapper(); + const LocaleDataWrapper& localeDataWrapper = maWidthHeightField->GetLocaleDataWrapper(); OUString aWidthStr; OUString aHeightStr; OUString aItemText2; @@ -99,19 +99,19 @@ PageSizeControl::PageSizeControl( { Swap( aPaperSize ); } - maWidthHeightField.SetValue( maWidthHeightField.Normalize( aPaperSize.Width() ), FUNIT_TWIP ); + maWidthHeightField->SetValue( maWidthHeightField->Normalize( aPaperSize.Width() ), FUNIT_TWIP ); aWidthStr = localeDataWrapper.getNum( - maWidthHeightField.GetValue(), - maWidthHeightField.GetDecimalDigits(), - maWidthHeightField.IsUseThousandSep(), - maWidthHeightField.IsShowTrailingZeros() ); + maWidthHeightField->GetValue(), + maWidthHeightField->GetDecimalDigits(), + maWidthHeightField->IsUseThousandSep(), + maWidthHeightField->IsShowTrailingZeros() ); - maWidthHeightField.SetValue( maWidthHeightField.Normalize( aPaperSize.Height() ), FUNIT_TWIP); + maWidthHeightField->SetValue( maWidthHeightField->Normalize( aPaperSize.Height() ), FUNIT_TWIP); aHeightStr = localeDataWrapper.getNum( - maWidthHeightField.GetValue(), - maWidthHeightField.GetDecimalDigits(), - maWidthHeightField.IsUseThousandSep(), - maWidthHeightField.IsShowTrailingZeros() ); + maWidthHeightField->GetValue(), + maWidthHeightField->GetDecimalDigits(), + maWidthHeightField->IsUseThousandSep(), + maWidthHeightField->IsShowTrailingZeros() ); aItemText2 = aWidthStr + " x " + aHeightStr + " " + aMetricStr; @@ -135,15 +135,23 @@ PageSizeControl::PageSizeControl( mpSizeValueSet->Format(); mpSizeValueSet->StartSelection(); - maMoreButton.SetClickHdl( LINK( this, PageSizeControl, MoreButtonClickHdl_Impl ) ); - maMoreButton.GrabFocus(); + maMoreButton->SetClickHdl( LINK( this, PageSizeControl, MoreButtonClickHdl_Impl ) ); + maMoreButton->GrabFocus(); FreeResource(); } PageSizeControl::~PageSizeControl() { - delete mpSizeValueSet; + disposeOnce(); +} + +void PageSizeControl::dispose() +{ + mpSizeValueSet.disposeAndClear(); + maMoreButton.disposeAndClear(); + maWidthHeightField.disposeAndClear(); + ::svx::sidebar::PopupControl::dispose(); } IMPL_LINK(PageSizeControl, ImplSizeHdl, void *, pControl) diff --git a/sw/source/uibase/sidebar/PageSizeControl.hxx b/sw/source/uibase/sidebar/PageSizeControl.hxx index bd3e9f0ca1b8..91f63cea737f 100644 --- a/sw/source/uibase/sidebar/PageSizeControl.hxx +++ b/sw/source/uibase/sidebar/PageSizeControl.hxx @@ -48,12 +48,13 @@ public: const bool bLandscape, const FieldUnit eFUnit ); virtual ~PageSizeControl(); + virtual void dispose() SAL_OVERRIDE; private: - ::svx::sidebar::ValueSetWithTextControl* mpSizeValueSet; - PushButton maMoreButton; + VclPtr<::svx::sidebar::ValueSetWithTextControl> mpSizeValueSet; + VclPtr<PushButton> maMoreButton; // hidden metric field - MetricField maWidthHeightField; + VclPtr<MetricField> maWidthHeightField; Paper mePaper; ::std::vector< Paper > maPaperList; diff --git a/sw/source/uibase/sidebar/StylePresetsPanel.cxx b/sw/source/uibase/sidebar/StylePresetsPanel.cxx index ead31d610595..c180c383446f 100644 --- a/sw/source/uibase/sidebar/StylePresetsPanel.cxx +++ b/sw/source/uibase/sidebar/StylePresetsPanel.cxx @@ -43,7 +43,7 @@ namespace sw { namespace sidebar { -StylePresetsPanel* StylePresetsPanel::Create (vcl::Window* pParent, +VclPtr<vcl::Window> StylePresetsPanel::Create (vcl::Window* pParent, const css::uno::Reference<css::frame::XFrame>& rxFrame, SfxBindings* pBindings) { @@ -54,7 +54,7 @@ StylePresetsPanel* StylePresetsPanel::Create (vcl::Window* pParent, if (pBindings == NULL) throw css::lang::IllegalArgumentException("no SfxBindings given to PagePropertyPanel::Create", NULL, 2); - return new StylePresetsPanel(pParent, rxFrame, pBindings); + return VclPtr<vcl::Window>(new StylePresetsPanel(pParent, rxFrame, pBindings), SAL_NO_ACQUIRE); } StylePresetsPanel::StylePresetsPanel(vcl::Window* pParent, @@ -91,6 +91,14 @@ StylePresetsPanel::StylePresetsPanel(vcl::Window* pParent, StylePresetsPanel::~StylePresetsPanel() { + disposeOnce(); +} + +void StylePresetsPanel::dispose() +{ + mpListBox.disposeAndClear(); + + PanelLayout::dispose(); } IMPL_LINK_NOARG(StylePresetsPanel, DoubleClickHdl) diff --git a/sw/source/uibase/sidebar/StylePresetsPanel.hxx b/sw/source/uibase/sidebar/StylePresetsPanel.hxx index 9560da8a6919..047272ea87ca 100644 --- a/sw/source/uibase/sidebar/StylePresetsPanel.hxx +++ b/sw/source/uibase/sidebar/StylePresetsPanel.hxx @@ -42,7 +42,7 @@ class StylePresetsPanel : public PanelLayout, public sfx2::sidebar::ControllerItem::ItemUpdateReceiverInterface { public: - static StylePresetsPanel* Create(vcl::Window* pParent, + static VclPtr<vcl::Window> Create(vcl::Window* pParent, const css::uno::Reference<css::frame::XFrame>& rxFrame, SfxBindings* pBindings); @@ -73,10 +73,11 @@ private: SfxBindings* pBindings); virtual ~StylePresetsPanel(); + virtual void dispose() SAL_OVERRIDE; SfxBindings* mpBindings; - ListBox* mpListBox; + VclPtr<ListBox> mpListBox; std::vector<std::unique_ptr<TemplateEntry>> maTemplateEntries; diff --git a/sw/source/uibase/sidebar/SwPanelFactory.cxx b/sw/source/uibase/sidebar/SwPanelFactory.cxx index ea66e3b91ece..013519661a13 100644 --- a/sw/source/uibase/sidebar/SwPanelFactory.cxx +++ b/sw/source/uibase/sidebar/SwPanelFactory.cxx @@ -121,7 +121,7 @@ Reference<ui::XUIElement> SAL_CALL SwPanelFactory::createUIElement ( if (rsResourceURL.endsWith("/PagePropertyPanel")) { - sw::sidebar::PagePropertyPanel* pPanel = sw::sidebar::PagePropertyPanel::Create( pParentWindow, xFrame, pBindings ); + VclPtr<vcl::Window> pPanel = sw::sidebar::PagePropertyPanel::Create( pParentWindow, xFrame, pBindings ); xElement = sfx2::sidebar::SidebarPanelBase::Create( rsResourceURL, xFrame, @@ -130,7 +130,7 @@ Reference<ui::XUIElement> SAL_CALL SwPanelFactory::createUIElement ( } else if (rsResourceURL.endsWith("/WrapPropertyPanel")) { - sw::sidebar::WrapPropertyPanel* pPanel = sw::sidebar::WrapPropertyPanel::Create( pParentWindow, xFrame, pBindings ); + VclPtr<vcl::Window> pPanel = sw::sidebar::WrapPropertyPanel::Create( pParentWindow, xFrame, pBindings ); xElement = sfx2::sidebar::SidebarPanelBase::Create( rsResourceURL, xFrame, @@ -139,7 +139,7 @@ Reference<ui::XUIElement> SAL_CALL SwPanelFactory::createUIElement ( } else if (rsResourceURL.endsWith("/NavigatorPanel")) { - vcl::Window* pPanel = new SwNavigationPI(pBindings, NULL, pParentWindow); + VclPtr<vcl::Window> pPanel( new SwNavigationPI(pBindings, NULL, pParentWindow), SAL_NO_ACQUIRE ); xElement = sfx2::sidebar::SidebarPanelBase::Create( rsResourceURL, xFrame, @@ -148,7 +148,7 @@ Reference<ui::XUIElement> SAL_CALL SwPanelFactory::createUIElement ( } else if (rsResourceURL.endsWith("/ManageChangesPanel")) { - vcl::Window* pPanel = new SwRedlineAcceptPanel(pParentWindow, xFrame); + VclPtr<vcl::Window> pPanel( new SwRedlineAcceptPanel(pParentWindow, xFrame), SAL_NO_ACQUIRE ); xElement = sfx2::sidebar::SidebarPanelBase::Create( rsResourceURL, xFrame, @@ -157,13 +157,13 @@ Reference<ui::XUIElement> SAL_CALL SwPanelFactory::createUIElement ( } else if (rsResourceURL.endsWith("/StylePresetsPanel")) { - sw::sidebar::StylePresetsPanel* pPanel = sw::sidebar::StylePresetsPanel::Create(pParentWindow, xFrame, pBindings); + VclPtr<vcl::Window> pPanel = sw::sidebar::StylePresetsPanel::Create(pParentWindow, xFrame, pBindings); xElement = sfx2::sidebar::SidebarPanelBase::Create( rsResourceURL, xFrame, pPanel, ui::LayoutSize(-1,-1,-1)); } else if (rsResourceURL.endsWith("/ThemePanel")) { - sw::sidebar::ThemePanel* pPanel = sw::sidebar::ThemePanel::Create(pParentWindow, xFrame, pBindings); + VclPtr<vcl::Window> pPanel = sw::sidebar::ThemePanel::Create(pParentWindow, xFrame, pBindings); xElement = sfx2::sidebar::SidebarPanelBase::Create( rsResourceURL, xFrame, pPanel, ui::LayoutSize(-1,-1,-1)); } diff --git a/sw/source/uibase/sidebar/ThemePanel.cxx b/sw/source/uibase/sidebar/ThemePanel.cxx index 91abd8983dbe..a246a24ad57a 100644 --- a/sw/source/uibase/sidebar/ThemePanel.cxx +++ b/sw/source/uibase/sidebar/ThemePanel.cxx @@ -466,7 +466,7 @@ void applyTheme(SfxStyleSheetBasePool* pPool, const OUString& sFontSetName, cons namespace sw { namespace sidebar { -ThemePanel* ThemePanel::Create (vcl::Window* pParent, +VclPtr<vcl::Window> ThemePanel::Create (vcl::Window* pParent, const css::uno::Reference<css::frame::XFrame>& rxFrame, SfxBindings* pBindings) { @@ -477,7 +477,7 @@ ThemePanel* ThemePanel::Create (vcl::Window* pParent, if (pBindings == NULL) throw css::lang::IllegalArgumentException("no SfxBindings given to PagePropertyPanel::Create", NULL, 2); - return new ThemePanel(pParent, rxFrame, pBindings); + return VclPtr<vcl::Window>(new ThemePanel(pParent, rxFrame, pBindings), SAL_NO_ACQUIRE); } ThemePanel::ThemePanel(vcl::Window* pParent, @@ -509,6 +509,16 @@ ThemePanel::ThemePanel(vcl::Window* pParent, ThemePanel::~ThemePanel() { + disposeOnce(); +} + +void ThemePanel::dispose() +{ + mpListBoxFonts.clear(); + mpListBoxColors.clear(); + mpApplyButton.clear(); + + PanelLayout::dispose(); } IMPL_LINK_NOARG(ThemePanel, ClickHdl) diff --git a/sw/source/uibase/sidebar/ThemePanel.hxx b/sw/source/uibase/sidebar/ThemePanel.hxx index ed5c19df39f3..a14ac51de4ae 100644 --- a/sw/source/uibase/sidebar/ThemePanel.hxx +++ b/sw/source/uibase/sidebar/ThemePanel.hxx @@ -42,7 +42,7 @@ class ThemePanel : public PanelLayout, public sfx2::sidebar::ControllerItem::ItemUpdateReceiverInterface { public: - static ThemePanel* Create(vcl::Window* pParent, + static VclPtr<vcl::Window> Create(vcl::Window* pParent, const css::uno::Reference<css::frame::XFrame>& rxFrame, SfxBindings* pBindings); @@ -62,12 +62,13 @@ private: SfxBindings* pBindings); virtual ~ThemePanel(); + virtual void dispose() SAL_OVERRIDE; SfxBindings* mpBindings; - ListBox* mpListBoxFonts; - ListBox* mpListBoxColors; - PushButton* mpApplyButton; + VclPtr<ListBox> mpListBoxFonts; + VclPtr<ListBox> mpListBoxColors; + VclPtr<PushButton> mpApplyButton; DECL_LINK(ClickHdl, void*); }; 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() diff --git a/sw/source/uibase/sidebar/WrapPropertyPanel.hxx b/sw/source/uibase/sidebar/WrapPropertyPanel.hxx index d1c53394021f..bd1f27ad0931 100644 --- a/sw/source/uibase/sidebar/WrapPropertyPanel.hxx +++ b/sw/source/uibase/sidebar/WrapPropertyPanel.hxx @@ -35,7 +35,7 @@ namespace sw { namespace sidebar { , public ::sfx2::sidebar::ControllerItem::ItemUpdateReceiverInterface { public: - static WrapPropertyPanel* Create( + static VclPtr<vcl::Window> Create( vcl::Window* pParent, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame>& rxFrame, SfxBindings* pBindings ); @@ -47,23 +47,23 @@ namespace sw { namespace sidebar { const SfxPoolItem* pState, const bool bIsEnabled) SAL_OVERRIDE; - private: + virtual ~WrapPropertyPanel(); + virtual void dispose() SAL_OVERRIDE; + WrapPropertyPanel( vcl::Window* pParent, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxFrame, SfxBindings* pBindings ); - - virtual ~WrapPropertyPanel(); - + private: ::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; |