diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2015-05-28 21:35:43 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2015-05-29 12:16:28 +0000 |
commit | ba81e5c6bd420b41a84ade6ccd774011a8089f7f (patch) | |
tree | 554d0904466549cf2ba630e361e457fdcec22c98 /basctl | |
parent | 5fe011ae025d7d354ca0647189524843a444ffba (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 'basctl')
-rw-r--r-- | basctl/source/basicide/baside2b.cxx | 2 | ||||
-rw-r--r-- | basctl/source/basicide/basides1.cxx | 6 | ||||
-rw-r--r-- | basctl/source/basicide/basidesh.cxx | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx index e931552b3578..8c949c78829b 100644 --- a/basctl/source/basicide/baside2b.cxx +++ b/basctl/source/basicide/baside2b.cxx @@ -483,7 +483,7 @@ bool EditorWindow::ImpCanModify() { // If in Trace-mode, abort the trace or refuse input // Remove markers in the modules in Notify at Basic::Stoped - if ( QueryBox( 0, WB_OK_CANCEL, IDEResId(RID_STR_WILLSTOPPRG).toString() ).Execute() == RET_OK ) + if ( ScopedVclPtr<QueryBox>::Create( nullptr, WB_OK_CANCEL, IDEResId(RID_STR_WILLSTOPPRG).toString() )->Execute() == RET_OK ) { rModulWindow.GetBasicStatus().bIsRunning = false; StopBasic(); diff --git a/basctl/source/basicide/basides1.cxx b/basctl/source/basicide/basides1.cxx index f99f7bba0f5b..783c4c0e5c17 100644 --- a/basctl/source/basicide/basides1.cxx +++ b/basctl/source/basicide/basides1.cxx @@ -97,7 +97,7 @@ void Shell::ExecuteCurrent( SfxRequest& rReq ) nActModWindows++; } - if ( nActModWindows <= 1 || ( !rSearchItem.GetSelection() && QueryBox( pCurWin, WB_YES_NO|WB_DEF_YES, IDEResId(RID_STR_SEARCHALLMODULES).toString() ).Execute() == RET_YES ) ) + if ( nActModWindows <= 1 || ( !rSearchItem.GetSelection() && ScopedVclPtr<QueryBox>::Create( pCurWin, WB_YES_NO|WB_DEF_YES, IDEResId(RID_STR_SEARCHALLMODULES).toString() )->Execute() == RET_YES ) ) { for (WindowTableIt it = aWindowTable.begin(); it != aWindowTable.end(); ++it) { @@ -110,7 +110,7 @@ void Shell::ExecuteCurrent( SfxRequest& rReq ) OUString aReplStr(IDE_RESSTR(RID_STR_SEARCHREPLACES)); aReplStr = aReplStr.replaceAll("XX", OUString::number(nFound)); - InfoBox( pCurWin, aReplStr ).Execute(); + ScopedVclPtr<InfoBox>::Create( pCurWin, aReplStr )->Execute(); } else { @@ -177,7 +177,7 @@ void Shell::ExecuteCurrent( SfxRequest& rReq ) SetCurWindow( pWin, true ); } if ( !nFound && !bCanceled ) - InfoBox( pCurWin, IDEResId(RID_STR_SEARCHNOTFOUND).toString() ).Execute(); + ScopedVclPtr<InfoBox>::Create( pCurWin, IDEResId(RID_STR_SEARCHNOTFOUND).toString() )->Execute(); } rReq.Done(); diff --git a/basctl/source/basicide/basidesh.cxx b/basctl/source/basicide/basidesh.cxx index e337fdf8699f..661a667f1034 100644 --- a/basctl/source/basicide/basidesh.cxx +++ b/basctl/source/basicide/basidesh.cxx @@ -396,7 +396,7 @@ bool Shell::PrepareClose( bool bUI ) if( bUI ) { vcl::Window *pParent = &GetViewFrame()->GetWindow(); - InfoBox( pParent, IDE_RESSTR(RID_STR_CANNOTCLOSE)).Execute(); + ScopedVclPtr<InfoBox>::Create( pParent, IDE_RESSTR(RID_STR_CANNOTCLOSE))->Execute(); } return false; } |