summaryrefslogtreecommitdiff
path: root/sw/source/ui/index
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-02-11 14:42:23 +0200
committerMichael Meeks <michael.meeks@collabora.com>2015-04-09 22:17:00 +0100
commit00f2787a4a68633206635743298926bf2e65a8fa (patch)
treeefc3a4f02b3d8acd69d25071499be5a475cb0338 /sw/source/ui/index
parentb3dcb2996b70caabda1939c9e85545c97d78404a (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/index')
-rw-r--r--sw/source/ui/index/cnttab.cxx4
-rw-r--r--sw/source/ui/index/swuiidxmrk.cxx14
2 files changed, 9 insertions, 9 deletions
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index 89db59c34d24..9bcaa1f8e2bb 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -488,8 +488,8 @@ IMPL_LINK_NOARG( SwMultiTOXTabDialog, ShowPreviewHdl )
OUString sInfo(SW_RESSTR(STR_FILE_NOT_FOUND));
sInfo = sInfo.replaceFirst( "%1", sTemplate );
sInfo = sInfo.replaceFirst( "%2", aOpt.GetTemplatePath() );
- InfoBox aInfo(GetParent(), sInfo);
- aInfo.Execute();
+ VclPtr<InfoBox> aInfo(new InfoBox(GetParent(), sInfo));
+ aInfo->Execute();
}
else
{
diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx
index 701c6aee6250..9a5f7985b783 100644
--- a/sw/source/ui/index/swuiidxmrk.cxx
+++ b/sw/source/ui/index/swuiidxmrk.cxx
@@ -1201,8 +1201,8 @@ IMPL_LINK_NOARG(SwAuthorMarkPane, InsertHdl)
bDifferent |= m_sFields[i] != pEntry->GetAuthorField((ToxAuthorityField)i);
if(bDifferent)
{
- MessageDialog aQuery(&m_rDialog, SW_RES(STR_QUERY_CHANGE_AUTH_ENTRY), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO);
- if(RET_YES != aQuery.Execute())
+ VclPtr<MessageDialog> aQuery(new MessageDialog(&m_rDialog, SW_RES(STR_QUERY_CHANGE_AUTH_ENTRY), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO));
+ if(RET_YES != aQuery->Execute())
return 0;
}
}
@@ -1241,14 +1241,14 @@ IMPL_LINK(SwAuthorMarkPane, CreateEntryHdl, PushButton*, pButton)
OUString sOldId = m_sCreatedEntry[0];
for(int i = 0; i < AUTH_FIELD_END; i++)
m_sCreatedEntry[i] = bCreate ? OUString() : m_sFields[i];
- SwCreateAuthEntryDlg_Impl aDlg(pButton,
+ VclPtr<SwCreateAuthEntryDlg_Impl> aDlg(new SwCreateAuthEntryDlg_Impl(pButton,
bCreate ? m_sCreatedEntry : m_sFields,
- *pSh, bNewEntry, bCreate);
+ *pSh, bNewEntry, bCreate));
if(bNewEntry)
{
- aDlg.SetCheckNameHdl(LINK(this, SwAuthorMarkPane, IsEntryAllowedHdl));
+ aDlg->SetCheckNameHdl(LINK(this, SwAuthorMarkPane, IsEntryAllowedHdl));
}
- if(RET_OK == aDlg.Execute())
+ if(RET_OK == aDlg->Execute())
{
if(bCreate && !sOldId.isEmpty())
{
@@ -1256,7 +1256,7 @@ IMPL_LINK(SwAuthorMarkPane, CreateEntryHdl, PushButton*, pButton)
}
for(int i = 0; i < AUTH_FIELD_END; i++)
{
- m_sFields[i] = aDlg.GetEntryText((ToxAuthorityField)i);
+ m_sFields[i] = aDlg->GetEntryText((ToxAuthorityField)i);
m_sCreatedEntry[i] = m_sFields[i];
}
if(bNewEntry && !m_pFromDocContentRB->IsChecked())