diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-07-26 10:21:41 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-07-26 11:26:52 +0100 |
commit | a860df25dd7bf62ecb6b3d3ed38803b981f56d52 (patch) | |
tree | 591e39d4fc9b3da4d3b84882e69baf88baa05507 /svx | |
parent | 87e2b0142a1724b9075f31acfc44011082ce8e12 (diff) |
masses of MessBoxes not being disposed promptly
since...
commit ba81e5c6bd420b41a84ade6ccd774011a8089f7f
Date: Thu May 28 21:35:43 2015 +0100
tdf#91702 - fix stack-based MessBox allocation.
There is no special ScopedVclPtr<X>::Create or
ScopedVclPtrInstance<X>::Create just
VclPtr<X>::Create and a raw VclPtr<X>::Create()->foo
doesn't call dispose on the owned X
Change-Id: Ifacc8d5e742820701307c3c37b9b86487667d84f
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/dialog/hdft.cxx | 4 | ||||
-rw-r--r-- | svx/source/dialog/imapdlg.cxx | 4 | ||||
-rw-r--r-- | svx/source/dialog/passwd.cxx | 4 | ||||
-rw-r--r-- | svx/source/form/fmshimp.cxx | 4 | ||||
-rw-r--r-- | svx/source/gallery2/galbrws1.cxx | 2 | ||||
-rw-r--r-- | svx/source/gallery2/galbrws2.cxx | 2 | ||||
-rw-r--r-- | svx/source/svdraw/svdedtv1.cxx | 2 | ||||
-rw-r--r-- | svx/source/svdraw/svdedxv.cxx | 2 | ||||
-rw-r--r-- | svx/source/svdraw/svdpntv.cxx | 2 |
9 files changed, 13 insertions, 13 deletions
diff --git a/svx/source/dialog/hdft.cxx b/svx/source/dialog/hdft.cxx index 8386822eef4a..57e1cc71ffcc 100644 --- a/svx/source/dialog/hdft.cxx +++ b/svx/source/dialog/hdft.cxx @@ -530,9 +530,9 @@ IMPL_LINK_TYPED( SvxHFPage, TurnOnHdl, Button *, pButton, void ) { short nResult; if (nId == SID_ATTR_PAGE_HEADERSET) - nResult = ScopedVclPtrInstance<DeleteHeaderDialog>::Create(this)->Execute(); + nResult = ScopedVclPtrInstance<DeleteHeaderDialog>(this)->Execute(); else - nResult = ScopedVclPtrInstance<DeleteFooterDialog>::Create(this)->Execute(); + nResult = ScopedVclPtrInstance<DeleteFooterDialog>(this)->Execute(); bDelete = nResult == RET_YES; } diff --git a/svx/source/dialog/imapdlg.cxx b/svx/source/dialog/imapdlg.cxx index 983d90fffa84..0c5549f77eb1 100644 --- a/svx/source/dialog/imapdlg.cxx +++ b/svx/source/dialog/imapdlg.cxx @@ -736,8 +736,8 @@ IMPL_LINK_NOARG_TYPED(SvxIMapDlg, UpdateHdl, Idle *, void) if ( pOwnData->pUpdateEditingObject != pCheckObj ) { if ( pIMapWnd->IsChanged() && - ( ScopedVclPtrInstance<MessageDialog>::Create( this,"QuerySaveImageMapChangesDialog", - "svx/ui/querysaveimagemapchangesdialog.ui" )->Execute() == RET_YES ) ) + ( ScopedVclPtrInstance<MessageDialog>(this,"QuerySaveImageMapChangesDialog", + "svx/ui/querysaveimagemapchangesdialog.ui")->Execute() == RET_YES ) ) { DoSave(); } diff --git a/svx/source/dialog/passwd.cxx b/svx/source/dialog/passwd.cxx index 6a1430dcabae..5dc973ed2f45 100644 --- a/svx/source/dialog/passwd.cxx +++ b/svx/source/dialog/passwd.cxx @@ -30,7 +30,7 @@ IMPL_LINK_NOARG_TYPED(SvxPasswordDialog, ButtonHdl, Button*, void) if ( m_pNewPasswdED->GetText() != m_pRepeatPasswdED->GetText() ) { - ScopedVclPtrInstance<MessageDialog>::Create(this, aRepeatPasswdErrStr)->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, aRepeatPasswdErrStr)->Execute(); m_pNewPasswdED->SetText( "" ); m_pRepeatPasswdED->SetText( "" ); m_pNewPasswdED->GrabFocus(); @@ -39,7 +39,7 @@ IMPL_LINK_NOARG_TYPED(SvxPasswordDialog, ButtonHdl, Button*, void) if ( bOK && aCheckPasswordHdl.IsSet() && !aCheckPasswordHdl.Call( this ) ) { - ScopedVclPtrInstance<MessageDialog>::Create(this, aOldPasswdErrStr)->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, aOldPasswdErrStr)->Execute(); m_pOldPasswdED->SetText( "" ); m_pOldPasswdED->GrabFocus(); bOK = false; diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx index f81e8cb0eb94..dd67e6e42fe3 100644 --- a/svx/source/form/fmshimp.cxx +++ b/svx/source/form/fmshimp.cxx @@ -1464,7 +1464,7 @@ void FmXFormShell::ExecuteSearch() if (m_aSearchForms.empty() ) { // es gibt keine Controls, die alle Bedingungen fuer eine Suche erfuellen - ScopedVclPtrInstance<MessageDialog>::Create(nullptr, SVX_RESSTR(RID_STR_NODATACONTROLS))->Execute(); + ScopedVclPtrInstance<MessageDialog>(nullptr, SVX_RESSTR(RID_STR_NODATACONTROLS))->Execute(); return; } @@ -3136,7 +3136,7 @@ void FmXFormShell::CreateExternalView() if (!bHaveUsableControls) { - ScopedVclPtrInstance<MessageDialog>::Create(nullptr, SVX_RESSTR(RID_STR_NOCONTROLS_FOR_EXTERNALDISPLAY))->Execute(); + ScopedVclPtrInstance<MessageDialog>(nullptr, SVX_RESSTR(RID_STR_NOCONTROLS_FOR_EXTERNALDISPLAY))->Execute(); return; } } diff --git a/svx/source/gallery2/galbrws1.cxx b/svx/source/gallery2/galbrws1.cxx index 3a5e08bba459..e3012a1d07bf 100644 --- a/svx/source/gallery2/galbrws1.cxx +++ b/svx/source/gallery2/galbrws1.cxx @@ -363,7 +363,7 @@ void GalleryBrowser1::ImplExecute( sal_uInt16 nId ) case MN_DELETE: { - if( ScopedVclPtrInstance<MessageDialog>::Create( nullptr, "QueryDeleteThemeDialog","svx/ui/querydeletethemedialog.ui")->Execute() == RET_YES ) + if( ScopedVclPtrInstance<MessageDialog>(nullptr, "QueryDeleteThemeDialog","svx/ui/querydeletethemedialog.ui")->Execute() == RET_YES ) mpGallery->RemoveTheme( mpThemes->GetSelectEntry() ); } break; diff --git a/svx/source/gallery2/galbrws2.cxx b/svx/source/gallery2/galbrws2.cxx index d56141c5fc8d..c6069dec1fb7 100644 --- a/svx/source/gallery2/galbrws2.cxx +++ b/svx/source/gallery2/galbrws2.cxx @@ -1133,7 +1133,7 @@ void GalleryBrowser2::Execute( sal_uInt16 nId ) case MN_DELETE: { if( !mpCurTheme->IsReadOnly() && - ScopedVclPtrInstance<MessageDialog>::Create(nullptr, "QueryDeleteObjectDialog","svx/ui/querydeleteobjectdialog.ui")->Execute() == RET_YES ) + ScopedVclPtrInstance<MessageDialog>(nullptr, "QueryDeleteObjectDialog","svx/ui/querydeleteobjectdialog.ui")->Execute() == RET_YES ) { mpCurTheme->RemoveObject( mnCurActionPos ); } diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx index 38d52217aff5..f6d9d4045433 100644 --- a/svx/source/svdraw/svdedtv1.cxx +++ b/svx/source/svdraw/svdedtv1.cxx @@ -984,7 +984,7 @@ void SdrEditView::SetAttrToMarked(const SfxItemSet& rAttr, bool bReplaceAll) if(bHasEEFeatureItems) { OUString aMessage("SdrEditView::SetAttrToMarked(): Setting EE_FEATURE items at the SdrView does not make sense! It only leads to overhead and unreadable documents."); - ScopedVclPtr<InfoBox>::Create(nullptr, aMessage)->Execute(); + ScopedVclPtrInstance<InfoBox>(nullptr, aMessage)->Execute(); } } #endif diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx index bcd01d3a2921..ab5416fbbd7d 100644 --- a/svx/source/svdraw/svdedxv.cxx +++ b/svx/source/svdraw/svdedxv.cxx @@ -1640,7 +1640,7 @@ bool SdrObjEditView::SetAttributes(const SfxItemSet& rSet, bool bReplaceAll) if(bHasEEFeatureItems) { OUString aMessage("SdrObjEditView::SetAttributes(): Setting EE_FEATURE items at the SdrView does not make sense! It only leads to overhead and unreadable documents."); - ScopedVclPtr<InfoBox>::Create(nullptr, aMessage)->Execute(); + ScopedVclPtrInstance<InfoBox>(nullptr, aMessage)->Execute(); } } #endif diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx index d8394579f46e..1b5a20af652f 100644 --- a/svx/source/svdraw/svdpntv.cxx +++ b/svx/source/svdraw/svdpntv.cxx @@ -1015,7 +1015,7 @@ void SdrPaintView::SetDefaultAttr(const SfxItemSet& rAttr, bool bReplaceAll) if(bHasEEFeatureItems) { OUString aMessage("SdrPaintView::SetDefaultAttr(): Setting EE_FEATURE items at the SdrView does not make sense! It only leads to overhead and unreadable documents."); - ScopedVclPtr<InfoBox>::Create(nullptr, aMessage)->Execute(); + ScopedVclPtrInstance<InfoBox>(nullptr, aMessage)->Execute(); } } #endif |