From a860df25dd7bf62ecb6b3d3ed38803b981f56d52 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 26 Jul 2016 10:21:41 +0100 Subject: 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::Create or ScopedVclPtrInstance::Create just VclPtr::Create and a raw VclPtr::Create()->foo doesn't call dispose on the owned X Change-Id: Ifacc8d5e742820701307c3c37b9b86487667d84f --- sc/source/ui/dbgui/consdlg.cxx | 2 +- sc/source/ui/dbgui/dbnamdlg.cxx | 2 +- sc/source/ui/dbgui/filtdlg.cxx | 2 +- sc/source/ui/dbgui/scendlg.cxx | 4 ++-- sc/source/ui/dbgui/sfiltdlg.cxx | 2 +- sc/source/ui/dbgui/tpsort.cxx | 2 +- sc/source/ui/docshell/dbdocfun.cxx | 2 +- sc/source/ui/docshell/docfunc.cxx | 4 ++-- sc/source/ui/miscdlgs/crnrdlg.cxx | 4 ++-- sc/source/ui/miscdlgs/filldlg.cxx | 2 +- sc/source/ui/miscdlgs/instbdlg.cxx | 2 +- sc/source/ui/miscdlgs/optsolver.cxx | 2 +- sc/source/ui/miscdlgs/scuiautofmt.cxx | 6 +++--- sc/source/ui/miscdlgs/solvrdlg.cxx | 2 +- sc/source/ui/miscdlgs/tabopdlg.cxx | 2 +- sc/source/ui/navipi/scenwnd.cxx | 2 +- sc/source/ui/optdlg/tpcalc.cxx | 2 +- sc/source/ui/optdlg/tpusrlst.cxx | 8 ++++---- sc/source/ui/pagedlg/areasdlg.cxx | 2 +- sc/source/ui/view/cellsh3.cxx | 2 +- sc/source/ui/view/dbfunc.cxx | 2 +- sc/source/ui/view/dbfunc3.cxx | 2 +- sc/source/ui/view/spelleng.cxx | 4 ++-- sc/source/ui/view/tabvwshf.cxx | 4 ++-- sc/source/ui/view/viewfunc.cxx | 2 +- 25 files changed, 35 insertions(+), 35 deletions(-) (limited to 'sc') 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 -#define INFOBOX(id) ScopedVclPtr::Create(this, ScGlobal::GetRscString(id))->Execute() +#define INFOBOX(id) ScopedVclPtrInstance(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::Create(this, s)->Execute() +#define ERRORBOX(s) ScopedVclPtrInstance(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::Create(this, ScGlobal::GetRscString(STR_INVALID_TABREF))->Execute(); + ScopedVclPtrInstance(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::Create( this, ScGlobal::GetRscString( STR_INVALIDTABNAME ) )->Execute(); + ScopedVclPtrInstance(this, ScGlobal::GetRscString(STR_INVALIDTABNAME))->Execute(); m_pEdName->GrabFocus(); } else if ( !bIsEdit && !pDoc->ValidNewTabName( aName ) ) { - ScopedVclPtr::Create( this, ScGlobal::GetRscString( STR_NEWTABNAMENOTUNIQUE ) )->Execute(); + ScopedVclPtrInstance(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::Create(this, ScGlobal::GetRscString(rid))->Execute() +#define ERRORBOX(rid) ScopedVclPtrInstance(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::Create(this, ScGlobal::GetRscString( STR_INVALID_TABREF))->Execute(); + ScopedVclPtrInstance(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::Create( ScDocShell::GetActiveDialogParent(), WinBits(WB_YES_NO | WB_DEF_YES), + bOk = ( ScopedVclPtrInstance( 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::Create( nullptr, + ScopedVclPtrInstance( 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::Create( ScDocShell::GetActiveDialogParent(), + short nResult = ScopedVclPtrInstance( 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 #include -#define ERRORBOX(s) ScopedVclPtr::Create(this, s)->Execute() -#define QUERYBOX(m) ScopedVclPtr::Create(this,WinBits(WB_YES_NO|WB_DEF_YES),m)->Execute() +#define ERRORBOX(s) ScopedVclPtrInstance(this, s)->Execute() +#define QUERYBOX(m) ScopedVclPtrInstance(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::Create(this, aErrMsgInvalidVal)->Execute(); + ScopedVclPtrInstance(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::Create(this, aErrMsg)->Execute(); + (void)ScopedVclPtrInstance(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::Create(this, aMessage)->Execute(); + ScopedVclPtrInstance(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::Create(this, + sal_uInt16 nRet = ScopedVclPtrInstance(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::Create( this, WinBits( WB_YES_NO | WB_DEF_YES ), aMsg )->Execute() ) + ScopedVclPtrInstance( 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::Create( this, + bOk = RET_CANCEL == ScopedVclPtrInstance( 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::Create(pParent, aString)->Execute(); + ScopedVclPtrInstance(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::Create(this, *pMsg, VclMessageType::Error, VCL_BUTTONS_OK_CANCEL)->Execute(); + ScopedVclPtrInstance(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::Create( nullptr, WinBits( WB_YES_NO | WB_DEF_YES ), ScGlobal::GetRscString( STR_QUERY_DELSCENARIO ) )->Execute() == RET_YES ) + if( ScopedVclPtrInstance( 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::Create( this, + ScopedVclPtrInstance( 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::Create( this, aStrCopyList, aStrCopyFrom )->Execute(); + nCellDir = ScopedVclPtrInstance(this, aStrCopyList, aStrCopyFrom)->Execute(); } else if ( nStartCol != nEndCol ) nCellDir = SCRET_ROWS; @@ -421,7 +421,7 @@ void ScTpUserLists::CopyListFromArea( const ScRefAddress& rStartPos, if ( bValueIgnored ) { - ScopedVclPtr::Create( this, aStrCopyErr )->Execute(); + ScopedVclPtrInstance(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::Create( this, + if ( RET_YES == ScopedVclPtrInstance( this, WinBits( WB_YES_NO | WB_DEF_YES ), aMsg )->Execute() ) @@ -695,7 +695,7 @@ IMPL_LINK_TYPED( ScTpUserLists, BtnClickHdl, Button*, pBtn, void ) } else { - ScopedVclPtr::Create(this, + ScopedVclPtrInstance(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::Create(this, ScGlobal::GetRscString(nId))->Execute() +#define ERRORBOX(nId) ScopedVclPtrInstance(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::Create( pTabViewShell->GetDialogParent(), WinBits(WB_YES_NO | WB_DEF_YES), + ScopedVclPtrInstance( 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::Create( GetViewData().GetDialogParent(), WinBits(WB_YES_NO | WB_DEF_YES), + if ( ScopedVclPtrInstance( 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::Create( GetViewData().GetDialogParent(), WinBits(WB_YES_NO | WB_DEF_YES), + bOk = ( ScopedVclPtrInstance( 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::Create( pParent, ScGlobal::GetRscString( STR_NOLANGERR ) )->Execute(); + ScopedVclPtrInstance( pParent, ScGlobal::GetRscString( STR_NOLANGERR ) )->Execute(); } } @@ -322,7 +322,7 @@ void ScSpellingEngine::ShowFinishDialog() { vcl::Window* pParent = GetDialogParent(); ScWaitCursorOff aWaitOff( pParent ); - ScopedVclPtr::Create( pParent, ScGlobal::GetRscString( STR_SPELLING_STOP_OK ) )->Execute(); + ScopedVclPtrInstance( 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::Create(GetDialogParent(), + nRet = ScopedVclPtrInstance(GetDialogParent(), aErrMsg )->Execute(); } @@ -595,7 +595,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq ) { // no parameter given, ask for confirmation bDoIt = ( RET_YES == - ScopedVclPtr::Create( GetDialogParent(), + ScopedVclPtrInstance( 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::Create( GetViewData().GetDialogParent(), + nResult = ScopedVclPtrInstance( GetViewData().GetDialogParent(), WinBits(WB_YES_NO | WB_DEF_YES), aMessage )->Execute(); } -- cgit