diff options
author | Noel Grandin <noel@peralex.com> | 2015-02-11 14:42:23 +0200 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2015-04-09 22:17:00 +0100 |
commit | 00f2787a4a68633206635743298926bf2e65a8fa (patch) | |
tree | efc3a4f02b3d8acd69d25071499be5a475cb0338 /sw/source/ui/misc | |
parent | b3dcb2996b70caabda1939c9e85545c97d78404a (diff) |
vclwidgets: wrap all vcl::Window subclasses allocated on stack in VclPtr
Change-Id: Ia8b0d84bbf69f9d8f85505d019acdded14e25133
Conflicts:
sw/qa/tiledrendering/tiledrendering.cxx
Diffstat (limited to 'sw/source/ui/misc')
-rw-r--r-- | sw/source/ui/misc/glosbib.cxx | 4 | ||||
-rw-r--r-- | sw/source/ui/misc/glossary.cxx | 8 | ||||
-rw-r--r-- | sw/source/ui/misc/num.cxx | 12 |
3 files changed, 12 insertions, 12 deletions
diff --git a/sw/source/ui/misc/glosbib.cxx b/sw/source/ui/misc/glosbib.cxx index 11a3666236bb..fcdec5ab38bf 100644 --- a/sw/source/ui/misc/glosbib.cxx +++ b/sw/source/ui/misc/glosbib.cxx @@ -139,8 +139,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()) + VclPtr<QueryBox> aQuery(new QueryBox(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 75db8cd62a1e..47fb56870532 100644 --- a/sw/source/ui/misc/glossary.cxx +++ b/sw/source/ui/misc/glossary.cxx @@ -494,8 +494,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()) + VclPtr<MessageDialog> aQuery(new MessageDialog(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()); @@ -652,9 +652,9 @@ IMPL_LINK_NOARG(SwGlossaryDlg, BibHdl) } else { - MessageDialog aBox(this, sReadonlyPath, VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); + VclPtr<MessageDialog> aBox(new MessageDialog(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/num.cxx b/sw/source/ui/misc/num.cxx index 87b535d482b5..65543804b845 100644 --- a/sw/source/ui/misc/num.cxx +++ b/sw/source/ui/misc/num.cxx @@ -966,15 +966,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 ); + VclPtr<ListBox> rCharFmtLB(new ListBox(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 ) ) ; |