summaryrefslogtreecommitdiff
path: root/sw/source/ui/misc
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/ui/misc')
-rw-r--r--sw/source/ui/misc/bookmark.cxx9
-rw-r--r--sw/source/ui/misc/docfnote.cxx39
-rw-r--r--sw/source/ui/misc/glosbib.cxx16
-rw-r--r--sw/source/ui/misc/glossary.cxx61
-rw-r--r--sw/source/ui/misc/impfnote.hxx39
-rw-r--r--sw/source/ui/misc/insfnote.cxx17
-rw-r--r--sw/source/ui/misc/linenum.cxx22
-rw-r--r--sw/source/ui/misc/num.cxx52
-rw-r--r--sw/source/ui/misc/outline.cxx55
-rw-r--r--sw/source/ui/misc/pgfnote.cxx20
-rw-r--r--sw/source/ui/misc/pggrid.cxx35
-rw-r--r--sw/source/ui/misc/srtdlg.cxx35
-rw-r--r--sw/source/ui/misc/swmodalredlineacceptdlg.cxx6
-rw-r--r--sw/source/ui/misc/titlepage.cxx18
14 files changed, 355 insertions, 69 deletions
diff --git a/sw/source/ui/misc/bookmark.cxx b/sw/source/ui/misc/bookmark.cxx
index 59576289d831..5eaf63a98ddb 100644
--- a/sw/source/ui/misc/bookmark.cxx
+++ b/sw/source/ui/misc/bookmark.cxx
@@ -147,6 +147,15 @@ SwInsertBookmarkDlg::SwInsertBookmarkDlg( vcl::Window *pParent, SwWrtShell &rS,
SwInsertBookmarkDlg::~SwInsertBookmarkDlg()
{
+ disposeOnce();
+}
+
+void SwInsertBookmarkDlg::dispose()
+{
+ m_pBookmarkBox.clear();
+ m_pOkBtn.clear();
+ m_pDeleteBtn.clear();
+ SvxStandardDialog::dispose();
}
BookmarkCombo::BookmarkCombo(vcl::Window* pWin, WinBits nStyle)
diff --git a/sw/source/ui/misc/docfnote.cxx b/sw/source/ui/misc/docfnote.cxx
index 15cfb9493333..04467a339ca4 100644
--- a/sw/source/ui/misc/docfnote.cxx
+++ b/sw/source/ui/misc/docfnote.cxx
@@ -117,6 +117,33 @@ SwEndNoteOptionPage::SwEndNoteOptionPage(vcl::Window *pParent, bool bEN,
get(m_pFtnCharTextTemplBox, "charstylelb");
}
+SwEndNoteOptionPage::~SwEndNoteOptionPage()
+{
+ disposeOnce();
+}
+
+void SwEndNoteOptionPage::dispose()
+{
+ m_pNumViewBox.clear();
+ m_pOffsetLbl.clear();
+ m_pOffsetFld.clear();
+ m_pNumCountBox.clear();
+ m_pPrefixED.clear();
+ m_pSuffixED.clear();
+ m_pPosFT.clear();
+ m_pPosPageBox.clear();
+ m_pPosChapterBox.clear();
+ m_pStylesContainer.clear();
+ m_pParaTemplBox.clear();
+ m_pPageTemplLbl.clear();
+ m_pPageTemplBox.clear();
+ m_pFtnCharAnchorTemplBox.clear();
+ m_pFtnCharTextTemplBox.clear();
+ m_pContEdit.clear();
+ m_pContFromEdit.clear();
+ SfxTabPage::dispose();
+}
+
void SwEndNoteOptionPage::Reset( const SfxItemSet* )
{
boost::scoped_ptr<SwEndNoteInfo> pInf(bEndNote ? new SwEndNoteInfo( pSh->GetEndNoteInfo() )
@@ -219,13 +246,9 @@ void SwEndNoteOptionPage::Reset( const SfxItemSet* )
m_pPageTemplBox->SelectEntry( pInf->GetPageDesc( *pSh->GetDoc() )->GetName());
}
-SwEndNoteOptionPage::~SwEndNoteOptionPage()
-{
-}
-
-SfxTabPage *SwEndNoteOptionPage::Create( vcl::Window *pParent, const SfxItemSet *rSet )
+VclPtr<SfxTabPage> SwEndNoteOptionPage::Create( vcl::Window *pParent, const SfxItemSet *rSet )
{
- return new SwEndNoteOptionPage( pParent, true, *rSet );
+ return VclPtr<SwEndNoteOptionPage>::Create( pParent, true, *rSet );
}
// Different kinds of numbering; because the Listbox has varying numbers of
@@ -399,9 +422,9 @@ SwFootNoteOptionPage::~SwFootNoteOptionPage()
{
}
-SfxTabPage *SwFootNoteOptionPage::Create(vcl::Window *pParent, const SfxItemSet *rSet )
+VclPtr<SfxTabPage> SwFootNoteOptionPage::Create(vcl::Window *pParent, const SfxItemSet *rSet )
{
- return new SwFootNoteOptionPage( pParent, *rSet );
+ return VclPtr<SfxTabPage>(new SwFootNoteOptionPage( pParent, *rSet ), SAL_NO_ACQUIRE);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/misc/glosbib.cxx b/sw/source/ui/misc/glosbib.cxx
index 11a3666236bb..7f86ef083348 100644
--- a/sw/source/ui/misc/glosbib.cxx
+++ b/sw/source/ui/misc/glosbib.cxx
@@ -112,6 +112,18 @@ SwGlossaryGroupDlg::SwGlossaryGroupDlg(vcl::Window * pParent,
SwGlossaryGroupDlg::~SwGlossaryGroupDlg()
{
+ disposeOnce();
+}
+
+void SwGlossaryGroupDlg::dispose()
+{
+ m_pNameED.clear();
+ m_pPathLB.clear();
+ m_pGroupTLB.clear();
+ m_pNewPB.clear();
+ m_pDelPB.clear();
+ m_pRenamePB.clear();
+ SvxStandardDialog::dispose();
}
void SwGlossaryGroupDlg::Apply()
@@ -139,8 +151,8 @@ void SwGlossaryGroupDlg::Apply()
const OUString sMsg(SW_RESSTR(STR_QUERY_DELETE_GROUP1)
+ sTitle
+ SW_RESSTR(STR_QUERY_DELETE_GROUP2));
- QueryBox aQuery(this->GetParent(), WB_YES_NO|WB_DEF_NO, sMsg );
- if(RET_YES == aQuery.Execute())
+ ScopedVclPtrInstance< QueryBox > aQuery(this->GetParent(), WB_YES_NO|WB_DEF_NO, sMsg );
+ if(RET_YES == aQuery->Execute())
pGlosHdl->DelGroup( sDelGroup );
}
diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx
index 858fd69bdd3a..3664343de66a 100644
--- a/sw/source/ui/misc/glossary.cxx
+++ b/sw/source/ui/misc/glossary.cxx
@@ -115,12 +115,12 @@ struct GroupUserData
// dialog for new block name
class SwNewGlosNameDlg : public ModalDialog
{
- Edit* m_pNewName;
- TextFilter m_aNoSpaceFilter;
- Edit* m_pNewShort;
- OKButton* m_pOk;
- Edit* m_pOldName;
- Edit* m_pOldShort;
+ VclPtr<Edit> m_pNewName;
+ TextFilter m_aNoSpaceFilter;
+ VclPtr<Edit> m_pNewShort;
+ VclPtr<OKButton> m_pOk;
+ VclPtr<Edit> m_pOldName;
+ VclPtr<Edit> m_pOldShort;
protected:
DECL_LINK( Modify, Edit * );
@@ -130,6 +130,8 @@ public:
SwNewGlosNameDlg( vcl::Window* pParent,
const OUString& rOldName,
const OUString& rOldShort );
+ virtual ~SwNewGlosNameDlg();
+ virtual void dispose() SAL_OVERRIDE;
OUString GetNewName() const { return m_pNewName->GetText(); }
OUString GetNewShort() const { return m_pNewShort->GetText(); }
@@ -156,6 +158,21 @@ SwNewGlosNameDlg::SwNewGlosNameDlg(vcl::Window* pParent,
m_pNewName->GrabFocus();
}
+SwNewGlosNameDlg::~SwNewGlosNameDlg()
+{
+ disposeOnce();
+}
+
+void SwNewGlosNameDlg::dispose()
+{
+ m_pNewName.clear();
+ m_pNewShort.clear();
+ m_pOk.clear();
+ m_pOldName.clear();
+ m_pOldShort.clear();
+ ModalDialog::dispose();
+}
+
// query / set currently set group
OUString SwGlossaryDlg::GetCurrGroup()
{
@@ -232,8 +249,26 @@ SwGlossaryDlg::SwGlossaryDlg(SfxViewFrame* pViewFrame,
SwGlossaryDlg::~SwGlossaryDlg()
{
+ disposeOnce();
+}
+
+void SwGlossaryDlg::dispose()
+{
m_pCategoryBox->Clear();
delete pExampleFrame;
+ m_pInsertTipCB.clear();
+ m_pNameED.clear();
+ m_pShortNameLbl.clear();
+ m_pShortNameEdit.clear();
+ m_pCategoryBox.clear();
+ m_pFileRelCB.clear();
+ m_pNetRelCB.clear();
+ m_pExampleWIN.clear();
+ m_pInsertBtn.clear();
+ m_pEditBtn.clear();
+ m_pBibBtn.clear();
+ m_pPathBtn.clear();
+ SvxStandardDialog::dispose();
}
// select new group
@@ -468,8 +503,8 @@ IMPL_LINK( SwGlossaryDlg, MenuHdl, Menu *, pMn )
else if (sItemIdent == "rename")
{
m_pShortNameEdit->SetText(pGlossaryHdl->GetGlossaryShortName(m_pNameED->GetText()));
- boost::scoped_ptr<SwNewGlosNameDlg> pNewNameDlg(new SwNewGlosNameDlg(this, m_pNameED->GetText(),
- m_pShortNameEdit->GetText() ));
+ ScopedVclPtrInstance<SwNewGlosNameDlg> pNewNameDlg(this, m_pNameED->GetText(),
+ m_pShortNameEdit->GetText());
if( RET_OK == pNewNameDlg->Execute() &&
pGlossaryHdl->Rename( m_pShortNameEdit->GetText(),
pNewNameDlg->GetNewShort(),
@@ -488,8 +523,8 @@ IMPL_LINK( SwGlossaryDlg, MenuHdl, Menu *, pMn )
}
else if (sItemIdent == "delete")
{
- MessageDialog aQuery(this, SW_RES(STR_QUERY_DELETE), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO);
- if (RET_YES == aQuery.Execute())
+ ScopedVclPtrInstance< MessageDialog > aQuery(this, SW_RES(STR_QUERY_DELETE), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO);
+ if (RET_YES == aQuery->Execute())
{
const OUString aShortName(m_pShortNameEdit->GetText());
const OUString aTitle(m_pNameED->GetText());
@@ -616,7 +651,7 @@ IMPL_LINK_NOARG(SwGlossaryDlg, BibHdl)
if(bIsWritable)
{
- boost::scoped_ptr<SwGlossaryGroupDlg> pDlg(new SwGlossaryGroupDlg( this, pGloss->GetPathArray(), pGlossaryHdl ));
+ ScopedVclPtrInstance< SwGlossaryGroupDlg > pDlg( this, pGloss->GetPathArray(), pGlossaryHdl );
if ( RET_OK == pDlg->Execute() )
{
Init();
@@ -646,9 +681,9 @@ IMPL_LINK_NOARG(SwGlossaryDlg, BibHdl)
}
else
{
- MessageDialog aBox(this, sReadonlyPath, VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO);
+ ScopedVclPtrInstance< MessageDialog > aBox(this, sReadonlyPath, VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO);
- if(RET_YES == aBox.Execute())
+ if(RET_YES == aBox->Execute())
PathHdl(m_pPathBtn);
}
}
diff --git a/sw/source/ui/misc/impfnote.hxx b/sw/source/ui/misc/impfnote.hxx
index f9808c4dc040..31b5f8a920d0 100644
--- a/sw/source/ui/misc/impfnote.hxx
+++ b/sw/source/ui/misc/impfnote.hxx
@@ -30,27 +30,27 @@ class SwWrtShell;
class SwEndNoteOptionPage : public SfxTabPage
{
- SwNumberingTypeListBox* m_pNumViewBox;
- FixedText* m_pOffsetLbl;
- NumericField* m_pOffsetFld;
- ListBox* m_pNumCountBox;
- Edit* m_pPrefixED;
- Edit* m_pSuffixED;
- FixedText* m_pPosFT;
- RadioButton* m_pPosPageBox;
- RadioButton* m_pPosChapterBox;
+ VclPtr<SwNumberingTypeListBox> m_pNumViewBox;
+ VclPtr<FixedText> m_pOffsetLbl;
+ VclPtr<NumericField> m_pOffsetFld;
+ VclPtr<ListBox> m_pNumCountBox;
+ VclPtr<Edit> m_pPrefixED;
+ VclPtr<Edit> m_pSuffixED;
+ VclPtr<FixedText> m_pPosFT;
+ VclPtr<RadioButton> m_pPosPageBox;
+ VclPtr<RadioButton> m_pPosChapterBox;
- VclContainer *m_pStylesContainer;
+ VclPtr<VclContainer> m_pStylesContainer;
- ListBox* m_pParaTemplBox;
- FixedText* m_pPageTemplLbl;
- ListBox* m_pPageTemplBox;
+ VclPtr<ListBox> m_pParaTemplBox;
+ VclPtr<FixedText> m_pPageTemplLbl;
+ VclPtr<ListBox> m_pPageTemplBox;
- ListBox* m_pFtnCharAnchorTemplBox;
- ListBox* m_pFtnCharTextTemplBox;
+ VclPtr<ListBox> m_pFtnCharAnchorTemplBox;
+ VclPtr<ListBox> m_pFtnCharTextTemplBox;
- Edit* m_pContEdit;
- Edit* m_pContFromEdit;
+ VclPtr<Edit> m_pContEdit;
+ VclPtr<Edit> m_pContFromEdit;
OUString aNumDoc;
OUString aNumPage;
@@ -70,8 +70,9 @@ public:
SwEndNoteOptionPage( vcl::Window *pParent, bool bEndNote,
const SfxItemSet &rSet );
virtual ~SwEndNoteOptionPage();
+ virtual void dispose() SAL_OVERRIDE;
- static SfxTabPage *Create(vcl::Window *pParent, const SfxItemSet *rSet);
+ static VclPtr<SfxTabPage> Create(vcl::Window *pParent, const SfxItemSet *rSet);
virtual bool FillItemSet(SfxItemSet *rSet) SAL_OVERRIDE;
virtual void Reset( const SfxItemSet* ) SAL_OVERRIDE;
@@ -84,7 +85,7 @@ class SwFootNoteOptionPage : public SwEndNoteOptionPage
virtual ~SwFootNoteOptionPage();
public:
- static SfxTabPage *Create(vcl::Window *pParent, const SfxItemSet *rSet);
+ static VclPtr<SfxTabPage> Create(vcl::Window *pParent, const SfxItemSet *rSet);
};
#endif
diff --git a/sw/source/ui/misc/insfnote.cxx b/sw/source/ui/misc/insfnote.cxx
index fb45db53321d..0824f3de8fd3 100644
--- a/sw/source/ui/misc/insfnote.cxx
+++ b/sw/source/ui/misc/insfnote.cxx
@@ -204,10 +204,27 @@ SwInsFootNoteDlg::SwInsFootNoteDlg(vcl::Window *pParent, SwWrtShell &rShell, boo
SwInsFootNoteDlg::~SwInsFootNoteDlg()
{
+ disposeOnce();
+}
+
+void SwInsFootNoteDlg::dispose()
+{
SwViewShell::SetCareWin(0);
if (bEdit)
rSh.ResetSelect(0, false);
+
+ m_pNumberFrame.clear();
+ m_pNumberAutoBtn.clear();
+ m_pNumberCharBtn.clear();
+ m_pNumberCharEdit.clear();
+ m_pNumberExtChar.clear();
+ m_pFtnBtn.clear();
+ m_pEndNoteBtn.clear();
+ m_pOkBtn.clear();
+ m_pPrevBT.clear();
+ m_pNextBT.clear();
+ SvxStandardDialog::dispose();
}
void SwInsFootNoteDlg::Init()
diff --git a/sw/source/ui/misc/linenum.cxx b/sw/source/ui/misc/linenum.cxx
index db98b1ce87b1..b14903c9e170 100644
--- a/sw/source/ui/misc/linenum.cxx
+++ b/sw/source/ui/misc/linenum.cxx
@@ -169,8 +169,30 @@ SwLineNumberingDlg::SwLineNumberingDlg(SwView *pVw)
SwLineNumberingDlg::~SwLineNumberingDlg()
{
+ disposeOnce();
}
+void SwLineNumberingDlg::dispose()
+{
+ m_pBodyContent.clear();
+ m_pDivIntervalFT.clear();
+ m_pDivIntervalNF.clear();
+ m_pDivRowsFT.clear();
+ m_pNumIntervalNF.clear();
+ m_pCharStyleLB.clear();
+ m_pFormatLB.clear();
+ m_pPosLB.clear();
+ m_pOffsetMF.clear();
+ m_pDivisorED.clear();
+ m_pCountEmptyLinesCB.clear();
+ m_pCountFrameLinesCB.clear();
+ m_pRestartEachPageCB.clear();
+ m_pNumberingOnCB.clear();
+ m_pNumberingOnFooterHeader.clear();
+ SfxModalDialog::dispose();
+}
+
+
IMPL_LINK_NOARG(SwLineNumberingDlg, OKHdl)
{
SwLineNumberInfo aInf(pSh->GetLineNumberInfo());
diff --git a/sw/source/ui/misc/num.cxx b/sw/source/ui/misc/num.cxx
index cd9c26626de3..50047f254f4f 100644
--- a/sw/source/ui/misc/num.cxx
+++ b/sw/source/ui/misc/num.cxx
@@ -163,7 +163,37 @@ SwNumPositionTabPage::SwNumPositionTabPage(vcl::Window* pParent,
SwNumPositionTabPage::~SwNumPositionTabPage()
{
+ disposeOnce();
+}
+
+void SwNumPositionTabPage::dispose()
+{
delete pActNum;
+ m_pLevelLB.clear();
+ m_pPositionFrame.clear();
+ m_pDistBorderFT.clear();
+ m_pDistBorderMF.clear();
+ m_pRelativeCB.clear();
+ m_pIndentFT.clear();
+ m_pIndentMF.clear();
+ m_pDistNumFT.clear();
+ m_pDistNumMF.clear();
+ m_pAlignFT.clear();
+ m_pAlignLB.clear();
+ m_pLabelFollowedByFT.clear();
+ m_pLabelFollowedByLB.clear();
+ m_pListtabFT.clear();
+ m_pListtabMF.clear();
+ m_pAlign2FT.clear();
+ m_pAlign2LB.clear();
+ m_pAlignedAtFT.clear();
+ m_pAlignedAtMF.clear();
+ m_pIndentAtFT.clear();
+ m_pIndentAtMF.clear();
+ m_pStandardPB.clear();
+ m_pPreviewWIN.clear();
+ pOutlineDlg.clear();
+ SfxTabPage::dispose();
}
void SwNumPositionTabPage::InitControls()
@@ -175,9 +205,9 @@ void SwNumPositionTabPage::InitControls()
USHRT_MAX != nActNumLvl;
m_pDistBorderMF->Enable( !bLabelAlignmentPosAndSpaceModeActive &&
- ( bSingleSelection || bRelative || pOutlineDlg != 0 ) );
+ ( bSingleSelection || bRelative || pOutlineDlg.get() != 0 ) );
m_pDistBorderFT->Enable( !bLabelAlignmentPosAndSpaceModeActive &&
- ( bSingleSelection || bRelative || pOutlineDlg != 0 ) );
+ ( bSingleSelection || bRelative || pOutlineDlg.get() != 0 ) );
bool bSetDistEmpty = false;
bool bSameDistBorderNum = !bLabelAlignmentPosAndSpaceModeActive;
@@ -512,10 +542,10 @@ void SwNumPositionTabPage::ShowControlsDependingOnPosAndSpaceMode()
m_pIndentAtMF->Show( bLabelAlignmentPosAndSpaceModeActive );
}
-SfxTabPage* SwNumPositionTabPage::Create( vcl::Window* pParent,
- const SfxItemSet* rAttrSet)
+VclPtr<SfxTabPage> SwNumPositionTabPage::Create( vcl::Window* pParent,
+ const SfxItemSet* rAttrSet)
{
- return new SwNumPositionTabPage(pParent, *rAttrSet);
+ return VclPtr<SwNumPositionTabPage>::Create(pParent, *rAttrSet);
}
void SwNumPositionTabPage::SetWrtShell(SwWrtShell* pSh)
@@ -960,15 +990,15 @@ void SwSvxNumBulletTabDialog::PageCreated(sal_uInt16 nPageId, SfxTabPage& rPage)
aSet.Put (SfxStringItem(SID_NUM_CHAR_FMT,sNumCharFmt));
aSet.Put (SfxStringItem(SID_BULLET_CHAR_FMT,sBulletCharFmt));
// collect char styles
- ListBox rCharFmtLB(this);
- rCharFmtLB.Clear();
- rCharFmtLB.InsertEntry( SwViewShell::GetShellRes()->aStrNone );
+ ScopedVclPtrInstance< ListBox > rCharFmtLB(this);
+ rCharFmtLB->Clear();
+ rCharFmtLB->InsertEntry( SwViewShell::GetShellRes()->aStrNone );
SwDocShell* pDocShell = rWrtSh.GetView().GetDocShell();
- ::FillCharStyleListBox(rCharFmtLB, pDocShell);
+ ::FillCharStyleListBox(*rCharFmtLB.get(), pDocShell);
std::vector<OUString> aList;
- for(sal_Int32 j = 0; j < rCharFmtLB.GetEntryCount(); j++)
- aList.push_back( rCharFmtLB.GetEntry(j) );
+ for(sal_Int32 j = 0; j < rCharFmtLB->GetEntryCount(); j++)
+ aList.push_back( rCharFmtLB->GetEntry(j) );
aSet.Put( SfxStringListItem( SID_CHAR_FMT_LIST_BOX,&aList ) ) ;
diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx
index c9ef5a1d1631..c66b86947e80 100644
--- a/sw/source/ui/misc/outline.cxx
+++ b/sw/source/ui/misc/outline.cxx
@@ -60,9 +60,9 @@ using namespace ::com::sun::star;
class SwNumNamesDlg : public ModalDialog
{
- Edit* m_pFormEdit;
- ListBox* m_pFormBox;
- OKButton* m_pOKBtn;
+ VclPtr<Edit> m_pFormEdit;
+ VclPtr<ListBox> m_pFormBox;
+ VclPtr<OKButton> m_pOKBtn;
DECL_LINK( ModifyHdl, Edit * );
DECL_LINK( SelectHdl, ListBox * );
@@ -70,11 +70,27 @@ class SwNumNamesDlg : public ModalDialog
public:
SwNumNamesDlg(vcl::Window *pParent);
+ virtual ~SwNumNamesDlg();
+ virtual void dispose() SAL_OVERRIDE;
void SetUserNames(const OUString *pList[]);
OUString GetName() const { return m_pFormEdit->GetText(); }
sal_Int32 GetCurEntryPos() const { return m_pFormBox->GetSelectEntryPos(); }
};
+SwNumNamesDlg::~SwNumNamesDlg()
+{
+ disposeOnce();
+}
+
+void SwNumNamesDlg::dispose()
+{
+ m_pFormEdit.clear();
+ m_pFormBox.clear();
+ m_pOKBtn.clear();
+ ModalDialog::dispose();
+}
+
+
// remember selected entry
IMPL_LINK_INLINE_START( SwNumNamesDlg, SelectHdl, ListBox *, pBox )
{
@@ -193,7 +209,13 @@ SwOutlineTabDialog::SwOutlineTabDialog(vcl::Window* pParent, const SfxItemSet* p
SwOutlineTabDialog::~SwOutlineTabDialog()
{
+ disposeOnce();
+}
+
+void SwOutlineTabDialog::dispose()
+{
delete pNumRule;
+ SfxTabDialog::dispose();
}
void SwOutlineTabDialog::PageCreated(sal_uInt16 nPageId, SfxTabPage& rPage)
@@ -265,7 +287,7 @@ IMPL_LINK( SwOutlineTabDialog, MenuSelectHdl, Menu *, pMenu )
nLevelNo = 9;
else if (sIdent == "saveas")
{
- boost::scoped_ptr<SwNumNamesDlg> pDlg(new SwNumNamesDlg(this));
+ VclPtrInstance< SwNumNamesDlg > pDlg(this);
const OUString *aStrArr[SwChapterNumRules::nMaxRules];
for(sal_uInt16 i = 0; i < SwChapterNumRules::nMaxRules; ++i)
{
@@ -740,8 +762,25 @@ IMPL_LINK_NOARG(SwOutlineSettingsTabPage, CharFmtHdl)
SwOutlineSettingsTabPage::~SwOutlineSettingsTabPage()
{
+ disposeOnce();
}
+void SwOutlineSettingsTabPage::dispose()
+{
+ m_pLevelLB.clear();
+ m_pCollBox.clear();
+ m_pNumberBox.clear();
+ m_pCharFmtLB.clear();
+ m_pAllLevelFT.clear();
+ m_pAllLevelNF.clear();
+ m_pPrefixED.clear();
+ m_pSuffixED.clear();
+ m_pStartEdit.clear();
+ m_pPreviewWIN.clear();
+ SfxTabPage::dispose();
+}
+
+
void SwOutlineSettingsTabPage::SetWrtShell(SwWrtShell* pShell)
{
pSh = pShell;
@@ -826,10 +865,10 @@ void SwOutlineSettingsTabPage::Reset( const SfxItemSet* rSet )
ActivatePage(*rSet);
}
-SfxTabPage* SwOutlineSettingsTabPage::Create( vcl::Window* pParent,
- const SfxItemSet* rAttrSet)
+VclPtr<SfxTabPage> SwOutlineSettingsTabPage::Create( vcl::Window* pParent,
+ const SfxItemSet* rAttrSet)
{
- return new SwOutlineSettingsTabPage(pParent, *rAttrSet);
+ return VclPtr<SwOutlineSettingsTabPage>::Create(pParent, *rAttrSet);
}
void SwOutlineSettingsTabPage::CheckForStartValue_Impl(sal_uInt16 nNumberingType)
@@ -892,7 +931,7 @@ void NumberingPreview::Paint( const Rectangle& /*rRect*/ )
{
const Size aSize(PixelToLogic(GetOutputSizePixel()));
- boost::scoped_ptr<VirtualDevice> pVDev(new VirtualDevice(*this));
+ ScopedVclPtrInstance< VirtualDevice > pVDev(*this);
pVDev->SetMapMode(GetMapMode());
pVDev->SetOutputSize( aSize );
diff --git a/sw/source/ui/misc/pgfnote.cxx b/sw/source/ui/misc/pgfnote.cxx
index 809b09007fa9..bd8b00829e65 100644
--- a/sw/source/ui/misc/pgfnote.cxx
+++ b/sw/source/ui/misc/pgfnote.cxx
@@ -135,11 +135,27 @@ SwFootNotePage::SwFootNotePage(vcl::Window *pParent, const SfxItemSet &rSet)
SwFootNotePage::~SwFootNotePage()
{
+ disposeOnce();
}
-SfxTabPage* SwFootNotePage::Create(vcl::Window *pParent, const SfxItemSet *rSet)
+void SwFootNotePage::dispose()
{
- return new SwFootNotePage(pParent, *rSet);
+ m_pMaxHeightPageBtn.clear();
+ m_pMaxHeightBtn.clear();
+ m_pMaxHeightEdit.clear();
+ m_pDistEdit.clear();
+ m_pLinePosBox.clear();
+ m_pLineTypeBox.clear();
+ m_pLineWidthEdit.clear();
+ m_pLineColorBox.clear();
+ m_pLineLengthEdit.clear();
+ m_pLineDistEdit.clear();
+ SfxTabPage::dispose();
+}
+
+VclPtr<SfxTabPage> SwFootNotePage::Create(vcl::Window *pParent, const SfxItemSet *rSet)
+{
+ return VclPtr<SfxTabPage>(new SwFootNotePage(pParent, *rSet), SAL_NO_ACQUIRE);
}
void SwFootNotePage::Reset(const SfxItemSet *rSet)
diff --git a/sw/source/ui/misc/pggrid.cxx b/sw/source/ui/misc/pggrid.cxx
index d4908da737a6..100a2c4d8d67 100644
--- a/sw/source/ui/misc/pggrid.cxx
+++ b/sw/source/ui/misc/pggrid.cxx
@@ -151,14 +151,41 @@ SwTextGridPage::SwTextGridPage(vcl::Window *pParent, const SfxItemSet &rSet) :
SwTextGridPage::~SwTextGridPage()
{
+ disposeOnce();
}
-SfxTabPage *SwTextGridPage::Create(vcl::Window *pParent, const SfxItemSet *rSet)
+void SwTextGridPage::dispose()
{
- return new SwTextGridPage(pParent, *rSet);
+ m_pNoGridRB.clear();
+ m_pLinesGridRB.clear();
+ m_pCharsGridRB.clear();
+ m_pSnapToCharsCB.clear();
+ m_pExampleWN.clear();
+ m_pLayoutFL.clear();
+ m_pLinesPerPageNF.clear();
+ m_pLinesRangeFT.clear();
+ m_pTextSizeMF.clear();
+ m_pCharsPerLineFT.clear();
+ m_pCharsPerLineNF.clear();
+ m_pCharsRangeFT.clear();
+ m_pCharWidthFT.clear();
+ m_pCharWidthMF.clear();
+ m_pRubySizeFT.clear();
+ m_pRubySizeMF.clear();
+ m_pRubyBelowCB.clear();
+ m_pDisplayFL.clear();
+ m_pDisplayCB.clear();
+ m_pPrintCB.clear();
+ m_pColorLB.clear();
+ SfxTabPage::dispose();
}
-bool SwTextGridPage::FillItemSet(SfxItemSet *rSet)
+VclPtr<SfxTabPage> SwTextGridPage::Create(vcl::Window *pParent, const SfxItemSet *rSet)
+{
+ return VclPtr<SfxTabPage>(new SwTextGridPage(pParent, *rSet), SAL_NO_ACQUIRE);
+}
+
+bool SwTextGridPage::FillItemSet(SfxItemSet *rSet)
{
bool bRet = false;
if(m_pNoGridRB->IsValueChangedFromSaved() ||
@@ -460,7 +487,7 @@ IMPL_LINK(SwTextGridPage, TextSizeChangedHdl, SpinField*, pField)
IMPL_LINK(SwTextGridPage, GridTypeHdl, RadioButton*, pButton)
{
- bool bEnable = m_pNoGridRB != pButton;
+ bool bEnable = m_pNoGridRB.get() != pButton;
m_pLayoutFL->Enable(bEnable);
m_pDisplayFL->Enable(bEnable);
diff --git a/sw/source/ui/misc/srtdlg.cxx b/sw/source/ui/misc/srtdlg.cxx
index 3c58114764b1..bb7bcd01222f 100644
--- a/sw/source/ui/misc/srtdlg.cxx
+++ b/sw/source/ui/misc/srtdlg.cxx
@@ -250,10 +250,41 @@ SwSortDlg::SwSortDlg(vcl::Window* pParent, SwWrtShell &rShell)
SwSortDlg::~SwSortDlg()
{
+ disposeOnce();
+}
+
+void SwSortDlg::dispose()
+{
::lcl_ClearLstBoxAndDelUserData(*m_pTypDLB1);
::lcl_ClearLstBoxAndDelUserData(*m_pTypDLB2);
::lcl_ClearLstBoxAndDelUserData(*m_pTypDLB3);
delete pColRes;
+ m_pColLbl.clear();
+ m_pTypLbl.clear();
+ m_pKeyCB1.clear();
+ m_pColEdt1.clear();
+ m_pTypDLB1.clear();
+ m_pSortUp1RB.clear();
+ m_pSortDn1RB.clear();
+ m_pKeyCB2.clear();
+ m_pColEdt2.clear();
+ m_pTypDLB2.clear();
+ m_pSortUp2RB.clear();
+ m_pSortDn2RB.clear();
+ m_pKeyCB3.clear();
+ m_pColEdt3.clear();
+ m_pTypDLB3.clear();
+ m_pSortUp3RB.clear();
+ m_pSortDn3RB.clear();
+ m_pColumnRB.clear();
+ m_pRowRB.clear();
+ m_pDelimTabRB.clear();
+ m_pDelimFreeRB.clear();
+ m_pDelimEdt.clear();
+ m_pDelimPB.clear();
+ m_pLangLB.clear();
+ m_pCaseCB.clear();
+ SvxStandardDialog::dispose();
}
sal_Unicode SwSortDlg::GetDelimChar() const
@@ -381,7 +412,7 @@ IMPL_LINK_NOARG(SwSortDlg, DelimCharHdl)
IMPL_LINK( SwSortDlg, CheckHdl, void *, pControl )
{
- if( pControl == m_pRowRB)
+ if( pControl == m_pRowRB.get())
{
m_pColLbl->SetText(aColTxt);
m_pColEdt1->SetMax(nY);
@@ -392,7 +423,7 @@ IMPL_LINK( SwSortDlg, CheckHdl, void *, pControl )
m_pColEdt2->SetAccessibleName(aColTxt);
m_pColEdt3->SetAccessibleName(aColTxt);
}
- else if( pControl == m_pColumnRB)
+ else if( pControl == m_pColumnRB.get())
{
m_pColLbl->SetText(aRowTxt);
m_pColEdt1->SetMax(nX);
diff --git a/sw/source/ui/misc/swmodalredlineacceptdlg.cxx b/sw/source/ui/misc/swmodalredlineacceptdlg.cxx
index 153bbc1a27f7..252e264f4b58 100644
--- a/sw/source/ui/misc/swmodalredlineacceptdlg.cxx
+++ b/sw/source/ui/misc/swmodalredlineacceptdlg.cxx
@@ -55,10 +55,16 @@ SwModalRedlineAcceptDlg::SwModalRedlineAcceptDlg(vcl::Window *pParent)
SwModalRedlineAcceptDlg::~SwModalRedlineAcceptDlg()
{
+ disposeOnce();
+}
+
+void SwModalRedlineAcceptDlg::dispose()
+{
AcceptAll(false); // refuse everything remaining
pImplDlg->FillInfo(GetExtraData());
delete pImplDlg;
+ SfxModalDialog::dispose();
}
void SwModalRedlineAcceptDlg::Activate()
diff --git a/sw/source/ui/misc/titlepage.cxx b/sw/source/ui/misc/titlepage.cxx
index 2dbd5ec742c6..5f888f3f7497 100644
--- a/sw/source/ui/misc/titlepage.cxx
+++ b/sw/source/ui/misc/titlepage.cxx
@@ -270,7 +270,25 @@ IMPL_LINK_NOARG(SwTitlePageDlg, StartPageHdl)
SwTitlePageDlg::~SwTitlePageDlg()
{
+ disposeOnce();
+}
+
+void SwTitlePageDlg::dispose()
+{
delete mpPageFmtDesc;
+ m_pUseExistingPagesRB.clear();
+ m_pPageCountNF.clear();
+ m_pDocumentStartRB.clear();
+ m_pPageStartRB.clear();
+ m_pPageStartNF.clear();
+ m_pRestartNumberingCB.clear();
+ m_pRestartNumberingNF.clear();
+ m_pSetPageNumberCB.clear();
+ m_pSetPageNumberNF.clear();
+ m_pPagePropertiesLB.clear();
+ m_pPagePropertiesPB.clear();
+ m_pOkPB.clear();
+ SfxModalDialog::dispose();
}
IMPL_LINK_NOARG(SwTitlePageDlg, EditHdl)