diff options
Diffstat (limited to 'sd/source/ui/dlg')
30 files changed, 503 insertions, 140 deletions
diff --git a/sd/source/ui/dlg/PaneChildWindows.cxx b/sd/source/ui/dlg/PaneChildWindows.cxx index 15908461a011..26606bc20e2b 100644 --- a/sd/source/ui/dlg/PaneChildWindows.cxx +++ b/sd/source/ui/dlg/PaneChildWindows.cxx @@ -62,7 +62,7 @@ PaneChildWindow::PaneChildWindow ( pParentWindow, SD_RESSTR(nTitleBarResId)); eChildAlignment = eAlignment; - static_cast<SfxDockingWindow*>(pWindow)->Initialize(pInfo); + static_cast<SfxDockingWindow*>(pWindow.get())->Initialize(pInfo); SetHideNotDelete(true); ViewShellBase* pBase = ViewShellBase::GetViewShellBase(pBindings->GetDispatcher()->GetFrame()); @@ -75,7 +75,7 @@ PaneChildWindow::PaneChildWindow ( PaneChildWindow::~PaneChildWindow (void) { ViewShellBase* pBase = NULL; - PaneDockingWindow* pDockingWindow = dynamic_cast<PaneDockingWindow*>(pWindow); + PaneDockingWindow* pDockingWindow = dynamic_cast<PaneDockingWindow*>(pWindow.get()); if (pDockingWindow != NULL) pBase = ViewShellBase::GetViewShellBase( pDockingWindow->GetBindings().GetDispatcher()->GetFrame()); diff --git a/sd/source/ui/dlg/PhotoAlbumDialog.cxx b/sd/source/ui/dlg/PhotoAlbumDialog.cxx index 4d75e6c8142c..5a81ddcf72db 100644 --- a/sd/source/ui/dlg/PhotoAlbumDialog.cxx +++ b/sd/source/ui/dlg/PhotoAlbumDialog.cxx @@ -76,6 +76,23 @@ SdPhotoAlbumDialog::SdPhotoAlbumDialog(vcl::Window* pWindow, SdDrawDocument* pAc SdPhotoAlbumDialog::~SdPhotoAlbumDialog() { + dispose(); +} + +void SdPhotoAlbumDialog::dispose() +{ + pCancelBtn.clear(); + pCreateBtn.clear(); + pAddBtn.clear(); + pUpBtn.clear(); + pDownBtn.clear(); + pRemoveBtn.clear(); + pImagesLst.clear(); + pImg.clear(); + pInsTypeCombo.clear(); + pASRCheck.clear(); + pCapCheck.clear(); + ModalDialog::dispose(); } IMPL_LINK_NOARG(SdPhotoAlbumDialog, CancelHdl) diff --git a/sd/source/ui/dlg/PhotoAlbumDialog.hxx b/sd/source/ui/dlg/PhotoAlbumDialog.hxx index c7d12e47bcc8..44b1f5c97a1e 100644 --- a/sd/source/ui/dlg/PhotoAlbumDialog.hxx +++ b/sd/source/ui/dlg/PhotoAlbumDialog.hxx @@ -46,25 +46,27 @@ class SdPhotoAlbumDialog : public ModalDialog public: SdPhotoAlbumDialog(vcl::Window* pWindow, SdDrawDocument* pActDoc); virtual ~SdPhotoAlbumDialog(); + virtual void dispose() SAL_OVERRIDE; virtual short Execute() SAL_OVERRIDE; private: static OUString sDirUrl; - CancelButton* pCancelBtn; - PushButton* pCreateBtn; + VclPtr<CancelButton> pCancelBtn; + VclPtr<PushButton> pCreateBtn; - PushButton* pAddBtn; - PushButton* pUpBtn; - PushButton* pDownBtn; - PushButton* pRemoveBtn; + VclPtr<PushButton> pAddBtn; + VclPtr<PushButton> pUpBtn; + VclPtr<PushButton> pDownBtn; + VclPtr<PushButton> pRemoveBtn; - ListBox* pImagesLst; - FixedImage* pImg; + VclPtr<ListBox> pImagesLst; + VclPtr<FixedImage> pImg; + + VclPtr<ListBox> pInsTypeCombo; + VclPtr<CheckBox> pASRCheck; + VclPtr<CheckBox> pCapCheck; - ListBox* pInsTypeCombo; - CheckBox* pASRCheck; - CheckBox* pCapCheck; SdDrawDocument* pDoc; GraphicFilter* mpGraphicFilter; diff --git a/sd/source/ui/dlg/RemoteDialog.cxx b/sd/source/ui/dlg/RemoteDialog.cxx index f9cd67cb8dad..625cc04cd7f4 100644 --- a/sd/source/ui/dlg/RemoteDialog.cxx +++ b/sd/source/ui/dlg/RemoteDialog.cxx @@ -30,6 +30,19 @@ RemoteDialog::RemoteDialog( vcl::Window *pWindow ) m_pButtonClose->SetClickHdl( LINK( this, RemoteDialog, CloseHdl ) ); } +RemoteDialog::~RemoteDialog() +{ + dispose(); +} + +void RemoteDialog::dispose() +{ + m_pButtonConnect.clear(); + m_pButtonClose.clear(); + m_pClientBox.clear(); + ModalDialog::dispose(); +} + IMPL_LINK_NOARG(RemoteDialog, HandleConnectButton) { // setBusy( true ); diff --git a/sd/source/ui/dlg/RemoteDialog.hxx b/sd/source/ui/dlg/RemoteDialog.hxx index 7334c4bea548..3c936eb10a1a 100644 --- a/sd/source/ui/dlg/RemoteDialog.hxx +++ b/sd/source/ui/dlg/RemoteDialog.hxx @@ -24,14 +24,16 @@ namespace sd class RemoteDialog : public ModalDialog { private: - PushButton* m_pButtonConnect; - CloseButton* m_pButtonClose; - ClientBox* m_pClientBox; + VclPtr<PushButton> m_pButtonConnect; + VclPtr<CloseButton> m_pButtonClose; + VclPtr<ClientBox> m_pClientBox; DECL_DLLPRIVATE_LINK( HandleConnectButton, void * ); DECL_LINK( CloseHdl, void * ); public: RemoteDialog( vcl::Window* pWindow ); + virtual ~RemoteDialog(); + virtual void dispose() SAL_OVERRIDE; }; } diff --git a/sd/source/ui/dlg/RemoteDialogClientBox.hxx b/sd/source/ui/dlg/RemoteDialogClientBox.hxx index c40ac96212c1..63bf2db5a577 100644 --- a/sd/source/ui/dlg/RemoteDialogClientBox.hxx +++ b/sd/source/ui/dlg/RemoteDialogClientBox.hxx @@ -69,7 +69,7 @@ class ClientBox; class ClientRemovedListener : public ::cppu::WeakImplHelper1< ::com::sun::star::lang::XEventListener > { - ClientBox *m_pParent; + VclPtr<ClientBox> m_pParent; public: diff --git a/sd/source/ui/dlg/animobjs.cxx b/sd/source/ui/dlg/animobjs.cxx index a84cfd9d0ddd..c7bba27e3eab 100644 --- a/sd/source/ui/dlg/animobjs.cxx +++ b/sd/source/ui/dlg/animobjs.cxx @@ -224,8 +224,26 @@ void AnimationWindow::dispose() // delete the clones delete pMyDoc; - delete m_pCtlDisplay; - + m_pCtlDisplay.clear(); + m_pBtnFirst.clear(); + m_pBtnReverse.clear(); + m_pBtnStop.clear(); + m_pBtnPlay.clear(); + m_pBtnLast.clear(); + m_pNumFldBitmap.clear(); + m_pTimeField.clear(); + m_pLbLoopCount.clear(); + m_pBtnGetOneObject.clear(); + m_pBtnGetAllObjects.clear(); + m_pBtnRemoveBitmap.clear(); + m_pBtnRemoveAll.clear(); + m_pFiCount.clear(); + m_pRbtGroup.clear(); + m_pRbtBitmap.clear(); + m_pFtAdjustment.clear(); + m_pLbAdjustment.clear(); + m_pBtnCreateGroup.clear(); + pWin.clear(); SfxDockingWindow::dispose(); } diff --git a/sd/source/ui/dlg/brkdlg.cxx b/sd/source/ui/dlg/brkdlg.cxx index 92c83eac13c7..bd6cad52decf 100644 --- a/sd/source/ui/dlg/brkdlg.cxx +++ b/sd/source/ui/dlg/brkdlg.cxx @@ -72,8 +72,10 @@ BreakDlg::~BreakDlg() void BreakDlg::dispose() { - delete mpProgress; - delete pProgrInfo; + m_pFiObjInfo.clear(); + m_pFiActInfo.clear(); + m_pFiInsInfo.clear(); + m_pBtnCancel.clear(); SfxModalDialog::dispose(); } diff --git a/sd/source/ui/dlg/copydlg.cxx b/sd/source/ui/dlg/copydlg.cxx index a66d6a041807..7fcd27804f12 100644 --- a/sd/source/ui/dlg/copydlg.cxx +++ b/sd/source/ui/dlg/copydlg.cxx @@ -89,31 +89,17 @@ CopyDlg::~CopyDlg() void CopyDlg::dispose() { - OUString& rStr = GetExtraData(); - - rStr = OUString::number(m_pNumFldCopies->GetValue()); - rStr += OUString(TOKEN); - - rStr += OUString::number(m_pMtrFldMoveX->GetValue()); - rStr += OUString( TOKEN ); - - rStr += OUString::number(m_pMtrFldMoveY->GetValue()); - rStr += OUString( TOKEN ); - - rStr += OUString::number(m_pMtrFldAngle->GetValue()); - rStr += OUString( TOKEN ); - - rStr += OUString::number(m_pMtrFldWidth->GetValue()); - rStr += OUString( TOKEN ); - - rStr += OUString::number(m_pMtrFldHeight->GetValue()); - rStr += OUString( TOKEN ); - - rStr += OUString::number( m_pLbStartColor->GetSelectEntryColor().GetColor() ); - rStr += OUString( TOKEN ); - - rStr += OUString::number( m_pLbEndColor->GetSelectEntryColor().GetColor() ); - + m_pNumFldCopies.clear(); + m_pBtnSetViewData.clear(); + m_pMtrFldMoveX.clear(); + m_pMtrFldMoveY.clear(); + m_pMtrFldAngle.clear(); + m_pMtrFldWidth.clear(); + m_pMtrFldHeight.clear(); + m_pLbStartColor.clear(); + m_pFtEndColor.clear(); + m_pLbEndColor.clear(); + m_pBtnSetDefault.clear(); SfxModalDialog::dispose(); } diff --git a/sd/source/ui/dlg/custsdlg.cxx b/sd/source/ui/dlg/custsdlg.cxx index 8cfd56d0a583..95132d4c5e4f 100644 --- a/sd/source/ui/dlg/custsdlg.cxx +++ b/sd/source/ui/dlg/custsdlg.cxx @@ -85,6 +85,21 @@ SdCustomShowDlg::SdCustomShowDlg( vcl::Window* pWindow, SdCustomShowDlg::~SdCustomShowDlg() { + dispose(); +} + +void SdCustomShowDlg::dispose() +{ + m_pLbCustomShows.clear(); + m_pCbxUseCustomShow.clear(); + m_pBtnNew.clear(); + m_pBtnEdit.clear(); + m_pBtnRemove.clear(); + m_pBtnCopy.clear(); + m_pBtnHelp.clear(); + m_pBtnStartShow.clear(); + m_pBtnOK.clear(); + ModalDialog::dispose(); } void SdCustomShowDlg::CheckState() @@ -336,6 +351,20 @@ SdDefineCustomShowDlg::SdDefineCustomShowDlg( vcl::Window* pWindow, SdDefineCustomShowDlg::~SdDefineCustomShowDlg() { + dispose(); +} + +void SdDefineCustomShowDlg::dispose() +{ + m_pEdtName.clear(); + m_pLbPages.clear(); + m_pBtnAdd.clear(); + m_pBtnRemove.clear(); + m_pLbCustomPages.clear(); + m_pBtnOK.clear(); + m_pBtnCancel.clear(); + m_pBtnHelp.clear(); + ModalDialog::dispose(); } // CheckState diff --git a/sd/source/ui/dlg/dlgass.cxx b/sd/source/ui/dlg/dlgass.cxx index 757028a0f4fc..bec74ca9a16f 100644 --- a/sd/source/ui/dlg/dlgass.cxx +++ b/sd/source/ui/dlg/dlgass.cxx @@ -101,8 +101,8 @@ public: void Enable (bool bEnable); private: - PushButton* mpNextButton1; - PushButton* mpNextButton2; + VclPtr<PushButton> mpNextButton1; + VclPtr<PushButton> mpNextButton2; bool mbIsFirstButtonActive; }; @@ -160,7 +160,7 @@ public: */ bool mbPreviewUpdating; - vcl::Window* mpWindow; + VclPtr<vcl::Window> mpWindow; void SavePassword( SfxObjectShellLock xDoc, const OUString& rPath ); void RestorePassword( SfxItemSet* pSet, const OUString& rPath ); @@ -247,74 +247,74 @@ public: // Common Assistent maAssistentFunc; - CheckBox* mpPreviewFlag; - CheckBox* mpStartWithFlag; - PushButton* mpLastPageButton; - NextButton* mpNextPageButton; - PushButton* mpFinishButton; - SdDocPreviewWin* mpPreview; - VclContainer* mpPage1235; + VclPtr<CheckBox> mpPreviewFlag; + VclPtr<CheckBox> mpStartWithFlag; + VclPtr<PushButton> mpLastPageButton; + NextButton* mpNextPageButton; + VclPtr<PushButton> mpFinishButton; + VclPtr<SdDocPreviewWin> mpPreview; + VclPtr<VclContainer> mpPage1235; // page 1 - VclContainer* mpPage1; - FixedImage* mpPage1FB; - FixedText* mpPage1ArtFL; - RadioButton* mpPage1EmptyRB; - RadioButton* mpPage1TemplateRB; - ListBox* mpPage1RegionLB; - ListBox* mpPage1TemplateLB; - RadioButton* mpPage1OpenRB; - ListBox* mpPage1OpenLB; - PushButton* mpPage1OpenPB; + VclPtr<VclContainer> mpPage1; + VclPtr<FixedImage> mpPage1FB; + VclPtr<FixedText> mpPage1ArtFL; + VclPtr<RadioButton> mpPage1EmptyRB; + VclPtr<RadioButton> mpPage1TemplateRB; + VclPtr<ListBox> mpPage1RegionLB; + VclPtr<ListBox> mpPage1TemplateLB; + VclPtr<RadioButton> mpPage1OpenRB; + VclPtr<ListBox> mpPage1OpenLB; + VclPtr<PushButton> mpPage1OpenPB; // page 2 - VclContainer* mpPage2; - FixedImage* mpPage2FB; - FixedText* mpPage2LayoutFL; - ListBox* mpPage2RegionLB; - ListBox* mpPage2LayoutLB; - FixedText* mpPage2OutTypesFL; - RadioButton* mpPage2Medium1RB; - RadioButton* mpPage2Medium2RB; - RadioButton* mpPage2Medium3RB; - RadioButton* mpPage2Medium4RB; - RadioButton* mpPage2Medium5RB; - RadioButton* mpPage2Medium6RB; + VclPtr<VclContainer> mpPage2; + VclPtr<FixedImage> mpPage2FB; + VclPtr<FixedText> mpPage2LayoutFL; + VclPtr<ListBox> mpPage2RegionLB; + VclPtr<ListBox> mpPage2LayoutLB; + VclPtr<FixedText> mpPage2OutTypesFL; + VclPtr<RadioButton> mpPage2Medium1RB; + VclPtr<RadioButton> mpPage2Medium2RB; + VclPtr<RadioButton> mpPage2Medium3RB; + VclPtr<RadioButton> mpPage2Medium4RB; + VclPtr<RadioButton> mpPage2Medium5RB; + VclPtr<RadioButton> mpPage2Medium6RB; // page 3 - VclContainer* mpPage3; - FixedImage* mpPage3FB; - FixedText* mpPage3EffectFL; - FixedText* mpPage3EffectFT; - FadeEffectLB* mpPage3EffectLB; - FixedText* mpPage3SpeedFT; - ListBox* mpPage3SpeedLB; - FixedText* mpPage3PresTypeFL; - RadioButton* mpPage3PresTypeLiveRB; - RadioButton* mpPage3PresTypeKioskRB; - FixedText* mpPage3PresTimeFT; - TimeField* mpPage3PresTimeTMF; - FixedText* mpPage3BreakFT; - TimeField* mpPage3BreakTMF; - CheckBox* mpPage3LogoCB; + VclPtr<VclContainer> mpPage3; + VclPtr<FixedImage> mpPage3FB; + VclPtr<FixedText> mpPage3EffectFL; + VclPtr<FixedText> mpPage3EffectFT; + VclPtr<FadeEffectLB> mpPage3EffectLB; + VclPtr<FixedText> mpPage3SpeedFT; + VclPtr<ListBox> mpPage3SpeedLB; + VclPtr<FixedText> mpPage3PresTypeFL; + VclPtr<RadioButton> mpPage3PresTypeLiveRB; + VclPtr<RadioButton> mpPage3PresTypeKioskRB; + VclPtr<FixedText> mpPage3PresTimeFT; + VclPtr<TimeField> mpPage3PresTimeTMF; + VclPtr<FixedText> mpPage3BreakFT; + VclPtr<TimeField> mpPage3BreakTMF; + VclPtr<CheckBox> mpPage3LogoCB; // page 4 - VclContainer* mpPage4; - FixedImage* mpPage4FB; - FixedText* mpPage4PersonalFL; - FixedText* mpPage4AskNameFT; - Edit* mpPage4AskNameEDT; - FixedText* mpPage4AskTopicFT; - Edit* mpPage4AskTopicEDT; - FixedText* mpPage4AskInfoFT; - VclMultiLineEdit* mpPage4AskInfoEDT; + VclPtr<VclContainer> mpPage4; + VclPtr<FixedImage> mpPage4FB; + VclPtr<FixedText> mpPage4PersonalFL; + VclPtr<FixedText> mpPage4AskNameFT; + VclPtr<Edit> mpPage4AskNameEDT; + VclPtr<FixedText> mpPage4AskTopicFT; + VclPtr<Edit> mpPage4AskTopicEDT; + VclPtr<FixedText> mpPage4AskInfoFT; + VclPtr<VclMultiLineEdit> mpPage4AskInfoEDT; // page 5 - VclContainer* mpPage5; - FixedImage* mpPage5FB; - FixedText* mpPage5PageListFT; - SdPageListControl* mpPage5PageListCT; - CheckBox* mpPage5SummaryCB; + VclPtr<VclContainer> mpPage5; + VclPtr<FixedImage> mpPage5FB; + VclPtr<FixedText> mpPage5PageListFT; + VclPtr<SdPageListControl> mpPage5PageListCT; + VclPtr<CheckBox> mpPage5SummaryCB; }; diff --git a/sd/source/ui/dlg/dlgfield.cxx b/sd/source/ui/dlg/dlgfield.cxx index 64e4d476baa7..e236cd133048 100644 --- a/sd/source/ui/dlg/dlgfield.cxx +++ b/sd/source/ui/dlg/dlgfield.cxx @@ -53,6 +53,21 @@ SdModifyFieldDlg::SdModifyFieldDlg( vcl::Window* pWindow, const SvxFieldData* pI FillControls(); } +SdModifyFieldDlg::~SdModifyFieldDlg() +{ + dispose(); +} + +void SdModifyFieldDlg::dispose() +{ + m_pRbtFix.clear(); + m_pRbtVar.clear(); + m_pLbLanguage.clear(); + m_pLbFormat.clear(); + ModalDialog::dispose(); +} + + /** * Returns the new field, owned by caller. * Returns NULL if nothing has changed. diff --git a/sd/source/ui/dlg/dlgsnap.cxx b/sd/source/ui/dlg/dlgsnap.cxx index 07d6e2c2886d..2e590fa9a8cf 100644 --- a/sd/source/ui/dlg/dlgsnap.cxx +++ b/sd/source/ui/dlg/dlgsnap.cxx @@ -111,6 +111,25 @@ SdSnapLineDlg::SdSnapLineDlg( m_pRbPoint->Check(); } +SdSnapLineDlg::~SdSnapLineDlg() +{ + dispose(); +} + +void SdSnapLineDlg::dispose() +{ + m_pFtX.clear(); + m_pMtrFldX.clear(); + m_pFtY.clear(); + m_pMtrFldY.clear(); + m_pRadioGroup.clear(); + m_pRbPoint.clear(); + m_pRbVert.clear(); + m_pRbHorz.clear(); + m_pBtnDelete.clear(); + ModalDialog::dispose(); +} + /** * fills provided item sets with dialog box attributes */ diff --git a/sd/source/ui/dlg/headerfooterdlg.cxx b/sd/source/ui/dlg/headerfooterdlg.cxx index b7c95485fff2..f2ea08902841 100644 --- a/sd/source/ui/dlg/headerfooterdlg.cxx +++ b/sd/source/ui/dlg/headerfooterdlg.cxx @@ -115,29 +115,29 @@ class HeaderFooterTabPage : public TabPage { private: - FixedText* mpFTIncludeOn; + VclPtr<FixedText> mpFTIncludeOn; - CheckBox* mpCBHeader; - VclContainer* mpHeaderBox; - Edit* mpTBHeader; + VclPtr<CheckBox> mpCBHeader; + VclPtr<VclContainer> mpHeaderBox; + VclPtr<Edit> mpTBHeader; - CheckBox* mpCBDateTime; - RadioButton* mpRBDateTimeFixed; - RadioButton* mpRBDateTimeAutomatic; - Edit* mpTBDateTimeFixed; - ListBox* mpCBDateTimeFormat; - FixedText* mpFTDateTimeLanguage; - SvxLanguageBox* mpCBDateTimeLanguage; + VclPtr<CheckBox> mpCBDateTime; + VclPtr<RadioButton> mpRBDateTimeFixed; + VclPtr<RadioButton> mpRBDateTimeAutomatic; + VclPtr<Edit> mpTBDateTimeFixed; + VclPtr<ListBox> mpCBDateTimeFormat; + VclPtr<FixedText> mpFTDateTimeLanguage; + VclPtr<SvxLanguageBox> mpCBDateTimeLanguage; - CheckBox* mpCBFooter; - VclContainer* mpFooterBox; - Edit* mpTBFooter; + VclPtr<CheckBox> mpCBFooter; + VclPtr<VclContainer> mpFooterBox; + VclPtr<Edit> mpTBFooter; - CheckBox* mpCBSlideNumber; + VclPtr<CheckBox> mpCBSlideNumber; - CheckBox* mpCBNotOnTitle; + VclPtr<CheckBox> mpCBNotOnTitle; - PresLayoutPreview* mpCTPreview; + VclPtr<PresLayoutPreview> mpCTPreview; SdDrawDocument* mpDoc; LanguageType meOldLanguage; @@ -155,6 +155,7 @@ private: public: HeaderFooterTabPage( vcl::Window* pParent, SdDrawDocument* pDoc, SdPage* pActualPage, bool bHandoutMode ); virtual ~HeaderFooterTabPage(); + virtual void dispose() SAL_OVERRIDE; void init( const HeaderFooterSettings& rSettings, bool bNotOnTitle ); void getData( HeaderFooterSettings& rSettings, bool& rNotOnTitle ); @@ -245,8 +246,12 @@ HeaderFooterDialog::~HeaderFooterDialog() void HeaderFooterDialog::dispose() { - delete mpSlideTabPage; - delete mpNotesHandoutsTabPage; + mpSlideTabPage.clear(); + mpNotesHandoutsTabPage.clear(); + mpTabCtrl.clear(); + maPBApplyToAll.clear(); + maPBApply.clear(); + maPBCancel.clear(); TabDialog::dispose(); } @@ -457,6 +462,29 @@ HeaderFooterTabPage::HeaderFooterTabPage( vcl::Window* pWindow, SdDrawDocument* HeaderFooterTabPage::~HeaderFooterTabPage() { + dispose(); +} + +void HeaderFooterTabPage::dispose() +{ + mpFTIncludeOn.clear(); + mpCBHeader.clear(); + mpHeaderBox.clear(); + mpTBHeader.clear(); + mpCBDateTime.clear(); + mpRBDateTimeFixed.clear(); + mpRBDateTimeAutomatic.clear(); + mpTBDateTimeFixed.clear(); + mpCBDateTimeFormat.clear(); + mpFTDateTimeLanguage.clear(); + mpCBDateTimeLanguage.clear(); + mpCBFooter.clear(); + mpFooterBox.clear(); + mpTBFooter.clear(); + mpCBSlideNumber.clear(); + mpCBNotOnTitle.clear(); + mpCTPreview.clear(); + TabPage::dispose(); } IMPL_LINK_NOARG(HeaderFooterTabPage, LanguageChangeHdl) diff --git a/sd/source/ui/dlg/ins_paste.cxx b/sd/source/ui/dlg/ins_paste.cxx index a256990697e0..833b471d140a 100644 --- a/sd/source/ui/dlg/ins_paste.cxx +++ b/sd/source/ui/dlg/ins_paste.cxx @@ -28,6 +28,18 @@ SdInsertPasteDlg::SdInsertPasteDlg(vcl::Window* pWindow) m_pRbAfter->Check( true ); } +SdInsertPasteDlg::~SdInsertPasteDlg() +{ + dispose(); +} + +void SdInsertPasteDlg::dispose() +{ + m_pRbBefore.clear(); + m_pRbAfter.clear(); + ModalDialog::dispose(); +} + bool SdInsertPasteDlg::IsInsertBefore() const { return( m_pRbBefore->IsChecked() ); diff --git a/sd/source/ui/dlg/inspagob.cxx b/sd/source/ui/dlg/inspagob.cxx index 5593562947c1..0d5e29c1c6ce 100644 --- a/sd/source/ui/dlg/inspagob.cxx +++ b/sd/source/ui/dlg/inspagob.cxx @@ -55,6 +55,15 @@ SdInsertPagesObjsDlg::SdInsertPagesObjsDlg( SdInsertPagesObjsDlg::~SdInsertPagesObjsDlg() { + dispose(); +} + +void SdInsertPagesObjsDlg::dispose() +{ + m_pLbTree.clear(); + m_pCbxLink.clear(); + m_pCbxMasters.clear(); + ModalDialog::dispose(); } /** diff --git a/sd/source/ui/dlg/layeroptionsdlg.cxx b/sd/source/ui/dlg/layeroptionsdlg.cxx index 86df27c22cb1..12b3e4d1aa9c 100644 --- a/sd/source/ui/dlg/layeroptionsdlg.cxx +++ b/sd/source/ui/dlg/layeroptionsdlg.cxx @@ -50,6 +50,22 @@ SdInsertLayerDlg::SdInsertLayerDlg( vcl::Window* pWindow, const SfxItemSet& rInA get<VclContainer>("nameframe")->Enable(bDeletable); } +SdInsertLayerDlg::~SdInsertLayerDlg() +{ + dispose(); +} + +void SdInsertLayerDlg::dispose() +{ + m_pEdtName.clear(); + m_pEdtTitle.clear(); + m_pEdtDesc.clear(); + m_pCbxVisible.clear(); + m_pCbxPrintable.clear(); + m_pCbxLocked.clear(); + ModalDialog::dispose(); +} + void SdInsertLayerDlg::GetAttr( SfxItemSet& rAttrs ) { rAttrs.Put( SdAttrLayerName( m_pEdtName->GetText() ) ); diff --git a/sd/source/ui/dlg/masterlayoutdlg.cxx b/sd/source/ui/dlg/masterlayoutdlg.cxx index d10f8224ad8b..898ca5b2e4eb 100644 --- a/sd/source/ui/dlg/masterlayoutdlg.cxx +++ b/sd/source/ui/dlg/masterlayoutdlg.cxx @@ -75,6 +75,21 @@ MasterLayoutDialog::MasterLayoutDialog( vcl::Window* pParent, SdDrawDocument* pD mpCBPageNumber->Check( mbOldPageNumber ); } +MasterLayoutDialog::~MasterLayoutDialog() +{ + dispose(); +} + +void MasterLayoutDialog::dispose() +{ + mpCBDate.clear(); + mpCBPageNumber.clear(); + mpCBSlideNumber.clear(); + mpCBHeader.clear(); + mpCBFooter.clear(); + ModalDialog::dispose(); +} + short MasterLayoutDialog::Execute() { if ( ModalDialog::Execute() ) diff --git a/sd/source/ui/dlg/morphdlg.cxx b/sd/source/ui/dlg/morphdlg.cxx index d21de6f97c27..8ea2b1856965 100644 --- a/sd/source/ui/dlg/morphdlg.cxx +++ b/sd/source/ui/dlg/morphdlg.cxx @@ -66,6 +66,15 @@ MorphDlg::MorphDlg( vcl::Window* pParent, const SdrObject* pObj1, const SdrObjec MorphDlg::~MorphDlg() { + dispose(); +} + +void MorphDlg::dispose() +{ + m_pMtfSteps.clear(); + m_pCbxAttributes.clear(); + m_pCbxOrientation.clear(); + ModalDialog::dispose(); } void MorphDlg::LoadSettings() diff --git a/sd/source/ui/dlg/paragr.cxx b/sd/source/ui/dlg/paragr.cxx index 53fb0adb873e..6714cb0ba55e 100644 --- a/sd/source/ui/dlg/paragr.cxx +++ b/sd/source/ui/dlg/paragr.cxx @@ -39,6 +39,7 @@ class SdParagraphNumTabPage : public SfxTabPage public: SdParagraphNumTabPage(vcl::Window* pParent, const SfxItemSet& rSet ); virtual ~SdParagraphNumTabPage(); + virtual void dispose() SAL_OVERRIDE; static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* rSet ); static const sal_uInt16* GetRanges(); @@ -47,9 +48,9 @@ public: virtual void Reset( const SfxItemSet* rSet ) SAL_OVERRIDE; private: - TriStateBox* m_pNewStartCB; - TriStateBox* m_pNewStartNumberCB; - NumericField* m_pNewStartNF; + VclPtr<TriStateBox> m_pNewStartCB; + VclPtr<TriStateBox> m_pNewStartNumberCB; + VclPtr<NumericField> m_pNewStartNF; bool mbModified; DECL_LINK( ImplNewStartHdl, void* ); @@ -72,6 +73,15 @@ SdParagraphNumTabPage::SdParagraphNumTabPage(vcl::Window* pParent, const SfxItem SdParagraphNumTabPage::~SdParagraphNumTabPage() { + dispose(); +} + +void SdParagraphNumTabPage::dispose() +{ + m_pNewStartCB.clear(); + m_pNewStartNumberCB.clear(); + m_pNewStartNF.clear(); + SfxTabPage::dispose(); } SfxTabPage* SdParagraphNumTabPage::Create(vcl::Window *pParent, const SfxItemSet * rAttrSet) diff --git a/sd/source/ui/dlg/present.cxx b/sd/source/ui/dlg/present.cxx index c4b95a9d2458..72d30c31b6c1 100644 --- a/sd/source/ui/dlg/present.cxx +++ b/sd/source/ui/dlg/present.cxx @@ -150,6 +150,39 @@ SdStartPresentationDlg::SdStartPresentationDlg( vcl::Window* pWindow, ChangePauseHdl( NULL ); } +SdStartPresentationDlg::~SdStartPresentationDlg() +{ + dispose(); +} + +void SdStartPresentationDlg::dispose() +{ + aRbtAll.clear(); + aRbtAtDia.clear(); + aRbtCustomshow.clear(); + aLbDias.clear(); + aLbCustomshow.clear(); + aRbtStandard.clear(); + aRbtWindow.clear(); + aRbtAuto.clear(); + aTmfPause.clear(); + aCbxAutoLogo.clear(); + aCbxManuel.clear(); + aCbxMousepointer.clear(); + aCbxPen.clear(); + aCbxNavigator.clear(); + aCbxAnimationAllowed.clear(); + aCbxChangePage.clear(); + aCbxAlwaysOnTop.clear(); + maFtMonitor.clear(); + maLBMonitor.clear(); + msMonitor.clear(); + msAllMonitors.clear(); + msMonitorExternal.clear(); + msExternal.clear(); + ModalDialog::dispose(); +} + OUString SdStartPresentationDlg::GetDisplayName( sal_Int32 nDisplay, DisplayType eType ) { diff --git a/sd/source/ui/dlg/prntopts.cxx b/sd/source/ui/dlg/prntopts.cxx index 943144be7a53..b9cdc6e06ce7 100644 --- a/sd/source/ui/dlg/prntopts.cxx +++ b/sd/source/ui/dlg/prntopts.cxx @@ -30,7 +30,7 @@ */ SdPrintOptions::SdPrintOptions( vcl::Window* pParent, const SfxItemSet& rInAttrs ) : SfxTabPage ( pParent, "prntopts" , "modules/simpress/ui/prntopts.ui" , &rInAttrs ), - rOutAttrs ( rInAttrs ) + rOutAttrs ( rInAttrs ) { get( m_pFrmContent , "contentframe" ); get( m_pCbxDraw , "drawingcb" ); @@ -74,6 +74,31 @@ SdPrintOptions::SdPrintOptions( vcl::Window* pParent, const SfxItemSet& rInAttrs SdPrintOptions::~SdPrintOptions() { + dispose(); +} + +void SdPrintOptions::dispose() +{ + m_pFrmContent.clear(); + m_pCbxDraw.clear(); + m_pCbxNotes.clear(); + m_pCbxHandout.clear(); + m_pCbxOutline.clear(); + m_pRbtColor.clear(); + m_pRbtGrayscale.clear(); + m_pRbtBlackWhite.clear(); + m_pCbxPagename.clear(); + m_pCbxDate.clear(); + m_pCbxTime.clear(); + m_pCbxHiddenPages.clear(); + m_pRbtDefault.clear(); + m_pRbtPagesize.clear(); + m_pRbtPagetile.clear(); + m_pRbtBooklet.clear(); + m_pCbxFront.clear(); + m_pCbxBack.clear(); + m_pCbxPaperbin.clear(); + SfxTabPage::dispose(); } bool SdPrintOptions::FillItemSet( SfxItemSet* rAttrs ) diff --git a/sd/source/ui/dlg/sddlgfact.cxx b/sd/source/ui/dlg/sddlgfact.cxx index 8e5c87a381d3..3e4c4a9a4155 100644 --- a/sd/source/ui/dlg/sddlgfact.cxx +++ b/sd/source/ui/dlg/sddlgfact.cxx @@ -121,37 +121,37 @@ OUString SdAbstractTabDialog_Impl::GetText() const void AbstractBulletDialog_Impl::SetCurPageId( sal_uInt16 nId ) { - static_cast< ::sd::OutlineBulletDlg*>(pDlg)->SetCurPageId( nId ); + static_cast< ::sd::OutlineBulletDlg*>(pDlg.get())->SetCurPageId( nId ); } void AbstractBulletDialog_Impl::SetCurPageId( const OString& rName ) { - static_cast< ::sd::OutlineBulletDlg*>(pDlg)->SetCurPageId( rName ); + static_cast< ::sd::OutlineBulletDlg*>(pDlg.get())->SetCurPageId( rName ); } const SfxItemSet* AbstractBulletDialog_Impl::GetOutputItemSet() const { - return static_cast< ::sd::OutlineBulletDlg*>(pDlg)->GetOutputItemSet(); + return static_cast< ::sd::OutlineBulletDlg*>(pDlg.get())->GetOutputItemSet(); } const sal_uInt16* AbstractBulletDialog_Impl::GetInputRanges(const SfxItemPool& pItem ) { - return static_cast< ::sd::OutlineBulletDlg*>(pDlg)->GetInputRanges( pItem ); + return static_cast< ::sd::OutlineBulletDlg*>(pDlg.get())->GetInputRanges( pItem ); } void AbstractBulletDialog_Impl::SetInputSet( const SfxItemSet* pInSet ) { - static_cast< ::sd::OutlineBulletDlg*>(pDlg)->SetInputSet( pInSet ); + static_cast< ::sd::OutlineBulletDlg*>(pDlg.get())->SetInputSet( pInSet ); } void AbstractBulletDialog_Impl::SetText( const OUString& rStr ) { - static_cast< ::sd::OutlineBulletDlg*>(pDlg)->SetText( rStr ); + static_cast< ::sd::OutlineBulletDlg*>(pDlg.get())->SetText( rStr ); } OUString AbstractBulletDialog_Impl::GetText() const { - return static_cast< ::sd::OutlineBulletDlg*>(pDlg)->GetText(); + return static_cast< ::sd::OutlineBulletDlg*>(pDlg.get())->GetText(); } void SdPresLayoutTemplateDlg_Impl::SetCurPageId( sal_uInt16 nId ) diff --git a/sd/source/ui/dlg/sddlgfact.hxx b/sd/source/ui/dlg/sddlgfact.hxx index 38d6d1e4c1e7..b7fe5347e91a 100644 --- a/sd/source/ui/dlg/sddlgfact.hxx +++ b/sd/source/ui/dlg/sddlgfact.hxx @@ -23,7 +23,7 @@ #include <sfx2/basedlgs.hxx> #define DECL_ABSTDLG_BASE(Class,DialogClass) \ - DialogClass* pDlg; \ + VclPtr<DialogClass> pDlg; \ public: \ Class( DialogClass* p) \ : pDlg(p) \ @@ -34,7 +34,6 @@ public: \ #define IMPL_ABSTDLG_BASE(Class) \ Class::~Class() \ { \ - delete pDlg; \ } \ short Class::Execute() \ { \ diff --git a/sd/source/ui/dlg/sdpreslt.cxx b/sd/source/ui/dlg/sdpreslt.cxx index 21d8a89afb6f..6c9691affc69 100644 --- a/sd/source/ui/dlg/sdpreslt.cxx +++ b/sd/source/ui/dlg/sdpreslt.cxx @@ -55,6 +55,16 @@ SdPresLayoutDlg::SdPresLayoutDlg(::sd::DrawDocShell* pDocShell, SdPresLayoutDlg::~SdPresLayoutDlg() { + dispose(); +} + +void SdPresLayoutDlg::dispose() +{ + m_pVS.clear(); + m_pCbxMasterPage.clear(); + m_pCbxCheckMasters.clear(); + m_pBtnLoad.clear(); + ModalDialog::dispose(); } /** diff --git a/sd/source/ui/dlg/sdtreelb.cxx b/sd/source/ui/dlg/sdtreelb.cxx index 184cc15081d8..e7473b16e39a 100644 --- a/sd/source/ui/dlg/sdtreelb.cxx +++ b/sd/source/ui/dlg/sdtreelb.cxx @@ -265,6 +265,8 @@ void SdPageObjsTLB::dispose() else // no document was created from mpMedium, so this object is still the owner of it delete mpMedium; + mpParent.clear(); + mpDropNavWin.clear(); SvTreeListBox::dispose(); } @@ -1349,7 +1351,7 @@ sal_Int8 SdPageObjsTLB::ExecuteDrop( const ExecuteDropEvent& rEvt ) OUString aFile; if( aDataHelper.GetString( SotClipboardFormatId::SIMPLE_FILE, aFile ) && - static_cast<SdNavigatorWin*>(mpParent)->InsertFile( aFile ) ) + static_cast<SdNavigatorWin*>(mpParent.get())->InsertFile( aFile ) ) { nRet = rEvt.mnAction; } diff --git a/sd/source/ui/dlg/sduiexp.cxx b/sd/source/ui/dlg/sduiexp.cxx index 3c526380a538..84127950fcd2 100644 --- a/sd/source/ui/dlg/sduiexp.cxx +++ b/sd/source/ui/dlg/sduiexp.cxx @@ -18,6 +18,21 @@ */ #include "sddlgfact.hxx" +#include "morphdlg.hxx" +#include "present.hxx" +#include "inspagob.hxx" +#include "vectdlg.hxx" +#include "sdpreslt.hxx" +#include "headerfooterdlg.hxx" +#include "pubdlg.hxx" +#include "ins_paste.hxx" +#include "layeroptionsdlg.hxx" +#include "dlgsnap.hxx" +#include "dlgfield.hxx" +#include "dlgass.hxx" +#include "prltempl.hxx" +#include "custsdlg.hxx" +#include "copydlg.hxx" #include "sal/types.h" extern "C" diff --git a/sd/source/ui/dlg/tpaction.cxx b/sd/source/ui/dlg/tpaction.cxx index 521a9c64bcb7..f4ae36271b57 100644 --- a/sd/source/ui/dlg/tpaction.cxx +++ b/sd/source/ui/dlg/tpaction.cxx @@ -142,6 +142,25 @@ SdTPAction::SdTPAction(vcl::Window* pWindow, const SfxItemSet& rInAttrs) SdTPAction::~SdTPAction() { + dispose(); +} + +void SdTPAction::dispose() +{ + m_pLbAction.clear(); + m_pFtTree.clear(); + m_pLbTree.clear(); + m_pLbTreeDocument.clear(); + m_pLbOLEAction.clear(); + m_pFrame.clear(); + m_pEdtSound.clear(); + m_pEdtBookmark.clear(); + m_pEdtDocument.clear(); + m_pEdtProgram.clear(); + m_pEdtMacro.clear(); + m_pBtnSearch.clear(); + m_pBtnSeek.clear(); + SfxTabPage::dispose(); } void SdTPAction::SetView( const ::sd::View* pSdView ) diff --git a/sd/source/ui/dlg/tpoption.cxx b/sd/source/ui/dlg/tpoption.cxx index 6383700d0bb7..eefac3577a77 100644 --- a/sd/source/ui/dlg/tpoption.cxx +++ b/sd/source/ui/dlg/tpoption.cxx @@ -122,6 +122,16 @@ SdTpOptionsContents::SdTpOptionsContents( vcl::Window* pParent, const SfxItemSet SdTpOptionsContents::~SdTpOptionsContents() { + dispose(); +} + +void SdTpOptionsContents::dispose() +{ + m_pCbxRuler.clear(); + m_pCbxDragStripes.clear(); + m_pCbxHandlesBezier.clear(); + m_pCbxMoveOutline.clear(); + SfxTabPage::dispose(); } bool SdTpOptionsContents::FillItemSet( SfxItemSet* rAttrs ) @@ -276,6 +286,38 @@ SdTpOptionsMisc::SdTpOptionsMisc(vcl::Window* pParent, const SfxItemSet& rInAttr SdTpOptionsMisc::~SdTpOptionsMisc() { + dispose(); +} + +void SdTpOptionsMisc::dispose() +{ + m_pCbxQuickEdit.clear(); + m_pCbxPickThrough.clear(); + m_pNewDocumentFrame.clear(); + m_pCbxStartWithTemplate.clear(); + m_pCbxMasterPageCache.clear(); + m_pCbxCopy.clear(); + m_pCbxMarkedHitMovesAlways.clear(); + m_pPresentationFrame.clear(); + m_pLbMetric.clear(); + m_pMtrFldTabstop.clear(); + m_pCbxEnableSdremote.clear(); + m_pCbxEnablePresenterScreen.clear(); + m_pCbxUsePrinterMetrics.clear(); + m_pCbxCompatibility.clear(); + m_pScaleFrame.clear(); + m_pCbScale.clear(); + m_pNewDocLb.clear(); + m_pFiInfo1.clear(); + m_pMtrFldOriginalWidth.clear(); + m_pWidthLb.clear(); + m_pHeightLb.clear(); + m_pFiInfo2.clear(); + m_pMtrFldOriginalHeight.clear(); + m_pCbxDistrot.clear(); + m_pMtrFldInfo1.clear(); + m_pMtrFldInfo2.clear(); + SfxTabPage::dispose(); } void SdTpOptionsMisc::ActivatePage( const SfxItemSet& rSet ) diff --git a/sd/source/ui/dlg/vectdlg.cxx b/sd/source/ui/dlg/vectdlg.cxx index 71d6ed9dd558..99f86cb9d239 100644 --- a/sd/source/ui/dlg/vectdlg.cxx +++ b/sd/source/ui/dlg/vectdlg.cxx @@ -72,6 +72,22 @@ SdVectorizeDlg::SdVectorizeDlg(vcl::Window* pParent, const Bitmap& rBmp, ::sd::D SdVectorizeDlg::~SdVectorizeDlg() { + dispose(); +} + +void SdVectorizeDlg::dispose() +{ + m_pNmLayers.clear(); + m_pMtReduce.clear(); + m_pFtFillHoles.clear(); + m_pMtFillHoles.clear(); + m_pCbFillHoles.clear(); + m_pBmpWin.clear(); + m_pMtfWin.clear(); + m_pPrgs.clear(); + m_pBtnOK.clear(); + m_pBtnPreview.clear(); + ModalDialog::dispose(); } Rectangle SdVectorizeDlg::GetRect( const Size& rDispSize, const Size& rBmpSize ) const |