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 /sc/source/ui | |
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 'sc/source/ui')
25 files changed, 35 insertions, 35 deletions
diff --git a/sc/source/ui/dbgui/consdlg.cxx b/sc/source/ui/dbgui/consdlg.cxx index d02fad0a53c9..06b663779c14 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) ScopedVclPtr<InfoBox>::Create(this, ScGlobal::GetRscString(id))->Execute() +#define INFOBOX(id) ScopedVclPtrInstance<InfoBox>(this, ScGlobal::GetRscString(id))->Execute() class ScAreaData { diff --git a/sc/source/ui/dbgui/dbnamdlg.cxx b/sc/source/ui/dbgui/dbnamdlg.cxx index 76d84853008d..0621fad5915c 100644 --- a/sc/source/ui/dbgui/dbnamdlg.cxx +++ b/sc/source/ui/dbgui/dbnamdlg.cxx @@ -37,7 +37,7 @@ class DBSaveData; static DBSaveData* pSaveObj = nullptr; -#define ERRORBOX(s) ScopedVclPtrInstance<MessageDialog>::Create(this, s)->Execute() +#define ERRORBOX(s) ScopedVclPtrInstance<MessageDialog>(this, s)->Execute() // class DBSaveData diff --git a/sc/source/ui/dbgui/filtdlg.cxx b/sc/source/ui/dbgui/filtdlg.cxx index 5a2c6baa3fc4..23713771e4a8 100644 --- a/sc/source/ui/dbgui/filtdlg.cxx +++ b/sc/source/ui/dbgui/filtdlg.cxx @@ -680,7 +680,7 @@ IMPL_LINK_TYPED( ScFilterDlg, EndDlgHdl, Button*, pBtn, void ) if (!pExpander->get_expanded()) pExpander->set_expanded(true); - ScopedVclPtrInstance<MessageDialog>::Create(this, ScGlobal::GetRscString(STR_INVALID_TABREF))->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, ScGlobal::GetRscString(STR_INVALID_TABREF))->Execute(); pEdCopyArea->GrabFocus(); bAreaInputOk = false; } diff --git a/sc/source/ui/dbgui/scendlg.cxx b/sc/source/ui/dbgui/scendlg.cxx index 6d40b208d947..5cefb49045a1 100644 --- a/sc/source/ui/dbgui/scendlg.cxx +++ b/sc/source/ui/dbgui/scendlg.cxx @@ -171,12 +171,12 @@ IMPL_LINK_NOARG_TYPED(ScNewScenarioDlg, OkHdl, Button*, void) if ( !ScDocument::ValidTabName( aName ) ) { - ScopedVclPtr<InfoBox>::Create( this, ScGlobal::GetRscString( STR_INVALIDTABNAME ) )->Execute(); + ScopedVclPtrInstance<InfoBox>(this, ScGlobal::GetRscString(STR_INVALIDTABNAME))->Execute(); m_pEdName->GrabFocus(); } else if ( !bIsEdit && !pDoc->ValidNewTabName( aName ) ) { - ScopedVclPtr<InfoBox>::Create( this, ScGlobal::GetRscString( STR_NEWTABNAMENOTUNIQUE ) )->Execute(); + ScopedVclPtrInstance<InfoBox>(this, ScGlobal::GetRscString(STR_NEWTABNAMENOTUNIQUE))->Execute(); m_pEdName->GrabFocus(); } else diff --git a/sc/source/ui/dbgui/sfiltdlg.cxx b/sc/source/ui/dbgui/sfiltdlg.cxx index 4cbe66ff405a..2a3e82d386fb 100644 --- a/sc/source/ui/dbgui/sfiltdlg.cxx +++ b/sc/source/ui/dbgui/sfiltdlg.cxx @@ -39,7 +39,7 @@ // DEFINE -------------------------------------------------------------------- -#define ERRORBOX(rid) ScopedVclPtrInstance<MessageDialog>::Create(this, ScGlobal::GetRscString(rid))->Execute() +#define ERRORBOX(rid) ScopedVclPtrInstance<MessageDialog>(this, ScGlobal::GetRscString(rid))->Execute() // class ScSpecialFilterDialog diff --git a/sc/source/ui/dbgui/tpsort.cxx b/sc/source/ui/dbgui/tpsort.cxx index 15d53eef9ef6..01bd5346928a 100644 --- a/sc/source/ui/dbgui/tpsort.cxx +++ b/sc/source/ui/dbgui/tpsort.cxx @@ -801,7 +801,7 @@ DeactivateRC ScTabPageSortOptions::DeactivatePage( SfxItemSet* pSetP ) if ( !bPosInputOk ) { - ScopedVclPtrInstance<MessageDialog>::Create(this, ScGlobal::GetRscString( STR_INVALID_TABREF))->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, ScGlobal::GetRscString( STR_INVALID_TABREF))->Execute(); m_pEdOutPos->GrabFocus(); m_pEdOutPos->SetSelection( Selection( 0, SELECTION_MAX ) ); theOutPos.Set(0,0,0); diff --git a/sc/source/ui/docshell/dbdocfun.cxx b/sc/source/ui/docshell/dbdocfun.cxx index 2fad9d99840b..983f29d431b0 100644 --- a/sc/source/ui/docshell/dbdocfun.cxx +++ b/sc/source/ui/docshell/dbdocfun.cxx @@ -990,7 +990,7 @@ void ScDBDocFunc::DoSubTotals( SCTAB nTab, const ScSubTotalParam& rParam, if (rParam.bReplace) if (rDoc.TestRemoveSubTotals( nTab, rParam )) { - bOk = ( ScopedVclPtr<MessBox>::Create( ScDocShell::GetActiveDialogParent(), WinBits(WB_YES_NO | WB_DEF_YES), + bOk = ( ScopedVclPtrInstance<MessBox>( ScDocShell::GetActiveDialogParent(), WinBits(WB_YES_NO | WB_DEF_YES), // "StarCalc" "Daten loeschen?" ScGlobal::GetRscString( STR_MSSG_DOSUBTOTALS_0 ), ScGlobal::GetRscString( STR_MSSG_DOSUBTOTALS_1 ) )->Execute() diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx index 97ab8fe7aa1d..d2b1cc852afe 100644 --- a/sc/source/ui/docshell/docfunc.cxx +++ b/sc/source/ui/docshell/docfunc.cxx @@ -389,7 +389,7 @@ bool ScDocFunc::DetectiveMarkInvalid(SCTAB nTab) aModificator.SetDocumentModified(); if ( bOverflow ) { - ScopedVclPtr<InfoBox>::Create( nullptr, + ScopedVclPtrInstance<InfoBox>( nullptr, ScGlobal::GetRscString( STR_DETINVALID_OVERFLOW ) )->Execute(); } } @@ -4951,7 +4951,7 @@ void ScDocFunc::CreateOneName( ScRangeName& rList, aMessage += aName; aMessage += aTemplate.getToken( 1, '#' ); - short nResult = ScopedVclPtr<QueryBox>::Create( ScDocShell::GetActiveDialogParent(), + short nResult = ScopedVclPtrInstance<QueryBox>( ScDocShell::GetActiveDialogParent(), WinBits(WB_YES_NO_CANCEL | WB_DEF_YES), aMessage )->Execute(); if ( nResult == RET_YES ) diff --git a/sc/source/ui/miscdlgs/crnrdlg.cxx b/sc/source/ui/miscdlgs/crnrdlg.cxx index 0d2c57be0f99..59df51a3cc46 100644 --- a/sc/source/ui/miscdlgs/crnrdlg.cxx +++ b/sc/source/ui/miscdlgs/crnrdlg.cxx @@ -26,8 +26,8 @@ #include <vcl/msgbox.hxx> #include <memory> -#define ERRORBOX(s) ScopedVclPtr<MessageDialog>::Create(this, s)->Execute() -#define QUERYBOX(m) ScopedVclPtr<QueryBox>::Create(this,WinBits(WB_YES_NO|WB_DEF_YES),m)->Execute() +#define ERRORBOX(s) ScopedVclPtrInstance<MessageDialog>(this, s)->Execute() +#define QUERYBOX(m) ScopedVclPtrInstance<QueryBox>(this,WinBits(WB_YES_NO|WB_DEF_YES),m)->Execute() const sal_uLong nEntryDataCol = 0; const sal_uLong nEntryDataRow = 1; diff --git a/sc/source/ui/miscdlgs/filldlg.cxx b/sc/source/ui/miscdlgs/filldlg.cxx index c2da83919bc2..e52eaf26547c 100644 --- a/sc/source/ui/miscdlgs/filldlg.cxx +++ b/sc/source/ui/miscdlgs/filldlg.cxx @@ -324,7 +324,7 @@ IMPL_LINK_NOARG_TYPED(ScFillSeriesDlg, OKHdl, Button*, void) EndDialog( RET_OK ); else { - ScopedVclPtr<MessageDialog>::Create(this, aErrMsgInvalidVal)->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, aErrMsgInvalidVal)->Execute(); pEdWrong->GrabFocus(); } } diff --git a/sc/source/ui/miscdlgs/instbdlg.cxx b/sc/source/ui/miscdlgs/instbdlg.cxx index ff1714c23932..4594b3fe2adc 100644 --- a/sc/source/ui/miscdlgs/instbdlg.cxx +++ b/sc/source/ui/miscdlgs/instbdlg.cxx @@ -301,7 +301,7 @@ IMPL_LINK_NOARG_TYPED(ScInsertTableDlg, DoEnterHdl, Button*, void) else { OUString aErrMsg ( ScGlobal::GetRscString( STR_INVALIDTABNAME ) ); - (void)ScopedVclPtrInstance<MessageDialog>::Create(this, aErrMsg)->Execute(); + (void)ScopedVclPtrInstance<MessageDialog>(this, aErrMsg)->Execute(); } } diff --git a/sc/source/ui/miscdlgs/optsolver.cxx b/sc/source/ui/miscdlgs/optsolver.cxx index e5b1cf18d401..5b15550b2492 100644 --- a/sc/source/ui/miscdlgs/optsolver.cxx +++ b/sc/source/ui/miscdlgs/optsolver.cxx @@ -783,7 +783,7 @@ IMPL_LINK_TYPED( ScOptSolverDlg, CursorDownHdl, ScCursorRefEdit&, rEdit, void ) void ScOptSolverDlg::ShowError( bool bCondition, formula::RefEdit* pFocus ) { OUString aMessage = bCondition ? maConditionError : maInputError; - ScopedVclPtrInstance<MessageDialog>::Create(this, aMessage)->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, aMessage)->Execute(); if (pFocus) { mpEdActive = pFocus; diff --git a/sc/source/ui/miscdlgs/scuiautofmt.cxx b/sc/source/ui/miscdlgs/scuiautofmt.cxx index e0f4e9267d03..19033d9cb463 100644 --- a/sc/source/ui/miscdlgs/scuiautofmt.cxx +++ b/sc/source/ui/miscdlgs/scuiautofmt.cxx @@ -261,7 +261,7 @@ IMPL_LINK_NOARG_TYPED(ScAutoFormatDlg, AddHdl, Button*, void) if ( !bFmtInserted ) { - sal_uInt16 nRet = ScopedVclPtr<MessageDialog>::Create(this, + sal_uInt16 nRet = ScopedVclPtrInstance<MessageDialog>(this, ScGlobal::GetRscString(STR_INVALID_AFNAME), VclMessageType::Error, VCL_BUTTONS_OK_CANCEL @@ -286,7 +286,7 @@ IMPL_LINK_NOARG_TYPED(ScAutoFormatDlg, RemoveHdl, Button*, void) aMsg += aStrDelMsg.getToken( 1, '#' ); if ( RET_YES == - ScopedVclPtr<QueryBox>::Create( this, WinBits( WB_YES_NO | WB_DEF_YES ), aMsg )->Execute() ) + ScopedVclPtrInstance<QueryBox>( this, WinBits( WB_YES_NO | WB_DEF_YES ), aMsg )->Execute() ) { m_pLbFormat->RemoveEntry( nIndex ); m_pLbFormat->SelectEntryPos( nIndex-1 ); @@ -381,7 +381,7 @@ IMPL_LINK_NOARG_TYPED(ScAutoFormatDlg, RenameHdl, Button*, void) } if( !bFmtRenamed ) { - bOk = RET_CANCEL == ScopedVclPtr<MessageDialog>::Create( this, + bOk = RET_CANCEL == ScopedVclPtrInstance<MessageDialog>( this, ScGlobal::GetRscString(STR_INVALID_AFNAME), VclMessageType::Error, VCL_BUTTONS_OK_CANCEL diff --git a/sc/source/ui/miscdlgs/solvrdlg.cxx b/sc/source/ui/miscdlgs/solvrdlg.cxx index 29f0f7e3f974..34c079ac2425 100644 --- a/sc/source/ui/miscdlgs/solvrdlg.cxx +++ b/sc/source/ui/miscdlgs/solvrdlg.cxx @@ -35,7 +35,7 @@ namespace { void lclErrorDialog( vcl::Window* pParent, const OUString& aString ) { - ScopedVclPtrInstance<MessageDialog>::Create(pParent, aString)->Execute(); + ScopedVclPtrInstance<MessageDialog>(pParent, aString)->Execute(); } } diff --git a/sc/source/ui/miscdlgs/tabopdlg.cxx b/sc/source/ui/miscdlgs/tabopdlg.cxx index 06d46343a4d8..ee458748f853 100644 --- a/sc/source/ui/miscdlgs/tabopdlg.cxx +++ b/sc/source/ui/miscdlgs/tabopdlg.cxx @@ -223,7 +223,7 @@ void ScTabOpDlg::RaiseError( ScTabOpErr eError ) break; } - ScopedVclPtrInstance<MessageDialog>::Create(this, *pMsg, VclMessageType::Error, VCL_BUTTONS_OK_CANCEL)->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, *pMsg, VclMessageType::Error, VCL_BUTTONS_OK_CANCEL)->Execute(); pEd->GrabFocus(); } diff --git a/sc/source/ui/navipi/scenwnd.cxx b/sc/source/ui/navipi/scenwnd.cxx index 88347cb610c4..c5976d9c443f 100644 --- a/sc/source/ui/navipi/scenwnd.cxx +++ b/sc/source/ui/navipi/scenwnd.cxx @@ -189,7 +189,7 @@ void ScScenarioListBox::EditScenario() void ScScenarioListBox::DeleteScenario() { if( GetSelectEntryCount() > 0 ) - if( ScopedVclPtr<QueryBox>::Create( nullptr, WinBits( WB_YES_NO | WB_DEF_YES ), ScGlobal::GetRscString( STR_QUERY_DELSCENARIO ) )->Execute() == RET_YES ) + if( ScopedVclPtrInstance<QueryBox>( nullptr, WinBits( WB_YES_NO | WB_DEF_YES ), ScGlobal::GetRscString( STR_QUERY_DELSCENARIO ) )->Execute() == RET_YES ) ExecuteScenarioSlot( SID_DELETE_SCENARIO ); } diff --git a/sc/source/ui/optdlg/tpcalc.cxx b/sc/source/ui/optdlg/tpcalc.cxx index a9834f4e69aa..adb13de41bd2 100644 --- a/sc/source/ui/optdlg/tpcalc.cxx +++ b/sc/source/ui/optdlg/tpcalc.cxx @@ -204,7 +204,7 @@ DeactivateRC ScTpCalcOptions::DeactivatePage( SfxItemSet* pSetP ) if ( nReturn == DeactivateRC::KeepPage ) { - ScopedVclPtr<MessageDialog>::Create( this, + ScopedVclPtrInstance<MessageDialog>( this, ScGlobal::GetRscString( STR_INVALID_EPS ) )->Execute(); diff --git a/sc/source/ui/optdlg/tpusrlst.cxx b/sc/source/ui/optdlg/tpusrlst.cxx index aca56c1693c6..598d6f12b0d7 100644 --- a/sc/source/ui/optdlg/tpusrlst.cxx +++ b/sc/source/ui/optdlg/tpusrlst.cxx @@ -357,7 +357,7 @@ void ScTpUserLists::CopyListFromArea( const ScRefAddress& rStartPos, if ( (nStartCol != nEndCol) && (nStartRow != nEndRow) ) { - nCellDir = ScopedVclPtr<ScColOrRowDlg>::Create( this, aStrCopyList, aStrCopyFrom )->Execute(); + nCellDir = ScopedVclPtrInstance<ScColOrRowDlg>(this, aStrCopyList, aStrCopyFrom)->Execute(); } else if ( nStartCol != nEndCol ) nCellDir = SCRET_ROWS; @@ -421,7 +421,7 @@ void ScTpUserLists::CopyListFromArea( const ScRefAddress& rStartPos, if ( bValueIgnored ) { - ScopedVclPtr<InfoBox>::Create( this, aStrCopyErr )->Execute(); + ScopedVclPtrInstance<InfoBox>(this, aStrCopyErr)->Execute(); } } @@ -616,7 +616,7 @@ IMPL_LINK_TYPED( ScTpUserLists, BtnClickHdl, Button*, pBtn, void ) aMsg += mpLbLists->GetEntry( nRemovePos ); aMsg += aStrQueryRemove.getToken( 1, '#' ); - if ( RET_YES == ScopedVclPtr<QueryBox>::Create( this, + if ( RET_YES == ScopedVclPtrInstance<QueryBox>( this, WinBits( WB_YES_NO | WB_DEF_YES ), aMsg )->Execute() ) @@ -695,7 +695,7 @@ IMPL_LINK_TYPED( ScTpUserLists, BtnClickHdl, Button*, pBtn, void ) } else { - ScopedVclPtr<MessageDialog>::Create(this, + ScopedVclPtrInstance<MessageDialog>(this, ScGlobal::GetRscString( STR_INVALID_TABREF ) )->Execute(); mpEdCopyFrom->GrabFocus(); diff --git a/sc/source/ui/pagedlg/areasdlg.cxx b/sc/source/ui/pagedlg/areasdlg.cxx index 324eeeae7846..07c4dcc572db 100644 --- a/sc/source/ui/pagedlg/areasdlg.cxx +++ b/sc/source/ui/pagedlg/areasdlg.cxx @@ -52,7 +52,7 @@ enum { }; #define HDL(hdl) LINK( this, ScPrintAreasDlg, hdl ) -#define ERRORBOX(nId) ScopedVclPtrInstance<MessageDialog>::Create(this, ScGlobal::GetRscString(nId))->Execute() +#define ERRORBOX(nId) ScopedVclPtrInstance<MessageDialog>(this, ScGlobal::GetRscString(nId))->Execute() // globale Funktionen (->am Ende der Datei): diff --git a/sc/source/ui/view/cellsh3.cxx b/sc/source/ui/view/cellsh3.cxx index e8766a0661bf..f88cb6c4961f 100644 --- a/sc/source/ui/view/cellsh3.cxx +++ b/sc/source/ui/view/cellsh3.cxx @@ -430,7 +430,7 @@ void ScCellShell::Execute( SfxRequest& rReq ) { if ( rReq.IsAPI() || RET_YES == - ScopedVclPtr<QueryBox>::Create( pTabViewShell->GetDialogParent(), WinBits(WB_YES_NO | WB_DEF_YES), + ScopedVclPtrInstance<QueryBox>( pTabViewShell->GetDialogParent(), WinBits(WB_YES_NO | WB_DEF_YES), ScGlobal::GetRscString(STR_UPDATE_SCENARIO) )-> Execute() ) { diff --git a/sc/source/ui/view/dbfunc.cxx b/sc/source/ui/view/dbfunc.cxx index a2bc7999d383..ef704685447d 100644 --- a/sc/source/ui/view/dbfunc.cxx +++ b/sc/source/ui/view/dbfunc.cxx @@ -354,7 +354,7 @@ void ScDBFunc::ToggleAutoFilter() { if (!bHeader) { - if ( ScopedVclPtr<MessBox>::Create( GetViewData().GetDialogParent(), WinBits(WB_YES_NO | WB_DEF_YES), + if ( ScopedVclPtrInstance<MessBox>( GetViewData().GetDialogParent(), WinBits(WB_YES_NO | WB_DEF_YES), ScGlobal::GetRscString( STR_MSSG_DOSUBTOTALS_0 ), // "StarCalc" ScGlobal::GetRscString( STR_MSSG_MAKEAUTOFILTER_0 ) // header from first row? )->Execute() == RET_YES ) diff --git a/sc/source/ui/view/dbfunc3.cxx b/sc/source/ui/view/dbfunc3.cxx index 576c349ebc58..c2904091f837 100644 --- a/sc/source/ui/view/dbfunc3.cxx +++ b/sc/source/ui/view/dbfunc3.cxx @@ -395,7 +395,7 @@ void ScDBFunc::DoSubTotals( const ScSubTotalParam& rParam, bool bRecord, if (rParam.bReplace) if (rDoc.TestRemoveSubTotals( nTab, rParam )) { - bOk = ( ScopedVclPtr<MessBox>::Create( GetViewData().GetDialogParent(), WinBits(WB_YES_NO | WB_DEF_YES), + bOk = ( ScopedVclPtrInstance<MessBox>( GetViewData().GetDialogParent(), WinBits(WB_YES_NO | WB_DEF_YES), // "StarCalc" "delete data?" ScGlobal::GetRscString( STR_MSSG_DOSUBTOTALS_0 ), ScGlobal::GetRscString( STR_MSSG_DOSUBTOTALS_1 ) )->Execute() diff --git a/sc/source/ui/view/spelleng.cxx b/sc/source/ui/view/spelleng.cxx index 93767c6755dd..f8b7f29fa25b 100644 --- a/sc/source/ui/view/spelleng.cxx +++ b/sc/source/ui/view/spelleng.cxx @@ -294,7 +294,7 @@ void ScSpellingEngine::ConvertAll( EditView& rEditView ) { vcl::Window* pParent = GetDialogParent(); ScWaitCursorOff aWaitOff( pParent ); - ScopedVclPtr<InfoBox>::Create( pParent, ScGlobal::GetRscString( STR_NOLANGERR ) )->Execute(); + ScopedVclPtrInstance<InfoBox>( pParent, ScGlobal::GetRscString( STR_NOLANGERR ) )->Execute(); } } @@ -322,7 +322,7 @@ void ScSpellingEngine::ShowFinishDialog() { vcl::Window* pParent = GetDialogParent(); ScWaitCursorOff aWaitOff( pParent ); - ScopedVclPtr<InfoBox>::Create( pParent, ScGlobal::GetRscString( STR_SPELLING_STOP_OK ) )->Execute(); + ScopedVclPtrInstance<InfoBox>( pParent, ScGlobal::GetRscString( STR_SPELLING_STOP_OK ) )->Execute(); } vcl::Window* ScSpellingEngine::GetDialogParent() diff --git a/sc/source/ui/view/tabvwshf.cxx b/sc/source/ui/view/tabvwshf.cxx index fa9ee6e5062d..63ba25e160a8 100644 --- a/sc/source/ui/view/tabvwshf.cxx +++ b/sc/source/ui/view/tabvwshf.cxx @@ -425,7 +425,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq ) } else { - nRet = ScopedVclPtr<MessageDialog>::Create(GetDialogParent(), + nRet = ScopedVclPtrInstance<MessageDialog>(GetDialogParent(), aErrMsg )->Execute(); } @@ -595,7 +595,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq ) { // no parameter given, ask for confirmation bDoIt = ( RET_YES == - ScopedVclPtr<QueryBox>::Create( GetDialogParent(), + ScopedVclPtrInstance<QueryBox>( GetDialogParent(), WinBits( WB_YES_NO | WB_DEF_YES ), ScGlobal::GetRscString(STR_QUERY_DELTAB) )->Execute() ); diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx index a6f3d675f8cd..649c384e6347 100644 --- a/sc/source/ui/view/viewfunc.cxx +++ b/sc/source/ui/view/viewfunc.cxx @@ -438,7 +438,7 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, { OUString aMessage( ScResId( SCSTR_FORMULA_AUTOCORRECTION ) ); aMessage += aCorrectedFormula; - nResult = ScopedVclPtr<QueryBox>::Create( GetViewData().GetDialogParent(), + nResult = ScopedVclPtrInstance<QueryBox>( GetViewData().GetDialogParent(), WinBits(WB_YES_NO | WB_DEF_YES), aMessage )->Execute(); } |