From ba81e5c6bd420b41a84ade6ccd774011a8089f7f Mon Sep 17 00:00:00 2001 From: Michael Meeks Date: Thu, 28 May 2015 21:35:43 +0100 Subject: tdf#91702 - fix stack-based MessBox allocation. Change-Id: I62dd164e281911d9db3de453789a5badc7cd5fd7 Reviewed-on: https://gerrit.libreoffice.org/15954 Reviewed-by: Michael Meeks Tested-by: Michael Meeks --- chart2/source/controller/dialogs/DataBrowser.cxx | 8 ++++---- chart2/source/controller/dialogs/tp_Scale.cxx | 2 +- chart2/source/controller/main/ChartController_Window.cxx | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'chart2') diff --git a/chart2/source/controller/dialogs/DataBrowser.cxx b/chart2/source/controller/dialogs/DataBrowser.cxx index 8f0f979c0eff..e39213f77bf3 100644 --- a/chart2/source/controller/dialogs/DataBrowser.cxx +++ b/chart2/source/controller/dialogs/DataBrowser.cxx @@ -136,8 +136,8 @@ void SeriesHeaderEdit::MouseButtonDown( const MouseEvent& rMEvt ) Edit::MouseButtonDown( rMEvt ); if( m_bShowWarningBox ) - WarningBox(this, WinBits( WB_OK ), - SCH_RESSTR(STR_INVALID_NUMBER)).Execute(); + ScopedVclPtr::Create(this, WinBits( WB_OK ), + SCH_RESSTR(STR_INVALID_NUMBER))->Execute(); } class SeriesHeader @@ -767,8 +767,8 @@ void DataBrowser::MouseButtonDown( const BrowserMouseEvent& rEvt ) void DataBrowser::ShowWarningBox() { - WarningBox(this, WinBits( WB_OK ), - SCH_RESSTR(STR_INVALID_NUMBER)).Execute(); + ScopedVclPtr::Create(this, WinBits( WB_OK ), + SCH_RESSTR(STR_INVALID_NUMBER))->Execute(); } bool DataBrowser::ShowQueryBox() diff --git a/chart2/source/controller/dialogs/tp_Scale.cxx b/chart2/source/controller/dialogs/tp_Scale.cxx index 0e1265170368..f27f8e8cf64c 100644 --- a/chart2/source/controller/dialogs/tp_Scale.cxx +++ b/chart2/source/controller/dialogs/tp_Scale.cxx @@ -621,7 +621,7 @@ bool ScaleTabPage::ShowWarning( sal_uInt16 nResIdMessage, Control* pControl /* = if( nResIdMessage == 0 ) return false; - WarningBox( this, WinBits( WB_OK ), SCH_RESSTR( nResIdMessage ) ).Execute(); + ScopedVclPtr::Create( this, WinBits( WB_OK ), SCH_RESSTR( nResIdMessage ) )->Execute(); if( pControl ) { pControl->GrabFocus(); diff --git a/chart2/source/controller/main/ChartController_Window.cxx b/chart2/source/controller/main/ChartController_Window.cxx index 9f2f0116a553..57addb83d0f8 100644 --- a/chart2/source/controller/main/ChartController_Window.cxx +++ b/chart2/source/controller/main/ChartController_Window.cxx @@ -1536,7 +1536,7 @@ bool ChartController::execute_KeyInput( const KeyEvent& rKEvt ) if( ! bReturn ) { SolarMutexGuard aGuard; - InfoBox( m_pChartWindow, SCH_RESSTR( STR_ACTION_NOTPOSSIBLE )).Execute(); + ScopedVclPtr::Create( m_pChartWindow, SCH_RESSTR( STR_ACTION_NOTPOSSIBLE ))->Execute(); } } -- cgit