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 /starmath | |
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 'starmath')
-rw-r--r-- | starmath/source/dialog.cxx | 9 | ||||
-rw-r--r-- | starmath/source/view.cxx | 2 |
2 files changed, 5 insertions, 6 deletions
diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx index d5fe1435b2e2..c1540c91bb5d 100644 --- a/starmath/source/dialog.cxx +++ b/starmath/source/dialog.cxx @@ -423,7 +423,7 @@ public: IMPL_LINK_NOARG_TYPED( SmFontSizeDialog, DefaultButtonClickHdl, Button *, void ) { - if (ScopedVclPtr<SaveDefaultsQuery>::Create(this)->Execute() == RET_YES) + if (ScopedVclPtrInstance<SaveDefaultsQuery>(this)->Execute() == RET_YES) { SmModule *pp = SM_MOD(); SmFormat aFmt( pp->GetConfig()->GetStandardFormat() ); @@ -523,10 +523,9 @@ IMPL_LINK_TYPED( SmFontTypeDialog, MenuSelectHdl, Menu *, pMenu, bool ) return false; } - IMPL_LINK_NOARG_TYPED( SmFontTypeDialog, DefaultButtonClickHdl, Button *, void ) { - if (ScopedVclPtr<SaveDefaultsQuery>::Create(this)->Execute() == RET_YES) + if (ScopedVclPtrInstance<SaveDefaultsQuery>(this)->Execute() == RET_YES) { SmModule *pp = SM_MOD(); SmFormat aFmt( pp->GetConfig()->GetStandardFormat() ); @@ -722,7 +721,7 @@ IMPL_LINK_TYPED( SmDistanceDialog, MenuSelectHdl, Menu *, pMenu, bool ) IMPL_LINK_NOARG_TYPED( SmDistanceDialog, DefaultButtonClickHdl, Button *, void ) { - if (ScopedVclPtr<SaveDefaultsQuery>::Create(this)->Execute() == RET_YES) + if (ScopedVclPtrInstance<SaveDefaultsQuery>(this)->Execute() == RET_YES) { SmModule *pp = SM_MOD(); SmFormat aFmt( pp->GetConfig()->GetStandardFormat() ); @@ -1021,7 +1020,7 @@ void SmDistanceDialog::WriteTo(SmFormat &rFormat) /*const*/ IMPL_LINK_NOARG_TYPED( SmAlignDialog, DefaultButtonClickHdl, Button *, void ) { - if (ScopedVclPtr<SaveDefaultsQuery>::Create(this)->Execute() == RET_YES) + if (ScopedVclPtrInstance<SaveDefaultsQuery>(this)->Execute() == RET_YES) { SmModule *pp = SM_MOD(); SmFormat aFmt( pp->GetConfig()->GetStandardFormat() ); diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx index eeff4a987a40..605fe7539c4b 100644 --- a/starmath/source/view.cxx +++ b/starmath/source/view.cxx @@ -1858,7 +1858,7 @@ void SmViewShell::Execute(SfxRequest& rReq) SAL_WARN_IF( !pDev, "starmath", "device for font list missing" ); SmModule *pp = SM_MOD(); - ScopedVclPtrInstance<SmSymbolDialog>::Create( nullptr, pDev, pp->GetSymbolManager(), *this )->Execute(); + ScopedVclPtrInstance<SmSymbolDialog>( nullptr, pDev, pp->GetSymbolManager(), *this )->Execute(); } break; } |