diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2015-05-28 21:35:43 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2015-06-04 16:45:17 +0100 |
commit | 07074e0e072f33fe8954eded5cd2495822f5f0e4 (patch) | |
tree | 5d8ea28f63974fda098fb8514a25c22f5244817c /sc/source/ui/dbgui | |
parent | 0ae00643fc87ca30ddf788df9f31cec8dae4e544 (diff) |
tdf#91702 - fix stack-based MessBox allocation.
Change-Id: I62dd164e281911d9db3de453789a5badc7cd5fd7
Reviewed-on: https://gerrit.libreoffice.org/15954
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'sc/source/ui/dbgui')
-rw-r--r-- | sc/source/ui/dbgui/consdlg.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/dbgui/scendlg.cxx | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/sc/source/ui/dbgui/consdlg.cxx b/sc/source/ui/dbgui/consdlg.cxx index 03fb45ce8d04..675b089032b9 100644 --- a/sc/source/ui/dbgui/consdlg.cxx +++ b/sc/source/ui/dbgui/consdlg.cxx @@ -34,7 +34,7 @@ #include "consdlg.hxx" #include <vcl/msgbox.hxx> -#define INFOBOX(id) InfoBox(this, ScGlobal::GetRscString(id)).Execute() +#define INFOBOX(id) ScopedVclPtr<InfoBox>::Create(this, ScGlobal::GetRscString(id))->Execute() class ScAreaData { diff --git a/sc/source/ui/dbgui/scendlg.cxx b/sc/source/ui/dbgui/scendlg.cxx index bbe8b6c4e5e5..0403320279dc 100644 --- a/sc/source/ui/dbgui/scendlg.cxx +++ b/sc/source/ui/dbgui/scendlg.cxx @@ -171,12 +171,12 @@ IMPL_LINK_NOARG(ScNewScenarioDlg, OkHdl) if ( !ScDocument::ValidTabName( aName ) ) { - InfoBox( this, ScGlobal::GetRscString( STR_INVALIDTABNAME ) ).Execute(); + ScopedVclPtr<InfoBox>::Create( this, ScGlobal::GetRscString( STR_INVALIDTABNAME ) )->Execute(); m_pEdName->GrabFocus(); } else if ( !bIsEdit && !pDoc->ValidNewTabName( aName ) ) { - InfoBox( this, ScGlobal::GetRscString( STR_NEWTABNAMENOTUNIQUE ) ).Execute(); + ScopedVclPtr<InfoBox>::Create( this, ScGlobal::GetRscString( STR_NEWTABNAMENOTUNIQUE ) )->Execute(); m_pEdName->GrabFocus(); } else |