diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-07-26 10:21:41 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-08-03 09:47:42 +0000 |
commit | 0b21f434b45c350cd9cc5b820226245d6824bf86 (patch) | |
tree | 2db24f59783e6a91bee55fb2cd75421836f6dd60 /svx | |
parent | c4c30cfac570aeb0f8ac91b36b986e438e2811bc (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
(cherry picked from commit a860df25dd7bf62ecb6b3d3ed38803b981f56d52)
Change-Id: Ifacc8d5e742820701307c3c37b9b86487667d84f
Reviewed-on: https://gerrit.libreoffice.org/27537
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
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 1096ea891ce5..d87088053ac0 100644 --- a/svx/source/dialog/hdft.cxx +++ b/svx/source/dialog/hdft.cxx @@ -531,9 +531,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 67b5d999693d..c86c729e68c7 100644 --- a/svx/source/form/fmshimp.cxx +++ b/svx/source/form/fmshimp.cxx @@ -1475,7 +1475,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; } @@ -3147,7 +3147,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 b193f7f1fc5c..fe54a7201e69 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 d942ba69e7bc..b0d49dd43c44 100644 --- a/svx/source/gallery2/galbrws2.cxx +++ b/svx/source/gallery2/galbrws2.cxx @@ -1160,7 +1160,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 2c7bd27a0b8c..711ae9348977 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 47996d76c935..55715369e49a 100644 --- a/svx/source/svdraw/svdpntv.cxx +++ b/svx/source/svdraw/svdpntv.cxx @@ -1024,7 +1024,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 |